First, build and install your Guest OS but make sure it is SHUTDOWN.
Second, create a raw file from you qcow os file:
Code: Select all
qemu-img convert /path/to/image.qcow2 -O raw /path/to/save/disk0.raw
Third, go into webmin and click on Logical Volume Management under Hardware:
Create a new logical volume, specifying the size to be exactly or greater than the disk0.raw file size.
Once this is created
Code: Select all
dd if=/path/to/your/saved/disk0.raw of=/dev/<your volume group>/<new logical volume>
/etc/libvirt/qemu/vm1.xml
Edit the lines:
Code: Select all
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/vm2/tmpbAUtxu.qcow2'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
Code: Select all
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/<your volume group>/<new logical volume>'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
Code: Select all
define /etc/libvirt/qemu/your_meta.xml