Cannot migrate a VM from Ubuntu 9.04 to Ubuntu 10.04.1 LTS

Bug #691609 reported by Rajkumar S
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Hi bug masters,

I have a Ubuntu 9.04 server running virtualization with many guests. The guests are defined by an xml file (attached) in /etc/libvirt/qemu and started by virsh start "domain name". The guests are using a qcow2 type disks. I want to upgrade this server to Ubuntu 10.04.1 LTS and to test if all my guests can be safely migrated over to new server I have installed lucid in a similar server and copied over the disk image and config xml. I created the domain using virsh create "domain xml file" (after making changes to IP address, mac address and source file location). When I start the VM using virsh start "domain name" I get an error in the vnc console (screen shot attached).

The disk image I copied from old server is running fine in that server. I have also tried with another disk image, in case the first image is corrupted, and result is the same.

Actual kvm command in the new server (lucid) is as follows:

/usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 256 -smp 1 -name a1.6-q2 -uuid 9f58079c-057f-5726-4daa-3d30888d7bbe -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/a1.6-q2.monitor,server,nowait -monitor chardev:monitor -localtime -boot c -drive file=/var/kvm/a1.6-q2.img,if=ide,index=0,boot=on,format=raw -net nic,macaddr=52:54:00:13:34:42,vlan=0,name=nic.0 -net tap,fd=42,vlan=0,name=tap.0 -chardev pty,id=serial0 -serial chardev:serial0 -parallel none -usb -vnc 192.168.3.7:42 -vga cirrus

In old server (jaunty):

/usr/bin/kvm -S -M pc -m 384 -smp 1 -name alex2 -uuid 4c949839-9c2d-6c31-8bfb-1b0b0504f92e -monitor pty -pidfile /var/run/libvirt/qemu//alex2.pid -localtime -boot c -drive file=/usr/local/var/kvm/alex2.img,if=ide,index=0,boot=on -net nic,macaddr=52:54:00:12:34:49,vlan=0 -net tap,fd=28,script=,vlan=0,ifname=vnet6 -serial pty -parallel none -usb -vnc 192.168.3.3:49

One difference I noted was that the -drive option has an extra argument "format=raw" which looks odd because the image I am using is qcow2 in format.

Running the kvm command line directly from console in new server resulted in the following error:

/usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 256 -smp 1 -name a1.6-q2 -uuid 9f58079c-057f-5726-4daa-3d30888d7bbe -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/a1.6-q2.monitor,server,nowait -monitor chardev:monitor -localtime -boot c -drive file=/var/kvm/a1.6-q2.img,if=ide,index=0,boot=on -net nic,macaddr=52:54:00:13:34:42,vlan=0,name=nic.0 -net tap,fd=42,vlan=0,name=tap.0 -chardev pty,id=serial0 -serial chardev:serial0 -parallel none -usb -vnc 192.168.3.7:42 -vga cirrus
char device redirected to /dev/pts/4
TUNGETIFF ioctl() failed: Bad file descriptor
TUNSETOFFLOAD ioctl() failed: Bad file descriptor
pci_add_option_rom: failed to find romfile "pxe-rtl8139.bin"

So I could not test with "format=qcow2" in -drive option.

Pl let me know if any further information is required to traig this issue.

with regards,

raj

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

Thanks for reporting this bug and helping to make Ubuntu better.

Could you give the output of
 qemu-img info /var/kvm/a1.6-q2.img

Do you know if that file happens to be virtio?

What output do you see if you do:

kvm -m 384 -monitor stdio -localtime -drive file=/var/kvm/a1.6-q2.img,if=ide,index=0,boot=on -serial pty -parallel none -usb -vnc 192.168.3.3:49

Changed in libvirt (Ubuntu):
status: New → Incomplete
importance: Undecided → Medium
Revision history for this message
Rajkumar S (rajkumars) wrote :

root@redbull:~# qemu-img info /var/kvm/a1.6-q2.img
image: /var/kvm/a1.6-q2.img
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 2.0G
cluster_size: 4096

Revision history for this message
Rajkumar S (rajkumars) wrote :

root@redbull:~# kvm -m 384 -monitor stdio -localtime -drive file=/var/kvm/a1.6-q2.img,if=ide,index=0,boot=on -serial pty -parallel none -usb -vnc 192.168.3.7:49
char device redirected to /dev/pts/4
pci_add_option_rom: failed to find romfile "pxe-rtl8139.bin"
QEMU 0.12.3 monitor - type 'help' for more information
(qemu)

Revision history for this message
Rajkumar S (rajkumars) wrote :

Hi Serge,

Thanks for your reply.

With the kvm command you have provided the guest booted fine. I can login to the guest with out any issues, though the network does not seems to be working. But I guess the command you have provided do not enable networking for the guest.

Thanks again and I will be happy to do additional debugging/provide more information if required.

