CHTJonas

KVM Install

Jun 7th, 2020 (edited)
31
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sudo apt install qemu qemu-kvm libvirt-bin virtinst bridge-utils
  2.  
  3. NAME="myvirtualmachine"
  4.  
  5. sudo virt-install --name $NAME --virt-type kvm --vcpus 2 --ram 2048 \
  6. --network bridge:br0 --disk path=/var/lib/libvirt/images/$NAME.img,size=24 \
  7. --os-type linux --os-variant ubuntu18.04 --graphics vnc \
  8. --cdrom /ubuntu-18.04.4-server-amd64.iso
  9.  
  10. sudo virsh net-autostart --disable default
  11.  
  12. ##############################################################################
  13.  
  14. sudo virt-install \
  15. --name falcon-1 \
  16. --ram 1024 \
  17. --disk path=/var/lib/libvirt/images/falcon1.img,size=8 \
  18. --vcpus 1 \
  19. --virt-type kvm \
  20. --os-type linux \
  21. --os-variant ubuntu18.04 \
  22. --graphics none \
  23. --location "https://www.mirrorservice.org/sites/archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/" \
  24. --extra-args "console=tty0 console=ttyS0,115200n8"
RAW Paste Data