[libvirt-users] Need help using libvirt with qcow2 delta and base images

Wang David David_Wang at prn.com
Tue Apr 20 00:31:51 UTC 2010


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>


More information about the libvirt-users mailing list