with regards,

raj

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

Thanks, yeah there were several changes thrown into that command
at once, so now we want to try putting them back in one at a
time.

Could you try the following three:

kvm -m 384 -monitor pty -localtime -drive file=/var/kvm/a1.6-q2.img,if=ide,index=0,boot=on -serial pty -parallel none -usb -vnc 192.168.3.3:49

kvm -m 384 -monitor stdio -localtime -drive file=/var/kvm/a1.6-q2.img,if=ide,index=0,boot=on -serial pty -parallel none -usb -vnc 192.168.3.3:49 -boot c

kvm -m 384 -monitor stdio -localtime -drive file=/var/kvm/a1.6-q2.img,if=ide,index=0,boot=on -serial pty -parallel none -usb -vnc 192.168.3.3:49 -net nic,vlan=0 -net tap,script=,vlan=0,ifname=vnet6

Actually, do you have the uml-utilities package installed?

Revision history for this message
Rajkumar S (rajkumars) wrote :

root@redbull:~# kvm -m 384 -monitor pty -localtime -drive file=/var/kvm/a1.6-q2.img,if=ide,index=0,boot=on -serial pty -parallel none -usb -vnc 192.168.3.7:49
char device redirected to /dev/pts/4
char device redirected to /dev/pts/7
pci_add_option_rom: failed to find romfile "pxe-rtl8139.bin"

result: guest booting.

Revision history for this message
Rajkumar S (rajkumars) wrote :

root@redbull:~# kvm -m 384 -monitor stdio -localtime -drive file=/var/kvm/a1.6-q2.img,if=ide,index=0,boot=on -serial pty -parallel none -usb -vnc 192.168.3.7:49 -boot c
char device redirected to /dev/pts/4
pci_add_option_rom: failed to find romfile "pxe-rtl8139.bin"
QEMU 0.12.3 monitor - type 'help' for more information
(qemu)

result: guest booting

Revision history for this message
Rajkumar S (rajkumars) wrote :

root@redbull:~# kvm -m 384 -monitor stdio -localtime -drive file=/var/kvm2.img,if=ide,index=0,boot=on -serial pty -parallel none -usb -vnc 192.168.3.7:49 -net nic,vlan=0 -net tap,script=,vlan=0,ifname=vnet6
char device redirected to /dev/pts/4
pci_add_option_rom: failed to find romfile "pxe-rtl8139.bin"
QEMU 0.12.3 monitor - type 'help' for more information
(qemu)

result: guest booting, no network though. cannot even ping the host.

Revision history for this message
Rajkumar S (rajkumars) wrote :

root@redbull:~# aptitude search uml-utilities
p uml-utilities - User-mode Linux (utility programs)

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 691609] Re: Cannot migrate a VM from Ubuntu 9.04 to Ubuntu 10.04.1 LTS

Quoting Rajkumar S (<email address hidden>):
> root@redbull:~# aptitude search uml-utilities
> p uml-utilities - User-mode Linux (utility programs)

Please install it, and then check whether libvirt is able to
start the guest with no other modifications.

If so, then we'll need to consider whether libvirt needs to
be able to produce a more meaningful error message, or whether
uml-utilities should be a Depends.

Revision history for this message
Rajkumar S (rajkumars) wrote :

Hi,

Installed uml-utilities and started the guest using the following command:

virsh start a1.6-q2

But get the same error as before "No Bootable Disk", the guest does not start.

btw, the current kvm command line is:

/usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 256 -smp 1
-name a1.6-q2 -uuid 9f58079c-057f-5726-4daa-3d30888d7bbe -chardev socket,id=moni
tor,path=/var/lib/libvirt/qemu/a1.6-q2.monitor,server,nowait -monitor chardev:mo
nitor -localtime -boot c -drive file=/var/kvm/a1.6-q2.img,if=ide,index=0,boot=on
,format=raw -net nic,macaddr=52:54:00:13:34:42,vlan=0,name=nic.0 -net tap,fd=42,
vlan=0,name=tap.0 -chardev pty,id=serial0 -serial chardev:serial0 -parallel none
 -usb -vnc 192.168.3.7:42 -vga cirrus

thanks and regards,

raj

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

Could you give the contents of /var/log/libvirt/qemu/a1.6-q2.log
(or whatever files you find under /var/log/libvirt/qemu)

Revision history for this message
Rajkumar S (rajkumars) wrote :

Hi,

There are only logs related to a1.6-q2 and another guest I tried initially in the /var/log/libvirt/qemu/. I am attaching /var/log/libvirt/qemu/a1.6-q2.log in the bug report.

raj

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

As you'd observed from the start, I suspect we need to drop the 'format=raw'
from the command. Please add the following to the disk definition in your
.xml file (i.e. virsh edit a1.6-q2.log):

      <driver name='qemu' type='qcow2'/>

So the whole disk definition will probably look like:

