Transcript
In this screencast, we will show how to migrate a virtual machine from the existing VMware infrastructure to OpenNebula. OneSwap covers different migration possibilities, however, in the scope of this demonstration, we are going to cover only one. While we are covering the migration from a live infrastructure, OneSwap supports the import of OVA and VMDK disks as well. OpenNebula relies on the contextualization package to manage the virtual machines. To avoid issues in the future, this package is going to be injected into the virtual machine during the migration process. Additionally, OneSwap can remove the VMware tools to avoid running unnecessary processes. You can pass parameters to the command line either inline or in a form of configuration file. There is a default configuration file, however, you can create your own and pass the path as the additional inline parameter. There are different use cases when it comes to migration. If the virtual machine is mission critical, you can leverage the Delta mode to minimize the downtime and migrate the virtual machine while it's running. The demo environment is the following. A VMware environment that has a vCenter that manages the ASXI hosts. OpenNebula frontend that is managing the KVM hosts to run workloads after the migration. The frontend node is going to run OneSwap. However, in your environment, you can also leverage another node and dedicate it to solely run the OneSwap tool. There is a virtual machine that we are going to migrate. Currently, it's running on the ASXI node and is rather tiny to speed up the migration process. Note that the migration time heavily depends on the size of the disks and connectivity between the nodes. The frontend node can communicate with the vCenter API. In the scope of this demonstration, we will migrate a virtual machine via the vCenter API. Please refer to the official OneSwap documentation to learn more and leverage other modes. OneSwap package is not installed yet, thus we must install and configure it. OneSwap is available in the official OpenNebula repository, so no additional source configurations are needed. Please note that if you are migrating Windows-based virtual machines, you'll need to have some extra toolset. This part is being covered in our documentation. Once the OneSwap tool has been installed, edit the etc.one-swap.yml config file with your preferred text editor. There are a variety of configuration options available, but since the demonstration is going to leverage the API migration, we only need to set the administrator user, vCenter IP or FQDN, and the password. Alternatively, you can provide the necessary credentials inline, but we'd like to avoid storing credentials in the command line history. Additionally, the configuration file makes the command shorter and cleaner. First let's set the vCenter FQDN. In this environment, the admin username is equal to administrator at vSphere.local, thus we only need to uncomment the parameter. Lastly, the password. Set the one that corresponds to your environment and save the changes. Before performing the conversion, let's make sure that the connection can be established and there are no errors with credentials or name resolution. Execute either of the list commands. We're going to use the OneSwap list datacenters. As seen on the screen, the command executes correctly and there are no errors in the output. The virtual machine that will be the target to migration is running the Ubuntu 24.04 operating system. It's plain and lightweight, perfect to demonstrate the capabilities of the OneSwap command line tool. To migrate the virtual machine via the API, we must power down the virtual machine first. Once the virtual machine is powered down, switch to the command line, in this case OpenAble Frontend. Now when credentials and connectivity have been tested successfully, let's execute the conversion. It's worth mentioning that conversion is safe and OneSwap isn't going to delete the original source VM from vCenter, so you can verify whether the conversion has been executed correctly before cutting over. It may take time depending on a multitude of factors such as the size of the disk, network speed, and the method that has been chosen. Once all disks have been converted, it's time to switch to Sunstone and verify that the disk and the virtual machine template have been created. The image has been added, and the virtual machine template as well. Let's instantiate the virtual machine template to verify that the virtual machine can be launched and that it also has the context package injected. Press the Instantiate button. Keep the resource assignment as is and proceed to the next step. Let's also attach the virtual machine to the virtual network. This is going to be the best indicator that the context package has been injected and is running successfully. The network parameters such as IP address, NATmask, DNS, and gateway are configured by the contextualization package, and if it works incorrectly or is missing, the virtual machine is not going to be reachable via the network. Additionally to that, the user's secure shell public key will be added to the authorized keys file. This is the part that also is handled by the context package. Select the routable virtual network and proceed with attaching the network card. Once attached, there are no more adjustments needed to verify the virtual machine. Press the Finish button to finalize the deployment. Virtual machine is in the process of deployment. Wait until the virtual machine is in the running state. Once in the running state, switch to the command line from where you can connect to the IP of a VM. Launch the secure shell connection to the converted virtual machine. Since we are running this test on a front-end node, the oneVM command line is very helpful. As seen on the screen, the connection was established, meaning that the IP was configured successfully and authorized keys file was populated with the correct public key. And this concludes the screencast where we have shown how to convert a virtual machine from a live VMware environment to the OpenNebula environment using the AwantSwap migration tool and leveraging the vCenters API. Thank you for watching and see you in the next screencast.