KVM
KVM🔗
Check CPU virtualisation support
1 2 3 |
|
Config and Management🔗
Cumbersome directly, but tools exist to help
- libvirt: command line tool
- GUI: GNOME Boxes, …
Quick-start🔗
Following RedHat guide
- confirm CPU virtualisation:
sudo grep -E 'svm|vmx' /proc/cpuinfo
- obtain image, e.g. from OpenStack image guide
-
customisee VM
1 2 3 4 5 6 7
virt-customize \ -a /var/lib/libvirt/images/imagetest1.qcow2 \ --hostname vmlab01 \ --root-password password:rootpw \ --ssh-inject 'root:file:labkey.pub' \ --uninstall cloud-init \ --selinux-relabel
-
install VM (requires active network1)
1 2 3 4 5 6 7 8
virt-install \ --name vmlab01 \ --memory 1024 \ --vcpus 1 \ --disk /var/lib/libvirt/images/image.qcow2 \ --import \ --os-type linux --os-variant generic \ --noautoconsole
-
access VM
1 2
virsh domifaddr vmlab01 ssh -i labkey root@192.168.122.76
References🔗
-
error
network ... not active
:↩1 2 3 4
# virsh net-list --all virsh net-start default # start at boot virsh net-autostart default