Description of problem: Version-Release number of selected component (if applicable): libvirt-0.6.3-33.el5_5.1 Red Hat Enterprise Linux 5.5 How reproducible: 100% Steps to Reproduce: 1. Add two virtio disks to a VM which use ide disk as root partition 2. Shutdown VM and remove the first virtio disk via virt-manager 3. Start the VM again, and the second virtio disk also disappeared. Actual results: The second virtio disk also get disappeared after removing the first one Expected results: The second one should still be accessible. Additional info:
The description for second virtio disk after removing the first one: <snip> <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/rhel5.4.img'/> <target dev='hda' bus='ide'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/rhel5.4-2.img'/> <target dev='vdb' bus='virtio'/> </disk> </snip> The command line of qemu-kvm: root 19317 1.8 5.7 729508 469012 ? Sl 21:53 0:25 /usr/libexec/qemu-kvm -S -M rhel5.4.0 -m 512 -smp 1 -name rhel5.4 -uuid d4ba624a-3acb-4f06-b0cd-3e969c940dbc -no-kvm-pit-reinjection -monitor pty -pidfile /var/run/libvirt/qemu//rhel5.4.pid -boot c -drive file=/rhiso/rhel5/u4/server/x86_64/rhel-server-5.4-x86_64-dvd.iso,if=ide,media=cdrom,index=2 -drive file=/var/lib/libvirt/images/rhel5.4.img,if=ide,index=0,boot=on,format=raw -drive file=/var/lib/libvirt/images/rhel5.4-2.img,if=virtio,index=1,format=raw -net nic,macaddr=54:52:00:68:f3:c2,vlan=0 -net tap,fd=21,script=,vlan=0,ifname=vnet3 -serial pty -parallel none -usb -vnc 127.0.0.1:2 -k en-us -soundhw ac97 The index of the second image is still 1, even if index 0 is not used. But qemu-kvm assume that all virtio disks begin from index 0, so the second image can't get a chance to be added to the guest. /* Add virtio block devices */ if (pci_enabled) { int index; int unit_id = 0; while ((index = drive_get_index(IF_VIRTIO, 0, unit_id)) != -1) { virtio_blk_init(pci_bus, drives_table[index].bdrv); unit_id++; } } We can manually change "<target dev='vdb' bus='virtio'/>" into "<target dev='vda' bus='virtio'/>" via "virsh edit" to workaround this issue. This issue doesn't exsit on FC13, so it seems it will be fixed automatically after rebase in RHEL5.6
yes I hope to have this fixed as part of the rebase, thanks ! Daniel
Fixed in libvirt-0.8.2-1.el5
Verified this bug on RHEL5.6-Server-20100930.0-x86_64-kvm - kernel-2.6.18-225.el5 - kvm-83-200.el5 - libvirt-0.8.2-6.el5 Test steps: 1. Add two virtio disks to a VM which use ide disk as root partition 2. Shutdown VM and remove the first virtio disk via virt-manager 3. Start the VM again Actual result: The second virtio disk still appear in guest Note: No need verify this bug on xen as virtio disk is not supported by xen
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2011-0060.html