Upgrade Libvirt up to 0.9.1 generates new bug with Virt-Manager

Bug #795427 reported by Boris Derzhavets
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
virtinst (Ubuntu)
New
Undecided
Unassigned

Bug Description

Upgrade Libvirt up to 0.9.1 on Oneiric generates new bug with Virt-Manager.
It becomes impossible to install new guest say on /dev/sda7, if currently /dev/sda7 contains some bootable image.
Virt-Manager always loads from disk, ignoring attached installation CD

description: updated
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Thanks for reporting this issue. Could you please give exact steps to reproduce it? Thanks!

Revision history for this message
Boris Derzhavets (bderzhavets) wrote : Re: [Bug 795427] Re: Upgrade Libvirt up to 0.9.1 generates new bug with Virt-Manager

1. Install  Oneiric Alpha 1 + ubuntu-virt-server + virt-manager
     Create network bridge for KVM guests manually.
2. Run
 # apt-get update
 # apt-get upgrade

It should result upgrade Libvirt up to 0.9.1 in meantime.

3.Create block device - say /dev/sdb7 and install VF15 KVM guest on /dev/sdb7.
Remove  VF15 via virt-manager.

4. Try same install again with Natty as guest ( for example ) on /dev/sdb7.
     Virt-manager should load VF15 from device /dev/sdb7 instead of loading  from CD
     as usual.

That's my experience since trying DNLJ Virtualization PPA on Oneiric.
 If i will create ext4fs on /dev/sdb7 before second attempt with Natty,
 everything is going to be fine.

Boris.

--- On Fri, 6/10/11, Marc Deslauriers <email address hidden> wrote:

From: Marc Deslauriers <email address hidden>
Subject: [Bug 795427] Re: Upgrade Libvirt up to 0.9.1 generates new bug with Virt-Manager
To: <email address hidden>
Date: Friday, June 10, 2011, 9:39 AM

Thanks for reporting this issue. Could you please give exact steps to
reproduce it? Thanks!

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/795427

Title:
  Upgrade Libvirt up to 0.9.1 generates new bug with Virt-Manager

Status in “libvirt” package in Ubuntu:
  New

Bug description:
  Upgrade Libvirt up to 0.9.1 on Oneiric generates new bug with Virt-Manager.
  It becomes  impossible to install new guest say on /dev/sda7, if currently /dev/sda7 contains some bootable image.
  Virt-Manager always loads from disk, ignoring attached installation CD

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/795427/+subscriptions

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

1. Install Oneiric Alpha 1 + ubuntu-virt-server + virt-manager
     Create network bridge for KVM guests manually.
2. Run
 # apt-get update
 # apt-get upgrade

It should result upgrade Libvirt up to 0.9.1 in meantime.

3.Create block device - say /dev/sdb7 and install VF15 KVM guest on /dev/sdb7.
Remove VF15 via virt-manager.

4. Try same install again with Natty as guest ( for example ) on /dev/sdb7.
     Virt-manager should load VF15 from device /dev/sdb7 instead of loading from CD
     as usual.

That's my experience since trying DNLJ Virtualization PPA on Oneiric.
 If i will create ext4fs on /dev/sdb7 before second attempt with Natty,
 everything is going to be fine.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

@Mark,

Attached tarball have been applied to virt-manager on F15 in meantime :-
[root@fedora15b SOURCES]# ls -l
total 1884
-rw-rw-r--. 1 root root 1879504 Mar 29 00:10 virt-manager-0.8.7.tar.gz
-rw-r--r--. 1 root root 509 Apr 19 18:36 virt-manager-fix-broken-cspo.patch
-rw-r--r--. 1 root root 1290 Apr 19 18:36 virt-manager-fix-config-options.patch
-rw-r--r--. 1 root root 765 Apr 19 18:36 virt-manager-fix-hotplug-fallback.patch
-rw-r--r--. 1 root root 1588 Jun 12 23:47 virt-manager-gconf-after-fork.patch
-rw-r--r--. 1 root root 6341 Jun 12 23:49 virt-manager.patches.tar.gz
-rw-r--r--. 1 root root 22884 Apr 19 18:36 virt-manager-spicevmc.patch

