Hi. I'm running 12.04 LTS. I created some virtual machines using vmbuilder, and then migrated those from their .qcow files to lvm. However, those virtual machines are still using disk type "file":
Now I've noticed that this disk should probably have type "block" - using this is supposed to provide superior performance. It would also make Berteaud's virt-backup script happy and willing to snapshot the lvm making the backup very quick. So I tried setting up the disk like this:
I had to edit fstab to look for the disk on vda instead of hda but it came up. However performance was terrible. It seemed like it was going to lock up, although it never did.
So my questions are:
1. How should I be setting up my LVM-based virtual machines to use virtio block devices ?
and
2. Is there any way to get vmbuilder to do this for me? The documentation refers to vmbuilder config files, but seems to have been thrice abandoned, leaving nothing to find.
Code:
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/dev/vg1/lvname'/>
<target dev='hda' bus='ide'/>
<alias name='ide0-0-0'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>Code:
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/vg1/lvname'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>So my questions are:
1. How should I be setting up my LVM-based virtual machines to use virtio block devices ?
and
2. Is there any way to get vmbuilder to do this for me? The documentation refers to vmbuilder config files, but seems to have been thrice abandoned, leaving nothing to find.