<div dir="ltr"><div><div>Hi,<br><br></div>Does anyone ever create VMWare image using 
"qemu-img convert" from a QCOW2 image? I did some test according to the 
following guide but the VM creation always failed.<br><br>
</div>I tried to logon to the console of the VM and found the console is reporting the VM was boot from PXE and no operating systems.<br><br>==============================<div>=<br><p style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;background-color:inherit;font-weight:normal;line-height:normal;text-transform:none;font-size:14px;white-space:normal;margin:5px 0px;font-family:微软雅黑;word-spacing:0px">

Using the<span> </span><code style="font-family:Monaco,Consolas,Courier,'Lucida Console',monospace;font-size:12px;line-height:16px;font-style:normal;background-color:inherit">qemu-img</code><span> </span>utility, disk images in several formats (such as, qcow2) can be converted to the VMDK format.</p>

<p style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;background-color:inherit;font-weight:normal;line-height:normal;text-transform:none;font-size:14px;white-space:normal;margin:5px 0px;font-family:微软雅黑;word-spacing:0px">

For example, the following command can be used to convert a<span> </span><a href="http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img" style="background-color:inherit" target="_blank">qcow2 Ubuntu Precise cloud image</a>:</p>

<pre style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;background-color:inherit;font-weight:normal;line-height:16px;text-transform:none;font-size:12px;font-family:Monaco,Consolas,Courier,'Lucida Console',monospace;word-spacing:0px">
$ qemu-img convert -f qcow2 ~/Downloads/precise-server-cloudimg-amd64-disk1.img \
-O vmdk precise-server-cloudimg-amd64-disk1.vmdk</pre><p style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;background-color:inherit;font-weight:normal;line-height:normal;text-transform:none;font-size:14px;white-space:normal;margin:5px 0px;font-family:微软雅黑;word-spacing:0px">

VMDK disks converted through<span> </span><code style="font-family:Monaco,Consolas,Courier,'Lucida Console',monospace;font-size:12px;line-height:16px;font-style:normal;background-color:inherit">qemu-img</code><span> </span>are
 always monolithic sparse VMDK disks with an IDE adapter type. Using the
 previous example of the Precise Ubuntu image after the<span> </span><code style="font-family:Monaco,Consolas,Courier,'Lucida Console',monospace;font-size:12px;line-height:16px;font-style:normal;background-color:inherit">qemu-img</code><span> </span>conversion, the command to upload the VMDK disk should be something like:</p>

<pre style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;background-color:inherit;font-weight:normal;line-height:16px;text-transform:none;font-size:12px;font-family:Monaco,Consolas,Courier,'Lucida Console',monospace;word-spacing:0px">
$ glance image-create --name precise-cloud --is-public=True \
--container-format=bare --disk-format=vmdk \
--property vmware_disktype="sparse" \
--property vmware_adaptertype="ide" < \
precise-server-cloudimg-amd64-disk1.vmdk<br><br>===============================<span class=""><font color="#888888"><br></font></span></pre></div>-- <br><div dir="ltr"><div>Thanks,<br><br></div>Jay<br></div>
</div>