VirtFeatureVerification
Size: 5619
Comment:
|
Size: 5771
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 168: | Line 168: |
* Everything worked as expected. Maverick was very fast, Lucid was (due to a known bug) slow to save. |
* Everything worked as expected. Save is slow, a known bug which should be fixed in upstream. |
Line 172: | Line 172: |
Libvirt supports a 'save' and 'restore' command. This does work, however the problem is that this: * stops the machine * dumps a raw format dumpfile |
The Ubuntu Hypervisor stack consists of qemu-kvm and libvirt at its core. QEMU provides the userspace emulation, KVM provides the kernel acceleration, and libvirt provides an abstraction layer for applications to interface with various hypervisors at an API level.
This page is dedicated to enumerating and tracking the testing of some of the basic and advanced features of this hypervisor stack.
For basic documentation, see:
Results
QEMU Feature: Serial Console
Command line:
kvm -serial stdio
Additional setup: Add console=ttyS0 to the kernel boot parameter
Result: Serial console input/output is on stdio of the shell that launched the VM
QEMU Feature: VNC
Command line:
kvm -vnc :1
Additional setup: Run vncviewer :1 from another command prompt
Result: VM's graphical display should be in a VNC window, rather than SDL
QEMU Feature: virtio disks
Command line:
kvm -drive file=maverick.img,if=virtio,index=0,boot=on
Result: Image boots
QEMU Feature: virtio net
Command line:
kvm -net nic,virtio -net user -redir tcp:2224::22
Result: Image is able to boot and access network, and host can ssh into guest using 'ssh -p 2224 localhost'
Distributions
Fedora:
- Installed 32-bit and 64-bit fedora 13, from livecds
Debian:
- Installed 32-bit and 64-bit, from netboot cd images
CentOS 5.5:
- Boots of livecd and dvd
- Installs and boots from dvd
- Install with 'Virtualization' option installs a xen kernel
- This fails to boot
- first needs 'noapic' boot argument to get past bios 'bug'
- then appears to fail at device creation
- Note this is only for an install as virtualization host, normal install boots fine
- This fails to boot
libvirt save/restore VM
- succeeded with 0.8.1
- save takes 50 seconds, restore 1 (512M ram, 100M save image)
- QEMU_MONITOR_MIGRATE_TO_FILE_BS fix needed
libvirt+qemu hot-add
In guest:
modprobe acpiphp
On host:
'virsh attach-disk 13 --type disk /home/serge/newdisk.img --mode shareable --driver file vda
Result:
- Success (can fdisk, format, and mount new disk)
- Cannot choose index (uses next available, i.e. can't use vdb if vfa unused)
- Note there is a bug that can cause the loss of virtio NIC
- this will be fixed with 0.8.2 libvirt merge
live migration
- I created two maverick-server kvm guests (on a lucid host)
- exported /srv/export from the host to the guests over NFS
- In /srv/export, I placed a small (1G) debian.img I'd installed on the host
- On the first maverick guest, I created a d32.xml and
virsh define d32.xml virsh start d32 d=`virsh list | grep d32 | awk '{ print $1 '}` virsh migrate --live $d qemu+ssh://secondguest/session
Where secondguest is of course the name or ip address for the second guest.
Result:
- Success - the host continued perfectly on the second guest
- Caveat
- This had to be done using qemu.kvm, not the maverick package
- The maverick package has a bug (LP: #591423) which prevented
- non-kvm qemu booting (at all) in my guests.
- This means there may be other bugs in the maverick package
- preventing live migration.
- When 0.13.0 qemu is merged, that should pull in all fixes.
libvirt NAT network
- This is the default in Ubuntu libvirt setups, so it is
- always being tested. To confirm, check 'iptables -L' and 'ifconfig -a' output after installing and starting libvirt.
libvirt private network
- Created /etc/libvirt/qemu/networks/private.xml as the
- default:
cat >> /etc/libvirt/qemu/networks/private.xml << EOF <network> <name>default</name> <bridge name="virbr%d" /> <ip address="192.168.152.1" netmask="255.255.255.0"> <dhcp> <range start="192.168.152.2" end="192.168.152.254" /> </dhcp> </ip> </network> EOF d=/etc/libvirt/qemu/networks/autostart/ (cd $d; rm -f *; ln -s ../private.xml)
- default:
- Rebooted, created a VM.
- ifconfig -a shows virbr0 exists
- iptables -L shows no forwarding or NAT rules
- Starting up the VM, it can ping the host and other guests on
- the same network, but not the outside world.
save / restore
kvm
- Took an installed qcow2 VM. Created a testing clone using
qemu-img create -f qcow -b orig.img new.img
- Ran it under kvm with a monitor on stdio:
kvm -drive file=new.img,if=virtio,index=0,boot=on -m 512M -monitor stdio
- Saved one snaphost, created a file, saved another snapshot, restored the
- first snapshot, confirmed the file was gone, restored the second snapshot, confirmed the file was there.
<kvm monitor on terminal> <VM console> savevm p1 echo ab > ab savevm p2 loadvm p1 cat ab #(no such file) loadvm p2 cat ab # (shows contents of ab)
- Quit kvm, restarted with the same image, restored the second snapshot
- again
loadvm p2
- Everything worked as expected. Save is slow, a known bug which should be
- fixed in upstream.
==== libvirt ===
Libvirt supports a 'save' and 'restore' command. This does work, however the problem is that this:
- stops the machine
- dumps a raw format dumpfile
VirtFeatureVerification (last edited 2011-01-22 15:36:50 by cpe-66-69-252-85)