[openstack-dev] How to create vmdk for openstack usage

Vui Chiap Lam vuichiap at vmware.com
Mon Sep 16 08:13:01 UTC 2013


Hi Jason, 

What happens if you forgo the converting to lsilogic, and instead upload the disk to glance as an ide disk (using --property vmware_adaptertype=ide)? 

Also, just reiterating the docs and Dan's comments, 

After obtaining a sparse ide vmdk from "qemu-img convert", due to a bug in the VMware nova driver, you need to convert the vmdk to a thin or preallocated disk. 
You can do this one of the following tools: 
- vmkfstools.pl referenced in the DeveloperGuide Appendix 
- vmkfstools directly if you can ssh into an ESX machine 
- vmware-vdiskmanager (comes bundled with VMware Fusion or VMware Workstation) 
(e.g. '/Applications/VMware Fusion.app/Contents/Library/vmware-vdiskmanager' -r our_sparse_ide.vmdk -t 4 converted.vmdk 
After this step you should have a converted .vmdk and a converted -flat.vmdk. 
At this point converted -flat.vmdk (not the descriptor file converted .vmdk) can be uploaded to with --property vmware_adaptertype=ide as an ide image 

If this works, we can worry about converting the disk to SCSI next. 

Regards, 
Vui 

----- Original Message -----

| From: "Jason Zhang" <bearovercloud at gmail.com>
| To: "OpenStack Development Mailing List" <openstack-dev at lists.openstack.org>
| Sent: Friday, September 13, 2013 4:09:47 PM
| Subject: Re: [openstack-dev] How to create vmdk for openstack usage

| Hi Dan,

| Thank you very much for your reply.

| We tested again and it still does not work, can you give more information
| about how the vmdk's were created?
| I.e the tool used to create the debian and trend vmdk's listed here
| https://wiki.openstack.org/wiki/NovaVMware/DeveloperGuide#Glance_Initial_Setup

| Using qemu-img convert to convert a qcow2 or raw image to vmdk doesn't seem
| to work, for example, by using
| qemu-img convert -f qcow2 -O vmdk <input-file.qcow2> <output-file.vmdk>
| The command always converts to a vmdk which is of adapter type 'ide' other
| than lsilogic.

| We modified the adapter type to lsilogic and uploading it to glance by using,

| glance image-create --name=<name> --disk-format=vmdk --container-format=bare
| --is-public=true --property vmware_adaptertype=lsiLogic --property
| vmware_disktype=thin --property vmware_ostype=ubuntu64Guest <
| output-file.vmdk
| or
| glance image-create --name=<name> --disk-format=vmdk --container-format=bare
| --is-public=true --property vmware_adaptertype=lsiLogic --property
| vmware-disktype="preallocated" --property vmware_disktype=thin --property
| vmware_ostype=ubuntu64Guest < output-file.vmdk

| doesn't seem to work. Even after tying the steps under
| https://wiki.openstack.org/wiki/NovaVMware/DeveloperGuide#Appendix

| It seems the patch to convert into a scsi disk, has not been merged yet:
| https://bugs.launchpad.net/qemu/+bug/545089

| Thanks in advance!

| Best regards,

| Jason

| On 9/12/13 12:48 PM, Dan Wendlandt wrote:

| | Hi Jason,
| 

| | The best place to look is the official openstack compute documentation that
| | covers vSphere in Nova:
| | http://docs.openstack.org/trunk/openstack-compute/admin/content/vmware.html
| 

| | In particular, check out the section titled "Images with VMware vSphere"
| | (pasted below). As that text suggests, the most likely issue with your VMDK
| | not booting is that you may have passed the wrong vmware_adaptertype to
| | glance when creating the image. Also note the statement indicating that all
| | VMDK images must be "flat" (i.e., single file), otherwise Glance will be
| | confused.
| 

| | Dan
| 

| | Images with VMware vSphere
| 

| | When using either VMware driver, images should be uploaded to the OpenStack
| | Image Service in the VMDK format. Both thick and thin images are currently
| | supported and all images must be flat (i.e. contained within 1 file). For
| | example
| 

| | To load a thick image with a SCSI adaptor:
| 
| | $ glance image-create name="ubuntu-thick-scsi" disk_format=vmdk
| | container_format=bare \
| 
| | is_public=true --property vmware_adaptertype="lsiLogic" \
| 
| | --property vmware_disktype="preallocated" \
| 
| | --property vmware_ostype="ubuntu64Guest" < ubuntuLTS-flat.vmdk
| 

| | To load a thin image with an IDE adaptor:
| 
| | $ glance image-create name="unbuntu-thin-ide" disk_format=vmdk
| | container_format=bare \
| 
| | is_public=true --property vmware_adaptertype="ide" \
| 
| | --property vmware_disktype="thin" \
| 
| | --property vmware_ostype="ubuntu64Guest" < unbuntuLTS-thin-flat.vmdk
| 

| | The complete list of supported vmware disk properties is documented in the
| | Image Management section. It's critical that the adaptertype is correct; In
| | fact, the image will not boot with the incorrect adaptertype. If you have
| | the meta-data VMDK file the the ddb.adapterType property specifies the
| | adaptertype. The default adaptertype is "lsilogic" which is SCSI.
| 

| | On Thu, Sep 12, 2013 at 11:29 AM, Jason Zhang < bearovercloud at gmail.com >
| | wrote:
| 

| | | Hi Dears,
| | 
| 

| | | In the document https://wiki.openstack.org/wiki/NovaVMware/DeveloperGuide
| | | under the 'Get an initial VMDK to work with ',
| | 
| 
| | | its said, 'There are a lot of “gotchas” around what VMDK disks work with
| | | OpenStack + vSphere,'.
| | 
| 
| | | The appendix section lists one of the gotchas. Are there any more
| | | gotchas?
| | 
| 

| | | During our testing, the vmdk instance on boot-up gives a 'Operating
| | | System
| | | not found' error,
| | 
| 
| | | I am not sure whether this is a already known issue or not.
| | 
| 

| | | Thanks in advance!
| | 
| 

| | | Best regards,
| | 
| 

| | | Jason
| | 
| 

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

| | --
| 
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 
| | Dan Wendlandt
| 
| | Nicira, Inc: www.nicira.com
| 
| | twitter: danwendlandt
| 
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 

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

| _______________________________________________
| OpenStack-dev mailing list
| OpenStack-dev at lists.openstack.org
| http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130916/46af009a/attachment.html>


More information about the OpenStack-dev mailing list