Frank Hauptle
2011-Nov-15 03:45 UTC
[libvirt-users] kvm/libvirt can't use vmdk files? qemu: 'vmdk' invalid format
Hi all,
I have a RHEL6.1 qemu-kvm hypervisor running a raw image that I need
for various reasons to convert to vmdk.
I used this process:
qemu-img convert server3.img -O vmdk server3.vmdk
Then I edited the XML file (/etc/libvirt/qemu/server3.xml) like so:
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='vmdk'/>
<source file='/raid5/images/guilder3.vmdk'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0'
unit='0'/>
</disk>
Which basically means that I changed raw to vmdk in this line:
<driver name='qemu' type='vmdk'/>
but when I try to start the VM, I get this:
Error starting domain: internal error Process exited while reading
console log output: char device redirected to /dev/pts/5
qemu: 'vmdk' invalid format
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 45, in
cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/engine.py", line 959, in
asyncfunc
vm.startup()
File "/usr/share/virt-manager/virtManager/domain.py", line 1128, in
startup
self._backend.create()
File "/usr/lib64/python2.7/site-packages/libvirt.py", line 330, in
create
if ret == -1: raise libvirtError ('virDomainCreate() failed',
dom=self)
libvirtError: internal error Process exited while reading console log
output: char device redirected to /dev/pts/5
qemu: 'vmdk' invalid format
This bit is telling: qemu: 'vmdk' invalid format
As a test I tried using libvirt to create a vmdk and then add it to an
existing VM, and it failed with the same message.
Does this mean that libvirt supports vmdk, but qemu-kvm doesn't? IF so,
why does libvirt continue to offer it as an option for KVM VM's??
IF this isn't related to libvirt, I apologise, but I'd appreciate any
pointers.
kindest regards
Frank
UWA
Daniel P. Berrange
2011-Nov-15 09:35 UTC
[libvirt-users] kvm/libvirt can't use vmdk files? qemu: 'vmdk' invalid format
On Tue, Nov 15, 2011 at 11:45:02AM +0800, Frank Hauptle wrote:> Hi all, > > I have a RHEL6.1 qemu-kvm hypervisor running a raw image that I > need for various reasons to convert to vmdk.The RHEL-6 qemu-kvm build only supports raw + qcow2 file formats. If you have another format, you must use qemu-img to convert it to raw/qcow2 before you can launch a KVM guest with it.> Error starting domain: internal error Process exited while reading > console log output: char device redirected to /dev/pts/5 > qemu: 'vmdk' invalid formatThis is QEMU telling you it doesn't support vmdk. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|