Posts List

Nested Virtualization in Centos 6

In the course of testing our puppet manifests with beaker I came across the necessity to run KVM virtual machines inside KVM guests. Normally this has a severe performance penalty as the CPUs need to be fully emulated and cannot take advantage of performance enhancing CPU instructions. Several years ago Intel and AMD added functionality which basically enables CPU instruction passthrough to the guests to get around this limitation. You can see these extensions on a host CPU in /proc/cpuinfo

KVM Serial console and VNC console

Configuration for libvirt to get serial and graphics working at the same time: virt-install \ --name centos6_golden \ --ram 2048 \ --arch x86_64 \ --vcpus 4 \ --disk path=/var/lib/libvirt/images/centos6_golden.disk,format=qcow2,sparse=true,size=24,bus=virtio \ --location \ --hvm \ --accelerate \ --nographics \ --os-type linux \ --os-variant virtio26 \ --extra-args 'acpi=force noipv6 console=tty0 console=ttyS0,115200 ks= ksdevice=52:54:00:A8:7A:0A ip= gateway= netmask= dns= ' \ --network bridge:br250 \ --mac 52:54:00:A8:7A:0A Serial console in GRUB: serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1 terminal --timeout=15 serial console Change the kernel command line to attach ttys in the right spots.