@@ -117,6 +117,178 @@ If you are hitting the following error when running ovftool, install the depende
117117 dnf install libnsl
118118
119119
120+ VDDK-based Optimized Conversion
121+ -------------------------------
122+
123+ CloudStack supports an optimized VMware-to-KVM migration path using virt-v2v in vpx input mode combined with
124+ VMware's Virtual Disk Development Kit (VDDK). This method eliminates the OVF export phase entirely and streams
125+ disk blocks directly from the source hypervisor into the conversion pipeline, resulting in significantly faster
126+ migration times.
127+
128+ The traditional OVF-based workflow operates in two sequential phases:
129+
130+ 1. Export the entire VM as OVF/VMDK files to temporary storage (full disk copy).
131+ 2. Convert the local VMDK files using virt-v2v (second full disk read and write).
132+
133+ The VDDK-based workflow replaces both phases with a single streaming pipeline:
134+
135+ - virt-v2v connects directly to vCenter via ``vpx:// ``
136+ - Disk blocks are read on demand via VDDK (using nbdkit internally as the translation layer between the
137+ VDDK API and virt-v2v's NBD block device interface)
138+ - Conversion and disk transfer happen concurrently
139+ - Only allocated blocks are transferred; zero-filled and sparse extents are skipped
140+ - No intermediate OVF or VMDK files are created
141+
142+ This reduces disk I/O amplification, eliminates temporary staging storage, and shortens end-to-end migration time.
143+
144+ .. note :: CloudStack does not distribute VDDK, operators must download it separately.
145+ Along with the new VDDK-based conversion method the traditional OVF-based method remains supported for environments.
146+ Operators can choose the conversion method on a per-migration basis in the UI import wizard.
147+
148+ Host Prerequisites for VDDK-based Conversion
149+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
150+
151+ To use VDDK-based migration, operators must prepare each KVM host that will run the conversion: install the conversion
152+ tools, install VDDK manually, configure libguestfs, and verify host connectivity to vCenter/ESXi.
153+
154+ Example: prepare one KVM conversion host
155+
156+ **Step 1: Install the conversion stack (RHEL / Rocky / Alma Linux) **
157+
158+ ::
159+
160+ dnf install -y epel-release
161+ dnf config-manager --set-enabled crb
162+ dnf install -y virt-v2v libguestfs-tools libguestfs-xfs qemu-img nbdkit
163+
164+ **Step 2: Configure libguestfs backend as ** ``direct ``
165+
166+ VDDK does not work with the default sandbox backend. Configure ``direct ``:
167+
168+ ::
169+
170+ cat <<EOF > /etc/profile.d/libguestfs.sh
171+ export LIBGUESTFS_BACKEND=direct
172+ EOF
173+
174+ source /etc/profile.d/libguestfs.sh
175+
176+ This can also be configured persistently with ``libguestfs.backend `` in ``/etc/cloudstack/agent/agent.properties `` (see `Agent Properties for VDDK-based Conversion `_ below).
177+
178+ **Step 3: Download and install VDDK **
179+
180+ Download the VDDK tarball and extract it to a known location on the KVM host, for example, ``/opt/vmware-vddk ``.
181+ The resulting directory must contain the VDDK libraries under a ``lib64 `` subdirectory.
182+
183+ ::
184+
185+ mkdir -p /opt/vmware-vddk
186+ tar -xf VMware-vix-disklib-9*.tar.gz -C /opt/vmware-vddk
187+
188+ Expected layout after extraction::
189+
190+ /opt/vmware-vddk/vmware-vix-disklib-distrib/
191+ lib64/
192+ include/
193+ bin64/
194+
195+ **Step 4: Add EL9 compatibility symlink (when using VDDK 9) **
196+
197+ On EL9 distributions, virt-v2v may expect ``libvixDiskLib.so.8 ``. Create this compatibility symlink:
198+
199+ ::
200+
201+ cd /opt/vmware-vddk/vmware-vix-disklib-distrib/lib64
202+ ln -s libvixDiskLib.so.9 libvixDiskLib.so.8
203+
204+ .. note :: This compatibility symlink is commonly required on RHEL 9, Rocky Linux 9, and Alma Linux 9.
205+
206+ **Step 5: Verify host setup **
207+
208+ ::
209+
210+ ls /opt/vmware-vddk/vmware-vix-disklib-distrib/lib64/libvixDiskLib.so.8
211+ virt-v2v --version
212+ nbdkit --version
213+
214+ **Step 6: Verify required network access **
215+
216+ The KVM conversion host must be able to reach:
217+
218+ .. cssclass :: table-striped table-bordered table-hover
219+
220+ ============================== ====== ==============================
221+ Target Port Purpose
222+ ============================== ====== ==============================
223+ vCenter 443 API / authentication
224+ ESXi hosts 902 VDDK NFC disk transfer
225+ ESXi hosts 443 VM metadata
226+ ============================== ====== ==============================
227+
228+ Agent Properties for VDDK-based Conversion
229+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
230+
231+ The following properties can be configured in ``/etc/cloudstack/agent/agent.properties `` on each KVM host to enable and tune the VDDK-based conversion.
232+ After editing this file, restart the CloudStack agent (``systemctl restart cloudstack-agent ``).
233+ These values can also be passed in details parameters in importVm API as key-value pairs.
234+
235+ .. cssclass :: table-striped table-bordered table-hover
236+
237+ +------------------------+----------------------------------------------------------------------+-------------------------------------------------------+
238+ | Property | Description | Default / Example |
239+ +========================+======================================================================+=======================================================+
240+ | ``libguestfs.backend `` | The libguestfs backend for VDDK-based conversion. | ``direct `` |
241+ | | Must be set to ``direct `` for VDDK to work correctly. | |
242+ +------------------------+----------------------------------------------------------------------+-------------------------------------------------------+
243+ | ``vddk.lib.dir `` | Path to the VDDK library directory on the KVM host. | ``/opt/vmware-vddk/vmware-vix-disklib-distrib `` |
244+ | | Passed to virt-v2v as ``-io vddk-libdir=<path> ``. | |
245+ +------------------------+----------------------------------------------------------------------+-------------------------------------------------------+
246+ | ``vddk.transports `` | Ordered VDDK transport preference. | Example: ``nbd:nbdssl `` |
247+ | | Passed as ``-io vddk-transports=<value> `` to virt-v2v. | |
248+ +------------------------+----------------------------------------------------------------------+-------------------------------------------------------+
249+ | ``vddk.thumbprint `` | Optional vCenter SHA1 thumbprint. | If unset, CloudStack computes it automatically on |
250+ | | Passed as ``-io vddk-thumbprint=<value> `` to virt-v2v. | the KVM host via ``openssl ``. |
251+ +------------------------+----------------------------------------------------------------------+-------------------------------------------------------+
252+
253+ Example configuration in ``/etc/cloudstack/agent/agent.properties ``:
254+
255+ ::
256+
257+ # LIBGUESTFS backend to use for VMware to KVM conversion via VDDK (default: direct)
258+ libguestfs.backend=direct
259+
260+ # Path to the VDDK library directory for VMware to KVM conversion via VDDK,
261+ # passed to virt-v2v as -io vddk-libdir=<path>
262+ vddk.lib.dir=/opt/vmware-vddk/vmware-vix-disklib-distrib
263+
264+ # Ordered VDDK transport preference for VMware to KVM conversion via VDDK, passed as
265+ # -io vddk-transports=<value> to virt-v2v. Example: nbd:nbdssl
266+ # vddk.transports=nbd:nbdssl
267+
268+ # Optional vCenter SHA1 thumbprint for VMware to KVM conversion via VDDK, passed as
269+ # -io vddk-thumbprint=<value>. If unset, CloudStack computes it on the KVM host via openssl.
270+ # vddk.thumbprint=
271+
272+
273+ Recommendations for Using VDDK-based Conversion
274+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
275+
276+ **Use a single primary storage pool for direct conversion **
277+
278+ When VDDK-based conversion is enabled, it is strongly recommended to configure the conversion to write directly
279+ to the destination primary storage pool (i.e., set *Convert to storage pool directly * to ``true `` in the import wizard).
280+ This eliminates the two-step process of the traditional OVF method, conversion to temporary storage followed by
281+ an import step, replacing it with a single streaming pipeline that writes converted QCOW2 disks directly to the
282+ destination primary storage.
283+
284+ **Network placement for optimal disk transfer throughput **
285+
286+ For best performance, place the KVM conversion host on the same high-bandwidth network as the source ESXi hosts.
287+ VDDK disk transfer uses VMware's NFC protocol on TCP port 902. ESXi routes NFC traffic to the conversion host based
288+ on standard IP routing, if the conversion host is reachable over a dedicated storage or migration network,
289+ ESXi will naturally select that VMkernel interface for disk transfer, keeping bulk data off the management network
290+ without requiring any special configuration in virt-v2v or CloudStack.
291+
120292Usage
121293-----
122294
0 commit comments