Migratekit is a CLI tool which can help you to migrate your virtual machines from VMware to OpenStack in a near-zero downtime. The goal of this project is to allow you to move as much data as possible online and only have a short downtime window to complete the migration.
Migratekit has two phases that it operates in to allow you to migrate your virtual machine with almost no downtime which are documented below.
These phases allow you to move data online as much as possible and have a final cutover phase which takes the virtual machine offline for a short period of time to complete the migration.
You will generally run as many migration cycles as you need, they will run without any downtime to the virtual machine.
On your first migration cycle, Migratekit will do a full copy of the virtual machine to the OpenStack cloud. On subsequent migration cycles, Migratekit will only copy the changes that have been made to the virtual machine since the last migration cycle.
Once you are ready to cut over to the OpenStack cloud, you will run the cutover phase. This will ensure all of the matching resources such as Neutron ports exist on the cloud, do a final sync of the virtual machine, power it off inside of VMware, execute a final sync, and then build a new virtual machine on the OpenStack cloud using the same volumes as the original virtual machine.
The easiest supported way of running Migratekit is by using the Docker image which is shipped with all of the dependencies required to run Migratekit except for the VMware Disk Development Kit (VDDK) which you will need to download from the VMware website.
In order to be able to use Migratekit, you will need to download the VDDK from the VMware website. You will ened to create a developer account in order to download the VDDK as well as accept the EULA.
- Download VMware Virtual Disk Development Kit (VDDK) 8.0.2 for Linux
- Once you've downloaded the file, you will need to extract the contents of the tarball to a directory on your system.
- We recommend that you extract the contents of the tarball to
/usr/lib64/vmware-vix-disklib/
on your system. If you decide to extract the contents to a different directory, you will need to update the Docker volume mount in the next section to reflect the directory you extracted the tarball to.
Assuming that you already have Docker installed on your system, you can use the following command to run the Migratekit Docker container:
docker run -it --rm --privileged \
-v /dev:/dev \
-v /usr/lib64/vmware-vix-disklib/:/usr/lib64/vmware-vix-disklib:ro \
--env-file <(env | grep OS_) \
registry.atmosphere.dev/library/migratekit:latest \
--help
If you want to get started with running your first migration cycle, you can run it with the following command:
docker run -it --rm --privileged \
-v /dev:/dev \
-v /usr/lib64/vmware-vix-disklib/:/usr/lib64/vmware-vix-disklib:ro \
--env-file <(env | grep OS_) \
registry.atmosphere.dev/library/migratekit:latest \
migrate \
--vmware-endpoint vmware.local \
--vmware-username username \
--vmware-password password \
--vmware-path /ha-datacenter/vm/migration-test
In the example above, you would run the migration cycle against a virtual machine
located at /ha-datacenter/vm/migration-test
on the VMware endpoint vmware.local
(which can be both an ESXi host or a vCenter server). The endpoint can also be
an IP address if you do not have a DNS entry for the endpoint.
You will also need to make sure you have all of your OpenStack environment variables set in your environment before running the command so that Migratekit can connect to the OpenStack cloud.
Once you've ran this command a few times and you're happy that you're ready to cutover, you can run the following command to cutover to the OpenStack cloud:
docker run -it --rm --privileged \
-v /dev:/dev \
-v /usr/lib64/vmware-vix-disklib/:/usr/lib64/vmware-vix-disklib:ro \
--env-file <(env | grep OS_) \
registry.atmosphere.dev/library/migratekit:latest \
cutover \
--vmware-endpoint vmware.local \
--vmware-username username \
--vmware-password password \
--vmware-path /ha-datacenter/vm/migration-test \
--flavor b542cedb-d3b4-4446-a43f-5416711440ee \
--network-mapping mac=00:0c:29:7d:2d:68,network-id=2a81f1b0-c1b8-48dd-bd8e-4d976608c06d,subnet-id=21a7110b-2ab2-4cc1-8372-8b552f7a4438,ip=192.168.2.20
You should run it with the same arguments, however, this time you will need to specify the flavor that you want to use for the virtual machine on the OpenStack cloud as well as the network mapping that you want to use for the virtual machine.
The network mapping allows Migratekit to know what network to attach the virtual machine to on the OpenStack cloud, as well as the IP address that you want to assign to the virtual machine since it cannot map this information from VMware.
The format of the network mapping is as follows:
mac
: The MAC address of the virtual interface on the virtual machine that you want to map to the OpenStack network (required).network-id
: The UUID of the network that you want to attach the virtual machine to on the OpenStack cloud (required).subnet-id
: The UUID of the subnet that you want to attach the virtual machine to on the OpenStack cloud (required).ip
: The IP address that you want to assign to the virtual machine on the OpenStack cloud (optional, Neutron will assign an IP address if this is not specified).
You should ideally match the network mapping to the network that the virtual machine is attached to on the VMware side to ensure that the virtual machine can communicate with the network once it has been migrated to the OpenStack cloud.
We welcome contributions to this project, we hope to see this project grow and become a useful tool for people to migrate their virtual machines from VMware to OpenStack.
Since VMware environments can be quite complex, we are happy to work with contributors to add support for more complex VMware environments to Migratekit for the benefit of the community, but we need your help to do so because of a lack of access to these environments and their licensing costs.
If you need help with using Migratekit, you can either open an issue to get help from the community or you can contact VEXXHOST for professional support with VMware migration or OpenStack.