I believe , the last one is the most important and might be connected to others.
Patching qemu-kvm to support spice channel is to be going my concern.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Typo:-
... is going to be my concern

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

When you create the second VM (Natty) while reusing the same disk as the old F15 installation, what are the settings in the "Boot Option" screen set to?

Also, the patches Fedora carry have nothing to do with your issue.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

1. By default flag appears not to be set at all.
     I tried to check CDROM as first . It doesn't help.
2. Absence spicevmc patches is not connected to issue,
    but VM functionality is affected . Please , take a look
    how VM & VIRTINST stuff is done on Fedora 15.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Please, view also https://wiki.edubuntu.org/spice (5) . If needed i'll file second this issue as separate bug.
Due serious of disadvantage which it causes.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@Boris,

I'm sorry, it's not clear to me what the actual bug is. In comment #2, step 4 doesn't appear to make sense. Could you please explain again how i can reproduce this and what to expect, using unmodified oneiric packages?

---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Changed in libvirt (Ubuntu):
status: New → Incomplete
Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

4. Try same install again with Natty as guest ( for example ) on /dev/sdb7.
     Virt-manager instead of loading from CD as usual will load from bootable device,
     which is actually supposed to be overwritten.

     If i will previously format as ext4fs /dev/sdb7 or it is initially clean everything will be going as expected.
     Something is broken in order of testing devices before start installation in virt-manager and in virt-install also.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Quoting Boris Derzhavets (<email address hidden>):
> 4. Try same install again with Natty as guest ( for example ) on /dev/sdb7.
> Virt-manager instead of loading from CD as usual will load from bootable device,
> which is actually supposed to be overwritten.
>
> If i will previously format as ext4fs /dev/sdb7 or it is initially clean everything will be going as expected.
> Something is broken in order of testing devices before start installation in virt-manager and in virt-install also.

I see, thanks. So the problem seems to be that the use of '-boot once=d' is
not appropriately being honored.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I can't reproduce this in a oneiric vm, using /dev/vdb with lucid as the preinstalled guest. Can you show the /proc/$$/cmdline of the kvm process started by libvirt, as well as 'virsh dumpxml n' where n is the id of the running domain, when you are booting the VM the second time, and expecting to see it boot from cd but seeing it boot from hard disk?