<disk type="file" device="disk">
 <source file="/var/kvm/a1.6-q2.img"/>
 <driver name='qemu' type='qcow2'/>
 <target dev="hda" bus="ide"/>
</disk>

Revision history for this message
Rajkumar S (rajkumars) wrote :
Download full text (3.9 KiB)

Hi,

That did the trick! Thanks!
The guest has been correctly started and network is working fine.

raj

On Tue, Dec 21, 2010 at 7:36 PM, Serge Hallyn <email address hidden> wrote:
> As you'd observed from the start, I suspect we need to drop the 'format=raw'
> from the command.  Please add the following to the disk definition in your
> .xml file (i.e. virsh edit a1.6-q2.log):
>
>      <driver name='qemu' type='qcow2'/>
>
> So the whole disk definition will probably look like:
>
> <disk type="file" device="disk">
>        <source file="/var/kvm/a1.6-q2.img"/>
>        <driver name='qemu' type='qcow2'/>
>        <target dev="hda" bus="ide"/>
> </disk>
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/691609
>
> Title:
>  Cannot migrate a VM from Ubuntu 9.04 to Ubuntu 10.04.1 LTS
>
> Status in “libvirt” package in Ubuntu:
>  Incomplete
>
> Bug description:
>  Hi bug masters,
>
> I have a Ubuntu 9.04 server running virtualization with many guests. The guests are defined by an xml file (attached) in /etc/libvirt/qemu and started by virsh  start  "domain name". The guests are using a qcow2 type disks. I want to upgrade this server to Ubuntu 10.04.1 LTS and to test if all my guests can be safely migrated over to new server I have installed lucid in a similar server and copied over the disk image and config xml. I created the domain using virsh create "domain xml file" (after making changes to IP address, mac address and source file location). When I start the VM using virsh  start  "domain name" I get an error in the vnc console (screen shot attached).
>
> The disk image I copied from old server is running fine in that server. I have also tried with another disk image, in case the first image is corrupted, and result is the same.
>
> Actual kvm command in the new server (lucid) is as follows:
>
> /usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 256 -smp 1 -name a1.6-q2 -uuid 9f58079c-057f-5726-4daa-3d30888d7bbe -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/a1.6-q2.monitor,server,nowait -monitor chardev:monitor -localtime -boot c -drive file=/var/kvm/a1.6-q2.img,if=ide,index=0,boot=on,format=raw -net nic,macaddr=52:54:00:13:34:42,vlan=0,name=nic.0 -net tap,fd=42,vlan=0,name=tap.0 -chardev pty,id=serial0 -serial chardev:serial0 -parallel none -usb -vnc 192.168.3.7:42 -vga cirrus
>
> In old server (jaunty):
>
> /usr/bin/kvm -S -M pc -m 384 -smp 1 -name alex2 -uuid 4c949839-9c2d-6c31-8bfb-1b0b0504f92e -monitor pty -pidfile /var/run/libvirt/qemu//alex2.pid -localtime -boot c -drive file=/usr/local/var/kvm/alex2.img,if=ide,index=0,boot=on -net nic,macaddr=52:54:00:12:34:49,vlan=0 -net tap,fd=28,script=,vlan=0,ifname=vnet6 -serial pty -parallel none -usb -vnc 192.168.3.3:49
>
> One difference I noted was that the -drive option has an extra argument "format=raw" which looks odd because the image I am using is qcow2 in format.
>
> Running the kvm command line directly from console in new server resulted in the following error:
>
> /usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 256 -smp 1 -name a1.6-q2 -uuid 9f58079c-057f-5726-4daa-3d30888d7bbe -chardev socket,id=monitor,path=/var...

Read more...

Revision history for this message
Rajkumar S (rajkumars) wrote :

The new command is:

/usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 256 -smp 1 -name a1.6-q2
-uuid 9f58079c-057f-5726-4daa-3d30888d7bbe -chardev
socket,id=monitor,path=/var/lib/libvirt/qemu/a1.6-q2.monitor,server,nowait
-monitor chardev:monitor -localtime -boot c -drive
file=/var/kvm/a1.6-q2.img,if=ide,index=0,boot=on,format=qcow2 -net
nic,macaddr=52:54:00:13:34:42,vlan=0,name=nic.0 -net
tap,fd=42,vlan=0,name=tap.0 -chardev pty,id=serial0 -serial
chardev:serial0 -parallel none -usb -vnc 192.168.3.7:42 -vga cirrus

raj

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

So we should consider whether some action ought to be taken
to help automate configuration file conversion. Though I'd
fear that we'd be more likely to do more damage than good.

I'm going to mark this bug 'Invalid', because no fix in the source
was applied. Note however that I do consider it a bug for a
configuration file to become invalid in a new version.

Changed in libvirt (Ubuntu):
status: Incomplete → Invalid
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.