settingsLogin | Registersettings

[openstack-dev] [OpenStack][VMWare] "qemu-img convert" problems for VM creation

0 votes

Hi,

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.

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.

==============================
=

Using the qemu-img utility, disk images in several formats (such as, qcow2)
can be converted to the VMDK format.

For example, the following command can be used to convert a qcow2 Ubuntu
Precise cloud imagehttp://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img
:

$ qemu-img convert -f qcow2
~/Downloads/precise-server-cloudimg-amd64-disk1.img \
-O vmdk precise-server-cloudimg-amd64-disk1.vmdk

VMDK disks converted through qemu-img are always monolithic sparse VMDK
disks with an IDE adapter type. Using the previous example of the Precise
Ubuntu image after the qemu-img conversion, the command to upload the VMDK
disk should be something like:

$ glance image-create --name precise-cloud --is-public=True \
--container-format=bare --disk-format=vmdk \
--property vmwaredisktype="sparse" \
--property vmware
adaptertype="ide" < \
precise-server-cloudimg-amd64-disk1.vmdk

===============================

--
Thanks,

Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openstack.org/pipermail/openstack-dev/attachments/20140417/b55bcee1/attachment.html

asked Apr 17, 2014 in openstack-dev by Jay_Lau (7,320 points)   1 8 11
retagged Jan 28, 2015 by admin

2 Responses

0 votes

Good timing. I just tried this today for the first time.

Here's what worked for me:

wget http://cloud-images.ubuntu.com/saucy/current/saucy-server-cloudimg-i386-disk1.img

qemu-img convert -f qcow2 saucy-server-cloudimg-i386-disk1.img -O vmdk saucy-server-cloudimg-i386-disk1.vmdk

glance image-create --name precise-cloud --is-public=True --container-format=bare --disk-format=vmdk --property vmwaredisktype="sparse" --property vmwareadaptertype="ide" < saucy-server-cloudimg-i386-disk1.vmdk

nova boot --config-drive=true --image saucy-cloud --flavor m1.small --poll saucy

On Apr 16, 2014, at 6:36 PM, Jay Lau <jay.lau.513 at gmail.com> wrote:

Hi,

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.

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.

==============================
=
Using the qemu-img utility, disk images in several formats (such as, qcow2) can be converted to the VMDK format.
For example, the following command can be used to convert a qcow2 Ubuntu Precise cloud image:
$ qemu-img convert -f qcow2 ~/Downloads/precise-server-cloudimg-amd64-disk1.img \
-O vmdk precise-server-cloudimg-amd64-disk1.vmdk
VMDK disks converted through qemu-img are always monolithic sparse VMDK disks with an IDE adapter type. Using the previous example of the Precise Ubuntu image after the qemu-img conversion, the command to upload the VMDK disk should be something like:
$ glance image-create --name precise-cloud --is-public=True \
--container-format=bare --disk-format=vmdk \
--property vmwaredisktype="sparse" \
--property vmware
adaptertype="ide" < \
precise-server-cloudimg-amd64-disk1.vmdk

===============================
--
Thanks,

Jay


OpenStack-dev mailing list
OpenStack-dev at lists.openstack.org
https://urldefense.proofpoint.com/v1/url?u=http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=2CQc966BQ6s3Cdd6nQ79uvWP17nF9g%2FX4m3XppGg1xQ%3D%0A&m=OuyW8RHPj7QHpDd93d%2FQQwJNpI%2F4XdkhvUGKMXnbw%2Bg%3D%0A&s=f9ff1b7ad27552da9560a5d008cf6c5ad005402826712e2d477e3dc687044174

-------------- next part --------------
An HTML attachment was scrubbed...
URL:

responded Apr 17, 2014 by Eric_Brown (300 points)   1
0 votes

Thanks Brown, I was using same way as you did but always failed, not sure
if it is caused by my image but the image does work for KVM before convert.

I will try your image later.

Thanks!

2014-04-17 11:04 GMT+08:00 Eric Brown :

Good timing. I just tried this today for the first time.
Here's what worked for me:

wget
http://cloud-images.ubuntu.com/saucy/current/saucy-server-cloudimg-i386-disk1.img

qemu-img convert -f qcow2 saucy-server-cloudimg-i386-disk1.img -O vmdk
saucy-server-cloudimg-i386-disk1.vmdk

glance image-create --name precise-cloud --is-public=True
--container-format=bare --disk-format=vmdk --property
vmwaredisktype="sparse" --property vmwareadaptertype="ide" <
saucy-server-cloudimg-i386-disk1.vmdk

nova boot --config-drive=true --image saucy-cloud --flavor m1.small --poll
saucy

On Apr 16, 2014, at 6:36 PM, Jay Lau <jay.lau.513 at gmail.com> wrote:

Hi,

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.

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.

==============================
=

Using the qemu-img utility, disk images in several formats (such as,
qcow2) can be converted to the VMDK format.

For example, the following command can be used to convert a qcow2 Ubuntu
Precise cloud imagehttps://urldefense.proofpoint.com/v1/url?u=http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=2CQc966BQ6s3Cdd6nQ79uvWP17nF9g%2FX4m3XppGg1xQ%3D%0A&m=OuyW8RHPj7QHpDd93d%2FQQwJNpI%2F4XdkhvUGKMXnbw%2Bg%3D%0A&s=eb589ffb27d6ccf66a79f2ade5db63415db32882d1aa7392812035a6d3aa0a22
:

$ qemu-img convert -f qcow2 ~/Downloads/precise-server-cloudimg-amd64-disk1.img \
-O vmdk precise-server-cloudimg-amd64-disk1.vmdk

VMDK disks converted through qemu-img are always monolithic sparse VMDK
disks with an IDE adapter type. Using the previous example of the Precise
Ubuntu image after the qemu-img conversion, the command to upload the
VMDK disk should be something like:

$ glance image-create --name precise-cloud --is-public=True \
--container-format=bare --disk-format=vmdk \
--property vmwaredisktype="sparse" \
--property vmware
adaptertype="ide" < \
precise-server-cloudimg-amd64-disk1.vmdk

===============================

--
Thanks,

Jay


OpenStack-dev mailing list
OpenStack-dev at lists.openstack.org

https://urldefense.proofpoint.com/v1/url?u=http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=2CQc966BQ6s3Cdd6nQ79uvWP17nF9g%2FX4m3XppGg1xQ%3D%0A&m=OuyW8RHPj7QHpDd93d%2FQQwJNpI%2F4XdkhvUGKMXnbw%2Bg%3D%0A&s=f9ff1b7ad27552da9560a5d008cf6c5ad005402826712e2d477e3dc687044174


OpenStack-dev mailing list
OpenStack-dev at lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

--
Thanks,

Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL:

responded Apr 17, 2014 by Jay_Lau (7,320 points)   1 8 11
...