(It's possible that /dev/vdb1 versus /dev/vdb might make a difference, or more likely that ide will make the difference)
---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :
Download full text (6.0 KiB)

************************************************
On fresh alpha1 + (apt-get update;apt-get upgrade)
************************************************
100 % reproducible on vda device /dev/sdb5

F15 guest installed first on /dev/sdb5 . Removed via VM.
Attempt to to install Natty on same /dev/sdb5 via VM
loads old instance of F15.

root@boris-System-P5Q3:~# ps -ef | grep kvm
root 3242 2 0 12:28 ? 00:00:00 [kvm-irqfd-clean]
113 8367 1 9 13:18 ? 00:00:29 /usr/bin/kvm -S -M pc-0.14 -enable-kvm -m 1024 -smp 2,sockets=2,cores=1,threads=1 -name Natty -uuid a79f051c-b5b9-1180-82a0-c7b364e3df72 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/Natty.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=readline -rtc base=utc -no-reboot -boot dc -drive file=/dev/sdb5,if=none,id=drive-virtio-disk0,boot=on,format=raw -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0 -drive file=/mnt/home/boris/UbuntuDesk11.04.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=18,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:00:09:cc,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -usb -vnc 127.0.0.1:0 -vga cirrus -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
root 8375 2 0 13:18 ? 00:00:00 [kvm-pit-wq]
root 8785 5455 0 13:23 pts/1 00:00:00 grep --color=auto kvm
root@boris-System-P5Q3:~# cd /proc/8367
root@boris-System-P5Q3:/proc/8367# ls
attr cmdline environ latency mountinfo oom_adj root stack task
autogroup comm exe limits mounts oom_score sched stat wchan
auxv coredump_filter fd loginuid mountstats oom_score_adj schedstat statm
cgroup cpuset fdinfo maps net pagemap sessionid status
clear_refs cwd io mem numa_maps personality smaps syscall
root@boris-System-P5Q3:/proc/8367# cat cmdline
/usr/bin/kvm-S-Mpc-0.14-enable-kvm-m1024-smp2,sockets=2,cores=1,threads=1-nameNatty-uuida79f051c-b5b9-1180-82a0-c7b364e3df72-nodefconfig-nodefaults-chardevsocket,id=charmonitor,path=/var/lib/libvirt/qemu/Natty.monitor,server,nowait-monchardev=charmonitor,id=monitor,mode=readline-rtcbase=utc-no-reboot-bootdc-drivefile=/dev/sdb5,if=none,id=drive-virtio-disk0,boot=on,format=raw-devicevirtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0-drivefile=/mnt/home/boris/UbuntuDesk11.04.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw-deviceide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0-netdevtap,fd=18,id=hostnet0-devicevirtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:00:09:cc,bus=pci.0,addr=0x3-chardevpty,id=charserial0-deviceisa-serial,chardev=charserial0,id=serial0-usb-vnc127.0.0.1:0-vgacirrus-deviceintel-hda,id=sound0,bus=pci.0,addr=0x4-devicehda-duplex,id=soun...

Read more...

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

virt-install --connect qemu:///system \
--virt-type kvm \
--os-type=linux --os-variant=ubuntunatty \
--name Natty1 --ram 2048 \
--disk path=/dev/sdb5 \
--cdrom /mnt/home/boris/UbuntuDesk11.04.iso \
--vcpus 2

View attachment.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

From my standpoint bug is virtinst or python-libvirt. It has nothing to do with virt-manager

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Typo
I believe bug is in virtinst or python-libvirt.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Due to at the same time i can reinstall on /dev/sdb5 via :-
root@boris-System-P5Q3:~# /usr/bin/kvm -cpu host -enable-kvm \
> -name Ubuntu11.04 -m 2048 \
> -drive file=/dev/sdb5,if=virtio,media=disk,aio=native,cache=off \
> -net nic,model=rtl8139 -net user -localtime \
> -usb -vnc 0.0.0.0:1 \
> -cdrom /mnt/home/boris/UbuntuDesk11.04.iso -boot d
kvm: pci_add_option_rom: failed to find romfile "pxe-rtl8139.rom"

VNC console comes up fiine.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@Boris,

Please describe in great detail how you delete the old and create the new VM, as I can't reproduce.

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Install F15 :

virt-install --connect qemu:///system \
--virt-type kvm \
--os-type=linux --os-variant=fedora15 \
--name VF15 --ram 2048 \
--disk path=/dev/sdb5 \
--cdrom /mnt/home/boris/F15.iso \
--vcpus 2

Remove via VM - right click and choose delete.
or virsh delete VF15.

So /dev/sdb5 still contains bootable F15 image.

Then try :-

virt-install --connect qemu:///system \
--virt-type kvm \
--os-type=linux --os-variant=ubuntunatty \
--name Natty1 --ram 2048 \
--disk path=/dev/sdb5 \
--cdrom /mnt/home/boris/UbuntuDesk11.04.iso \
--vcpus 2

If it works for you then fine. It's my problem.
BTW. I got the same issue on daily build 06/21/11

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Ah, virt-install. I'll try with that, thanks.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I'm sorry, I still can't reproduce this.

Changed in libvirt (Ubuntu):
status: Incomplete → New
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

(Setting state to New as we're not awaiting any response right now)

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Strange, i still need
boris@boris-System-P5Q3:~$ sudo dd if=/dev/zero of=/dev/sdb5 bs=10M count=10
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 11.9136 s, 90.1 MB/s

To crash bootloader on /dev/vda

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Disregard bytes counted
boris@boris-System-P5Q3:~$ sudo dd if=/dev/zero of=/dev/sdb6 bs=10M count=10
[sudo] password for boris:
10+0 records in
10+0 records out
104857600 bytes (105 MB) copied, 1.24066 s, 84.5 MB/s

That's enough to proceed for me.

affects: libvirt (Ubuntu) → virtinst (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.