msa_support
Contributor
Contributor

Migration VM from OpenStack to VMWare

Hi,

I have some VMs under OpenStack environment. We need to migrate the VMs to VMWare environment. Do we have workaround how to migrate VMs from OpenStack to VMWare?

Thank you


Bayu Permadi

0 Kudos
2 Replies
Sreejesh_D
Virtuoso
Virtuoso

Hi,

Please find the steps from Activeeon Team Blog: OpenStack & VMWare VM Disk Migration

1. Obtain VM disk image from OpenStack infrastructure

It is usually placed in Glance image directory (for example /opt/stack/data/glance/images/). We assume the format is QEMU QCOW Image (v2). OpenStack Image Services (API v2.0) allow to get the VM disk image through an HTTP GET at v2/images/{image_id}/file .You can also use glance client (see the annexe for further information on installation and version):   $ glance -I <user> -K <pass> -T <tenant> -N <url>/v2.0 image-download --progress --file <vmImageFile> <imageId>2. Convert vmdisk.qcow2 into a vmdisk.vmdk format (supported by VMWare)

   $ qemu-img convert -f qcow2 -O vmdk vmdisk.qcow2 vmdisk.vmdk
3. Create a vm.vmx container for vmdisk.vmdk

When creating vm.vmx metadata file, make sure the disk file vmdisk.vmdk is in the same directory. There are plenty of parameters VMWare allows you to set, you can start using these (you can see the documentation for more information):

config.version = "6"

memsize = "1024"

displayName = "vm"

scsi0.present = "true"

scsi0.sharedBus = "none"

scsi0.virtualDev = "lsilogic"

scsi0:0.present = "true"

scsi0:0.fileName = "vmdisk.vmdk"

scsi0:0.deviceType = "scsi-hardDisk"

virtualHW.productCompatibility = "hosted"

4. Import the VM image (vm.vmx + vmdisk.vmdk) into VMWare infrastructure

  $ ovftool --powerOn vm.vmx vi://<user>:<password>@<ESXi-server>/

0 Kudos
namda
Contributor
Contributor

Hello yezdi,

In the step 4: Import the VM image (vm.vmx + vmdisk.vmdk) into VMWare infrastructure

which tool we need to do that command?

0 Kudos