Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ For Debian-based distributions:

apt install virtio-win

The OVF tool (ovftool) must be installed on the destination KVM hosts if the hosts should import VM files (OVF) from vCenter directly, if not management server imports them.

Usage
-----

Expand All @@ -96,20 +98,26 @@ Selecting the VM from a VMware Datacenter
CloudStack administrators must select the Source VMware Datacenter:

- Existing: The existing zones are listed, and for each zone CloudStack will list if there is any VMware Datacenter associated to it. In case it is, it can be selected
- External: CloudStack allows listing Virtual Machines from a VMware Datacenter that is not associated to any CloudStack zone. To do so, it needs the vCenter IP address, the datacenter name, and username and password credentials to log in the vCenter.

Once the VMware Datacenter is selected, click on List VMware Instances to display the list of Virtual Machines on the Datacenter
- External: CloudStack allows listing Virtual Machines from a VMware Datacenter that is not associated to any CloudStack zone. To do so, it needs the vCenter IP address, the datacenter name, and username and password credentials to log in the vCenter. You can use default datacenter name (ha-datacenter or other) along with host credentials to import from standalone VMware hosts (Only stopped VMs are supported).

Once the VMware Datacenter is selected, click on List VMware Instances to display the list of Virtual Machines on the Datacenter. You must then select the VMware Instance for import and click on Import Instance.

Converting and importing a VMware VM
------------------------------------

.. note:: CloudStack allows importing Running Linux Virtual Machines, but it is generally recommended that the Virtual Machine to import is powered off and has been gracefully shutdown before the process starts. In case a Linux VM is imported while running, it will be converted in "crash consistent" state. For Windows Virtual Machines, it is not possible to import them while running, it is mandatory they are shut down gracefully so the filesystem is in a clean state.

.. note:: You can configure the parallel import of VM disk files on KVM host and management server, using the global settings: threads.on.kvm.host.to.import.vmware.vm.files and threads.on.ms.to.import.vmware.vm.files respectively.

In the UI to import instance, you can optionally select a KVM host and temporary destination storage (Default is Secondary Storage, Only NFS pools are supported) for the conversion. The conversion needs VM files (OVF) to be imported to temporary destination storage, the KVM host used for conversion can import them if the ovftool is installed in it, otherwise the management server imports them. You can force the management server to import them by enabling Force MS to import VM file(s), even the KVM host has ovftool installed in it.

|import-vm-from-vmware-to-kvm-options.png|

When importing a Virtual Machine from VMware to KVM, CloudStack performs the following actions:

- Cloning the Source Virtual Machine on the selected VMware Datacenter: The source Virtual Machine will be cloned in the original state (running or stopped for Linux VMs, or stopped for Windows VMs). The recommended state is the stopped state to prevent data inconsistencies or loss when cloning the virtual machine.
- Converting the Cloned Virtual Machine to KVM using virt-v2v: CloudStack (or the administrator) selects a running and Enabled KVM host to perform the conversion from VMware to KVM using **virt-v2v**. If the binary is not installed, then the host will fail the migration. In case it is installed it will perform the conversion into a temporary location (which can be selected by the administrator) to store the converted QCOW2 disks of the virtual machine. The disks are then moved into the destination storage pools for the virtual machine. The conversion is a long-lasting process which can be set to time out by the global setting 'convert.vmware.instance.to.kvm.timeout'. The conversion processes take a long time because virt-v2v creates a temporary virtual machine to inspect the source VM and generate the converted disks with the correct drivers. Additionally, it needs to copy the converted disks into the temporary location.
- Clones the Source Virtual Machine on the selected VMware Datacenter for running VMs: The source Virtual Machine will be cloned in the original state for running VMs. The recommended state is the stopped state to prevent data inconsistencies or loss when cloning the virtual machine.
- Imports the VM files (OVF) of the Cloned Virtual Machine for running VMs, Source Virtual Machine for stopped VMs to a temporary storage location (which can be selected by the administrator) from KVM host if ovftool installed or management server (can be forced by the administrator).
- Converts the OVF on the temporary storage location to KVM using virt-v2v: CloudStack (or the administrator) selects a running and enabled KVM host to perform the conversion from VMware to KVM using **virt-v2v**. If the binary is not installed, then the host will fail the migration. In case it is installed, it will perform the conversion into the temporary location to store the converted QCOW2 disks of the virtual machine. The disks are then moved into the destination storage pools for the virtual machine. The conversion is a long-lasting process which can be set to time out by the global setting 'convert.vmware.instance.to.kvm.timeout'. The conversion processes takes a long time because virt-v2v creates a temporary virtual machine to inspect the source VM and generate the converted disks with the correct drivers. Additionally, it needs to copy the converted disks into the temporary location.

.. note:: Please consider not restarting the management servers while importing as it will lead to the interruption of the process and you will need to start again.

Expand All @@ -120,3 +128,7 @@ When importing a Virtual Machine from VMware to KVM, CloudStack performs the fol
.. |import-vm-from-vmware-to-kvm.png| image:: /_static/images/import-vm-from-vmware-to-kvm.png
:alt: Import VMware Virtual Machines into KVM.
:width: 800 px

.. |import-vm-from-vmware-to-kvm-options.png| image:: /_static/images/import-vm-from-vmware-to-kvm-options.png
:alt: Import VMware Virtual Machines into KVM Options.
:width: 800 px