3.3. Performing Test Migration¶
In this section we will perform a test migration. Let’s first define specific Hystax Acura concepts before we start with the test migration.
Cloud/Target Clouds on the Hystax Acura portal are objects that contain information about things like, where should workloads be migrated? What user and password Hystax Acura must be used authenticate via Keystone API? What is the URL for the Keystone API? Which is the service network? Basically, all the information provided on step 3 of the installation wizard is used to populate this Hystax Acura entity. Once you login for the first time you will see this resource by clicking on the “Manage Clouds” button. You can add more “Cloud/Target Clouds” to manage more migration projects on Virtuozzo Hybrid Infrastructure Platform.
Customers are entities that we create which logically associate a customer with migrated instances, migration plans, cloud sites, cloud/target cloud and target project ID*. We will select this “Customer” entity in order to start a migration. You can create multiple customers that belong to different projects (target project) as long as the user defined on the “Cloud/Target cloud” is a project member. This is the first configuration resource you will need to create in order to start planning the migration. Note that in this case the Target Project ID* is the same as the one defined in the original Cloud/Target Cloud.
Machine Groups are ways to group instances, you could create a machine group for Windows instances, another machine group for Linux instances, etc. There is a default group and will be the one we will use in this example.
Migration Plans are a way to define what the migrated instance will look like when migrated e.g., what network should be the new replicated instance part of? What flavor should be used to create the new instance (flavors define how much RAM and CPU should be assigned to the new instance)? If we migrate more than one instance, we could even define how to orchestrate the migration, by defining for example what instance should start first and what instance should wait until the other instance is up.
To perform a test migration, do the following:
Login to the Hystax Acura portal by going to
Add a customer. Click on the Hystax logo on the top left and you’ll see the Add button to add a customer click that button. Fill in the information relevant to your customer. Click Save.
The new customer will be available after creation. Click on the customer and review the smart migration wizard. We will follow these steps to run a test migration.
Click on install agents, choose the install agent you wish to deploy on the source remote instance, that you wish to replicate. In our example I will be migrating an Ubuntu 16 web server instance, hosted currently on amazon EC2. To do it, select the Linux agent and then click Next. If the migration was from VMware, it would be possible to install a HRVAgent image on each ESXi Hypervisor to perform the migration. For more details on the migration from VMware to Virtuozzo Hybrid Infrastructure, refer to the Hystax Acura Migration Guide for VMware.
Select the machine group, in our example this will be the Default group, then the target Linux distribution (Debian/Ubuntu). Check the supported kernel list, if the kernel of your instance is not supported, then you need to build the drivers and use the DKMS as the snapshot driver deployment type, in this example we will follow this path. Otherwise, you could choose Snapshot driver deployment type (pre-built). If you have any issues building the drivers, please contact us.
Follow the steps provided by the Hystax Acura wizard, and copy and paste the instructions in order to install the agent on the instance that will be replicated.
Click on the Hystax logo on the top left. You will see now the customer and the machine count will be 1.
Click on the name of the customer and you’ll see the new instance.
Click on Start Replication. If everything is correctly configured, replication of the remote instance will start on your target cloud. Replication will take some time, depending on how much data will be replicated and the connection between your source and target clouds.
Wait until the instance is synced.
While the image is being synced, let’s create a target network (the network that will be used by our instance on the replicated target cloud). Go to your VHI self-service portal on “vhi-admin-panel-fqdn:8800” and login to the target project.
Once you’ve logged in, check the Virtual machines tab and you will see that the Acura cloud agent has been deployed automatically.
Now go to Networks, create virtual network and follow the steps. I will create the network using exactly the same CIDR (172.31.32.0/20) as the instance being replicated. You could use any other network CIDR, this is just to show an example of a migration with exactly the same IP address source and remote.
Add a migration plan, step 1. Add a machine. Click on the ellipsis icon “…”, select Add machine > Default > the machine discovered.
Add a migration plan, step 2. Configure the subnets for your new instance. Expand the view for your instance. You will see information regarding Machine ID, Flavor, and Port (network). Also, on the left you’ll see information regarding the network to be used.
We will replace the Flavor name with one that is available on our cloud. You can check available flavors by going to Virtual machines and Flavors. Also, we will find the subnet ID for our newly created network and paste it there.
Source the information regarding the subnet ID:
Login to your Virtuozzo Hybrid Infrastructure Admin panel via SSH.
# source /etc/kolla/admin-openrc.sh
Run the command
openstack network list --insecureand identify the subnet ID.
Add a secondary Port. Add a subnet by clicking the “+” button on the Subnets section.
Click on the Subnet ID* drop down menu for your new subnet and select the Public IP you wish to use. By leaving the Port IP field blank you are specifying DHCP. Provide a name for the plan and click Save.
Click on Run test migration and select the migration plan.
Create a cloud site by giving a name, a cloud site is a way to logically group a migration plan with a snapshot to be used for the migration. Give the Cloud Site a name, select a snapshot and click on Run migration.
If all went well, you will see your replicated instance available on your target cloud. When you are done reviewing the migration test, you can delete the resources by deleting the cloud site.