Wang David
2010-Apr-20 00:31 UTC
[libvirt-users] Need help using libvirt with qcow2 delta and base images
Hi, I am having trouble configuring a virtual machine domain and its corresponding xml definition to use a qcow2 delta disk. The delta disk is backed by a qcow2 base disk. I am able to successfully start the guest OS with the delta disk at the command line using qemu. However, I am not able to start the guest OS using the libvirt tools including virsh and virt-manager. I am hoping that someone knows how to configure a virtual machine domain that works with a qcow2 delta disk, and have it managed by the virt-family tools. First, I create a delta and base disk from a raw image file with the following commands: qemu-img convert ubuntu910server64.img -O qcow2 ubuntu910server64_base.qcow2 qemu-img create -b ubuntu910server64_base.qcow2 -f qcow2 ubuntu910server64_delta.qcow2 Then, I can successfully start the guest OS on the command line with qemu-system-x86_64 -m 256 -hda ubuntu910server64_delta.qcow2 My attempt to modify the virtual machine domain configuration fails. Here are my steps: -- Edit the configuration # virsh edit ubuntu910server64 -- Replace some lines <disk type='file' device='disk'> - <source file='/var/lib/libvirt/images/ubuntu910server64.img'/> - <target dev='vda' bus='virtio'/> + <source file='/var/lib/libvirt/images/ubuntu910server64_delta.qcow2'/> + <target dev='hda' bus='ide'/> </disk> -- Attempt to start the machine # virsh start ubuntu910server64 Connecting to uri: qemu:///system error: Failed to start domain ubuntu910server64 error: internal error unable to start guest: qemu: could not open disk image /var/lib/libvirt/images/ubuntu910server64_delta.qcow2 If I have posted this to the wrong forum, please direct me to the right location. Thanks! -dave -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20100419/a89f2fc3/attachment.htm>
jeremy avnet
2010-Apr-20 14:57 UTC
[libvirt-users] Need help using libvirt with qcow2 delta and base images
On Mon, Apr 19, 2010 at 5:31 PM, Wang David <David_Wang at prn.com> wrote:> - <target dev='vda' bus='virtio'/> > > + <target dev='hda' bus='ide'/> >Why are you changing this? Unless you've gone through extra steps to configure your guest OS to use this different driver and location of the boot disk, it's going to fail to boot. Perhaps try leaving this line unchanged and see how that goes. From the VM's perspective, the copy-on-write image (delta) is no different than the backing store. .:. jeremy -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20100420/19fbf6a4/attachment.htm>
Maybe Matching Threads
- libguestfs fails on FreeBSD9.3, MINIX3 qcow2 images
- Cannot create qcow2 images with libvirt 0.8.1
- xl fail to create PV guest with qcow/qcow2 disk images
- Re: libvirt live migration, qcow2 image, nbd server
- a problem with using qcow2 format image files as virtual disks