I tried the cloning feature of virt-manager. First I created a VM with qcow2 disk and installed Ubuntu on it. Then I shutdown the VM and created a clone of it. The clone was successfully created, but the configuration of the disk is invalid. The disk type in the cloned VM is raw, not qcow2. The actual format of the cloned disk image is qcow2, only the config is wrong. After changing the type of the disk back to qcow2, the cloned VM can see the disk just fine.
Here's the libvirt XML config snippet for the disk on the VM to be cloned:
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/test.img'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>
And the same config for the clone VM before fixing the type manually:
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/test-clone.img'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>
I tried the cloning feature of virt-manager. First I created a VM with qcow2 disk and installed Ubuntu on it. Then I shutdown the VM and created a clone of it. The clone was successfully created, but the configuration of the disk is invalid. The disk type in the cloned VM is raw, not qcow2. The actual format of the cloned disk image is qcow2, only the config is wrong. After changing the type of the disk back to qcow2, the cloned VM can see the disk just fine.
Here's the libvirt XML config snippet for the disk on the VM to be cloned: var/lib/ libvirt/ images/ test.img' />
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>
And the same config for the clone VM before fixing the type manually: var/lib/ libvirt/ images/ test-clone. img'/>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>
ProblemType: Bug ature: Ubuntu 3.2.0-18.29-generic 3.2.9 dules: nvidia ture: all
DistroRelease: Ubuntu 12.04
Package: virt-manager 0.9.1-1ubuntu2
ProcVersionSign
Uname: Linux 3.2.0-18-generic x86_64
NonfreeKernelMo
ApportVersion: 1.94.1-0ubuntu2
Architecture: amd64
Date: Tue Mar 13 12:54:01 2012
PackageArchitec
ProcEnviron:
TERM=xterm
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: virt-manager
UpgradeStatus: No upgrade log present (probably fresh install)