You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/adminguide/virtual_machines/importing_vmware_vms_into_kvm.rst
+52-31
Original file line number
Diff line number
Diff line change
@@ -13,25 +13,21 @@
13
13
specific language governing permissions and limitations
14
14
under the License.
15
15
16
-
.. note:: This functionality requires to install the **virt-v2v** (https://www.libguestfs.org/virt-v2v.1.html) binary installed on destination cluster hosts, as it is not a dependency of the CloudStack agent installed on the hosts.
17
-
18
-
As of CS 4.19, it is possible to select a VMware VM from an external or existing VMware datacenter, convert it to a KVM Virtual Machine and importing it into an existing KVM cluster.
16
+
.. note:: This functionality requires **virt-v2v** (https://www.libguestfs.org/virt-v2v.1.html) binary installed on destination cluster hosts (needs to be installed manually as it's not a dependency of the CloudStack agent during the agent installation).
19
17
20
18
Requirements on the KVM hosts
21
19
-----------------------------
22
20
23
-
The CloudStack agent does not install the virt-v2v binary as a dependency, for which this functionality is not supported by default. To enable this functionality, the virt-v2v binary must be installed on the destination KVM hosts where to import the Virtual Machines.
24
-
25
-
In case virt-v2v is not installed on a KVM host attempting a Virtual Machine conversion from VMware, the process fails.
21
+
The CloudStack agent does not install the virt-v2v binary as a dependency. The virt-v2v binary must be installed manually on KVM hosts, or the migration will fail.
26
22
27
-
The virt-v2v output is logged on the CloudStack agent logs to help administrators tracking the progress on the Virtual Machines conversion processes. The verbose mode for virt-v2v can be enabled by adding the following line to /etc/cloudstack/agent/agent.properties and restart cloudstack-agent:
23
+
The virt-v2v output (progress) is logged in the CloudStack agent logs, to help administrators track the progress on the Instance conversion processes. The verbose mode for virt-v2v can be enabled by adding the following line to /etc/cloudstack/agent/agent.properties and restart cloudstack-agent:
28
24
29
25
::
30
26
31
27
virtv2v.verbose.enabled=true
32
28
33
29
34
-
Installing virt-v2v on Ubuntu KVM hosts does not install nbdkit which is required in the conversion of VMWare VCenter guests. To install it, please execute:
30
+
Installing virt-v2v on Ubuntu KVM hosts does not install nbdkit which is required in the conversion of VMware VCenter guests. To install it, please execute:
35
31
36
32
::
37
33
@@ -49,11 +45,11 @@ Linux Distribution Supported Versions
49
45
Alma Linux 8, 9
50
46
Red Hat Enterprise Linux 8, 9
51
47
Rocky Linux 8, 9
52
-
Ubuntu 22.04 LTS
48
+
Ubuntu 22.04 LTS, 24.04 LTS
53
49
======================== ========================
54
50
55
51
56
-
Importing Windows guest VMs from VMware requires installing the virtio drivers on the hypervisor hosts for the virt-v2v conversion.
52
+
Importing Windows VMs from VMware requires installing the virtio drivers for Windows on the hypervisor hosts for the virt-v2v conversion.
57
53
58
54
On (RH)EL hosts:
59
55
@@ -68,9 +64,9 @@ For Debian-based distributions:
68
64
69
65
::
70
66
71
-
apt install virtio-win
67
+
apt install virtio-win (if the package is not available, then manual steps will be required to install the virtio drivers for windows)
72
68
73
-
The OVF tool (ovftool) must be installed on the destination KVM hosts if the hosts should import VM files (OVF) from vCenter directly, if notmanagement server imports them.
69
+
The OVF tool (ovftool) must be installed on the destination KVM hosts if the hosts should export VM files (OVF) from vCenter. If not, the management server exports them (the management server doesn't require ovftool installed).
74
70
75
71
Usage
76
72
-----
@@ -79,51 +75,76 @@ In the UI, Virtual Machines to import from VMware are listed in *Tools > Import-
CloudStack administrators must select a KVM cluster to import the VMware Virtual Machines (left side of the image above). Once a KVM cluster is selected, the VMware Datacenter selection part is displayed (right side of the image above).
89
+
CloudStack administrators must select a KVM cluster to import the VMware Virtual Machines (right side of the image above). Once a KVM cluster is selected, the VMware Datacenter selection part is displayed.
94
90
95
91
Selecting the VM from a VMware Datacenter
96
92
-----------------------------------------
97
93
98
94
CloudStack administrators must select the Source VMware Datacenter:
99
95
100
-
- 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
101
-
- 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).
96
+
- Existing: The existing zones are listed, and for each zone, CloudStack will list if there is any VMware Datacenter associated with it. In case it is, it can be selected.
97
+
- External: CloudStack allows listing Virtual Machines from a VMware Datacenter that is not associated with any CloudStack zone. To do so, the vCenter IP address, the datacenter name, and username and password credentials are needed to log in to the vCenter. To import from a standalone VMware host, you can use the default datacenter name (ha-datacenter or other) along with the host credentials (Only stopped VMs are supported).
102
98
103
-
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.
99
+
Once the VMware Datacenter is selected, click on List VMware Instances to display the list of Virtual Machines in the Datacenter. You must then choose the VMware Instance for import and click on Import Instance.
104
100
105
101
Converting and importing a VMware VM
106
102
------------------------------------
107
103
108
-
.. 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.
104
+
.. 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 shut down before the process starts. In case a Linux VM is imported while running, it will be converted in a "crash consistent" state. For Windows Virtual Machines, it is not possible to import them while running, they must be shut down gracefully so the filesystem is in a clean state.
109
105
110
106
.. 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.
111
107
112
-
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.
108
+
In the UI import wizard, you can optionally select a KVM host and temporary destination storage (default is Secondary Storage, but if using Primary Storage - only NFS pools are supported) for the conversion, where VM files (OVF) will be copied to. This can be done by a random (or explicitly chosen) KVM host (if the ovftools are installed), otherwise, the management server will export/copy the VM files (optionally, you can force this action to be done by the management server even the KVM hosts have the ovftools installed in it). Irrelevant if the KVM host or the management server performs the copy of the VM files (OVF), you can further either let CloudStack choose which KVM host should do the conversion of the VM files using virt-v2v and which host will import the files to the destination Primary Storage Pool, or you can explicitly choose these KVM hosts for each of the 2 mentioned operations.
113
109
114
110
|import-vm-from-vmware-to-kvm-options.png|
115
111
116
-
When importing a Virtual Machine from VMware to KVM, CloudStack performs the following actions:
117
-
118
-
- 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.
119
-
- 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).
120
-
- 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.
121
-
122
-
.. 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.
112
+
When importing an instance from VMware to KVM, CloudStack performs the following actions:
113
+
114
+
- Export the VM files (OVF) of the instance to a temporary storage location
115
+
(which can be selected by the administrator). The export is performed by a
116
+
KVM host if ovftool is installed or management server (can be forced by the
117
+
administrator, doesn't need ovftool installed on the management server).
118
+
The existence of ovftool on KVM host is checked using
119
+
``ovftool --version`` command.
120
+
121
+
- If the instance on VMware is in **running** state, we clone the instance on
122
+
VMware and use the new cloned instance to export OVF files.
123
+
The cloning process may take some time to complete and is used to ensure data consistency,
124
+
disk consolidation, etc.
125
+
- If the instance on VMware is in **stopped** state, we directly use the
126
+
instance to export its OVF files.
127
+
- Converts the OVF on the temporary storage location to KVM using
128
+
**virt-v2v**. CloudStack (or the administrator) selects a running and
129
+
enabled KVM host to perform the conversion (of the previously exported OVF files) from VMware to KVM using
130
+
**virt-v2v**. If the binary is not installed, then the host will fail to convert the Instance.
131
+
In case it is installed, it will perform the conversion into
132
+
the temporary location to store the converted QCOW2 disks of the instance.
133
+
The virt-v2v conversion is a long-lasting process which can be set to
134
+
time out by the global setting ``convert.vmware.instance.to.kvm.timeout``.
135
+
The conversion process takes a long time because virt-v2v creates a
136
+
temporary instance to inspect the source VM and generate the converted
137
+
disks with the correct drivers. Additionally, it needs to copy the
138
+
converted disks into the temporary location.
139
+
- The converted instance (i.e. QCOW2 files) is then imported into the chosen KVM cluster.
140
+
Administrator can choose the KVM host to perform the import or let CloudStack choose it. Only enabled
141
+
cluster and enabled hosts are considered.
142
+
143
+
.. note:: Please do not restart the management servers while migration is in progress as it will lead to the interruption of the process and you will need to start again.
123
144
124
145
.. note:: As mentioned above, the migration/conversion process uses an external tool, virt-v2v, which supports most but not all the operating systems out there (this is true for both the host on which the virt-v2v tool is running as well as the guest OS of the instances being migrated by the tool). Thus, the success of the import process will, almost exclusively, depend on the success of the virt-v2v conversion. In other words, the success will vary based on factors such as the current OS version, installed packages, guest OS setup, file systems, and others. Success is not guaranteed. We strongly recommend testing the migration process before proceeding with production deployments.
125
146
126
-
.. note:: The resulting imported VM uses the default Guest OS: CentOS 4.5 (32-bit). After importing the VM, please Edit the Instance to change the Guest OS Type accordingly.
147
+
.. note:: The resulting imported VM uses the default Guest OS type: **CentOS 4.5 (32-bit)**. After importing the VM, please Edit the Instance to change the Guest OS Type accordingly.
0 commit comments