Ask Your Question
0

Storing VmWare VM image and add it to Glance for nova boot

asked 2014-12-04 07:41:39 -0500

Pradip gravatar image

Hello,

We have a running VMWare VM (with multiple datastores associated with it currently. But it is possible to re-create the VM with single datastore) in a particular ESX. We would like to 'save' the VM in a single VMDK file. Import the vmdk file to OS and add it to glance image-list. The ESX is also added to the nova hypervisor-list. Now we would like to launch the VM in the same ESX (nova boot --image <that-image>) such that all the content of the Vm is 'recreated in-toto' from Nova launch in the same ESX.

To accomplish the task, what and how to 'save' the VM from vCentre such that it can be imported to the OS and re-launched in toto?

One point: the datastore is of type NFSv3 (i.e. the backend storage's NFS export is being used as the datastore).

Thanks, Pradip

edit retag flag offensive close merge delete

Comments

It sounds like you want continuously replicate VMDK file to Glance image , created originally via VMDK file. Like it's done here http://openstack.prov12n.com/convert-...
Am I correct ?

dbaxps gravatar imagedbaxps ( 2014-12-04 08:04:06 -0500 )edit

Suppose I have a my_vm inside an '120gb_datastore' data-store ESX has the following files: vmfs/volumes/120gb_datastore/my_vm/my_vm-flat.vmdk vmfs/volumes/120gb_datastore/my_vm/my_vm.vmdk vmfs/volumes/120gb_datastore/my_vm/my_vm_1.vmdk

Which one I need to transfer? Or all? If all - how to combine?

Pradip gravatar imagePradip ( 2014-12-04 10:17:03 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-12-04 14:14:16 -0500

dbaxps gravatar image

updated 2014-12-04 14:48:51 -0500

View http://docs.openstack.org/juno/config...

Supported image types

Upload images to the OpenStack Image Service in VMDK format. The following VMDK disk types are supported:
    VMFS Flat Disks (includes thin, thick, zeroedthick, and eagerzeroedthick). Note that once a VMFS thin disk is exported from VMFS to a non-VMFS location, like the OpenStack Image Service, it becomes a preallocated flat disk. This impacts the transfer time from the OpenStack Image Service to the data store when the full preallocated flat disk, rather than the thin disk, must be transferred.
    Monolithic Sparse disks. Sparse disks get imported from the OpenStack Image Service into ESX as thin provisioned disks. Monolithic Sparse disks can be obtained from VMware Fusion or can be created by converting from other virtual disk formats using the qemu-img utility.

Assuming a preallocated disk type and an iSCSI lsiLogic adapter type, the following command uploads the VMDK disk:

$ glance image-create --name "ubuntu-thick-scsi" --disk-format vmdk \
--container-format bare \
--property vmware_adaptertype="lsiLogic" \
--property vmware_disktype="preallocated" \
--property vmware_ostype="ubuntu64Guest" < ubuntuLTS-flat.vmdk

$ glance image-create --name "Windows7" --disk-format vmdk --container-format bare \
--is-public=true  --property vmware_disktype="preallocated" \
--property vmware_adaptertype="lsiLogic" \
--property vmware_ostype="windows7Server64Guest"  < Win7-flat.vmdk

If the image did not come from the qemu-img utility, the vmware_disktype and vmware_adaptertype might be different. To determine the image adapter type from an image file, use the following command and look for the ddb.adapterType= line:

$ head -20 <vmdk file name>
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-12-04 07:41:39 -0500

Seen: 2,183 times

Last updated: Dec 04 '14

Related questions