My experiments with hot-attaching virtio disks to eucalyptus VMs have been partially successful. I've been able to attach/detach a virtio disk to/from a VM once, but the second attach causes a kvm segfault followed by a libvirtd segfault. Removing eucalyptus from the scenario, this problem can be reproduced by passing the attach/detach/attach commands directly using virsh as follows. Note that, although i'm using an AOE device as the 'source' in the following example, the same problem exists if you replace the source dev with a local file.
root@sg:~# virsh attach-device 1 meh
Connecting to uri: qemu:///system
error: Failed to attach device from meh
error: server closed connection
[44227.486821] kvm[25947]: segfault at 8d0 ip 000000000041ccd7 sp 00007fff99644d70 error 6 in qemu-system-x86_64[400000+226000]
[44227.730408] libvirtd[25467]: segfault at 70 ip 00000000004345a2 sp 00007f5b3f5e3b70 error 4 in libvirtd[400000+77000]
Am I perhaps passing an incorrectly formatted disk XML for virtio? Versions:
Host:
root@sg:~# apt-cache policy libvirt-bin
libvirt-bin:
Installed: 0.7.0-1ubuntu10
Candidate: 0.7.0-1ubuntu10
Version table:
*** 0.7.0-1ubuntu10 0
500 http://us.archive.ubuntu.com karmic/main Packages
100 /var/lib/dpkg/status
root@sg:~# apt-cache policy qemu-kvm
qemu-kvm:
Installed: 0.11.0-0ubuntu1
Candidate: 0.11.0-0ubuntu1
Version table:
*** 0.11.0-0ubuntu1 0
500 http://us.archive.ubuntu.com karmic/main Packages
100 /var/lib/dpkg/status
root@sg:~# uname -a
Linux sg 2.6.31-12-server #41-Ubuntu SMP Wed Oct 7 20:33:27 UTC 2009 x86_64 GNU/Linux
Guest:
root@ubuntu:~# uname -a
Linux ubuntu 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:58:03 UTC 2009 x86_64 GNU/Linux
My experiments with hot-attaching virtio disks to eucalyptus VMs have been partially successful. I've been able to attach/detach a virtio disk to/from a VM once, but the second attach causes a kvm segfault followed by a libvirtd segfault. Removing eucalyptus from the scenario, this problem can be reproduced by passing the attach/ detach/ attach commands directly using virsh as follows. Note that, although i'm using an AOE device as the 'source' in the following example, the same problem exists if you replace the source dev with a local file.
root@sg:~# ps ax | grep kvm c295-523b- 97fa-b72e0a4649 7b -nographic -monitor unix:/var/ run/libvirt/ qemu/i- 3D7E06DF. monitor, server, nowait -boot c -kernel /var/lib/ eucalyptus/ instances/ admin/i- 3D7E06DF/ kernel -initrd /var/lib/ eucalyptus/ instances/ admin/i- 3D7E06DF/ ramdisk -append root=/dev/sda1 console=ttyS0 -drive file=/var/ lib/eucalyptus/ instances/ admin/i- 3D7E06D /disk,if= scsi,index= 0,boot= on -net nic,macaddr= d0:0d:3d: 7e:06:df, vlan=0, model=e1000, name=e1000. 0 -net tap,fd= 17,vlan= 0,name= tap.0 -serial file:/var/ lib/eucalyptus/ instances/ admin/i- 3D7E06DF/ console. log -parallel none -usb
25947 ? Sl 0:10 /usr/bin/kvm -S -M pc-0.11 -m 128 -smp 1 -name i-3D7E06DF -uuid 8f09357d-
root@sg:~# cat meh ><driver name='virtio' /><source dev='/dev/ etherd/ e0.7'/> <target dev='vda' bus='virtio' /></disk>
<disk type='block'
root@sg:~# virsh list ------- ------- ------- ------
Connecting to uri: qemu:///system
Id Name State
-------
1 i-3D7E06DF running
root@sg:~# virsh attach-device 1 meh
Connecting to uri: qemu:///system
Device attached successfully
root@sg:~# virsh detach-device 1 meh
Connecting to uri: qemu:///system
Device detached successfully
root@sg:~# virsh attach-device 1 meh
Connecting to uri: qemu:///system
error: Failed to attach device from meh
error: server closed connection
[44227.486821] kvm[25947]: segfault at 8d0 ip 000000000041ccd7 sp 00007fff99644d70 error 6 in qemu-system- x86_64[ 400000+ 226000] 400000+ 77000]
[44227.730408] libvirtd[25467]: segfault at 70 ip 00000000004345a2 sp 00007f5b3f5e3b70 error 4 in libvirtd[
Am I perhaps passing an incorrectly formatted disk XML for virtio? Versions:
Host: us.archive. ubuntu. com karmic/main Packages dpkg/status us.archive. ubuntu. com karmic/main Packages dpkg/status
root@sg:~# apt-cache policy libvirt-bin
libvirt-bin:
Installed: 0.7.0-1ubuntu10
Candidate: 0.7.0-1ubuntu10
Version table:
*** 0.7.0-1ubuntu10 0
500 http://
100 /var/lib/
root@sg:~# apt-cache policy qemu-kvm
qemu-kvm:
Installed: 0.11.0-0ubuntu1
Candidate: 0.11.0-0ubuntu1
Version table:
*** 0.11.0-0ubuntu1 0
500 http://
100 /var/lib/
root@sg:~# uname -a
Linux sg 2.6.31-12-server #41-Ubuntu SMP Wed Oct 7 20:33:27 UTC 2009 x86_64 GNU/Linux
Guest:
root@ubuntu:~# uname -a
Linux ubuntu 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:58:03 UTC 2009 x86_64 GNU/Linux