|
| 1 | +--- |
| 2 | +date: 2025-04-01 |
| 3 | +title: Enable nbdkit vddk plugins |
| 4 | +authors: |
| 5 | + - pram0596 |
| 6 | +description: > |
| 7 | + Enable vddk plugins to migrate a virtual machine from VMware to OpenStack using vpx. |
| 8 | +categories: |
| 9 | + - virt-v2v |
| 10 | + - openstack |
| 11 | + - migration |
| 12 | +--- |
| 13 | + |
| 14 | +# Enable nbdkit vddk plugins |
| 15 | + |
| 16 | +This document describes the path to build and install vddk plugins for nbdkit which is required to migrate a virtual machine from VMware to OpenStack using vpx. Please keep in mind that it requires VMware proprietary library that you must download yourself. |
| 17 | + |
| 18 | +## Reference Docs |
| 19 | +[nbdkit VMware vddk plugins guide](https://libguestfs.org/nbdkit-vddk-plugin.1.html) |
| 20 | +[Broadcom developer portal](https://developer.broadcom.com/sdks/vmware-virtual-disk-development-kit-vddk/latest) |
| 21 | +[vddk program guide](https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vddk-programming-guide/GUID-158D8330-7C9C-4F9C-83E1-4DC154DA3C66.html) |
| 22 | + |
| 23 | +## Pre-requisite |
| 24 | ++ You should have account to Broadcom developer site to download library. |
| 25 | + |
| 26 | +## Environment |
| 27 | +Kindly refer below details which is used in this documentation. IPs/FQDN and Openstack properties can be different in your environment. |
| 28 | + |
| 29 | ++ **virt-v2v Virtual appliance** - `192.168.11.11` |
| 30 | + |
| 31 | +## Steps |
| 32 | +We can divide the whole procedure into two parts. First would be to build and install vddk plugins for nbdkit and second would be to download and use VMware vddk library. |
| 33 | + |
| 34 | +### Build and Install vddk plugins |
| 35 | +Follow below steps to build and configure vddk plugins |
| 36 | +#### Login to virt-v2v appliance |
| 37 | +**On controller node** |
| 38 | +```shell |
| 39 | +ssh -i ~/.ssh/rpc_support [email protected] |
| 40 | +sudo -i |
| 41 | +``` |
| 42 | + |
| 43 | +#### Download vddk source code |
| 44 | +Download vddk code from git repository. |
| 45 | +**On virtual appliance:** |
| 46 | +```shell |
| 47 | +git clone https://github.com/libguestfs/nbdkit.git |
| 48 | +``` |
| 49 | +#### Install packages and vddk plugins |
| 50 | +Run below commands to install required packages and vddk plugins. |
| 51 | +**On virtual appliance:** |
| 52 | +```shell |
| 53 | +sudo apt-get install libtool |
| 54 | +apt install pkg-config m4 libtool automake autoconf |
| 55 | +cd nbdkit/ |
| 56 | +autoreconf -i |
| 57 | +./configure --disable-dependency-tracking |
| 58 | +apt install make |
| 59 | +make |
| 60 | +make install |
| 61 | +cp /usr/local/lib/nbdkit/plugins/nbdkit-vddk-plugin.so \ |
| 62 | + /usr/lib/x86_64-linux-gnu/nbdkit/plugins/ |
| 63 | +``` |
| 64 | +#### Verify vddk plugins |
| 65 | +Check and verify if vddk plugins has been installed successfully. |
| 66 | +**On virtual appliance:** |
| 67 | +```shell |
| 68 | +nbdkit vddk libdir=/usr/local/lib/nbdkit/plugins/ --dump-plugin |
| 69 | +``` |
| 70 | +**Example output** |
| 71 | +```shell |
| 72 | +path=/usr/local/lib/nbdkit/plugins/nbdkit-vddk-plugin.so |
| 73 | +name=vddk |
| 74 | +version=1.33.11 |
| 75 | +api_version=2 |
| 76 | +struct_size=384 |
| 77 | +max_thread_model=parallel |
| 78 | +thread_model=parallel |
| 79 | +errno_is_preserved=0 |
| 80 | +magic_config_key=file |
| 81 | +has_longname=1 |
| 82 | +has_unload=1 |
| 83 | +has_dump_plugin=1 |
| 84 | +has_config=1 |
| 85 | +has_config_complete=1 |
| 86 | +has_config_help=1 |
| 87 | +has_get_ready=1 |
| 88 | +has_after_fork=1 |
| 89 | +has_open=1 |
| 90 | +has_close=1 |
| 91 | +has_get_size=1 |
| 92 | +has_block_size=1 |
| 93 | +has_can_flush=1 |
| 94 | +has_can_extents=1 |
| 95 | +has_can_fua=1 |
| 96 | +has_pread=1 |
| 97 | +has_pwrite=1 |
| 98 | +has_flush=1 |
| 99 | +has_extents=1 |
| 100 | +vddk_default_libdir=/usr/local/lib/vmware-vix-disklib |
| 101 | +vddk_has_nfchostport=1 |
| 102 | +``` |
| 103 | +### Download and place VMware vddk library |
| 104 | +Follow below steps to use VMware vddk library |
| 105 | +#### Download vddk library |
| 106 | +Login to Broadcom web link https://developer.broadcom.com/sdks/vmware-virtual-disk-development-kit-vddk/latest and download zip file. Place it under /tmp/ on virt-v2v appliance. In my case I downloaded the latest version which is `8.0.3`. |
| 107 | + |
| 108 | +#### Move tar file under /opt and extract it |
| 109 | +```shell |
| 110 | +ls -l /tmp/VMware-vix-disklib-8.0.0-20521017.x86_64.tar.gz |
| 111 | +mv /tmp/VMware-vix-disklib-8.0.0-20521017.x86_64.tar.gz /opt/ |
| 112 | +cd /opt |
| 113 | +tar xvzf VMware-vix-disklib-8.0.0-20521017.x86_64.tar.gz |
| 114 | +cd vmware-vix-disklib-distrib/ |
| 115 | +ls |
| 116 | +``` |
| 117 | +Appliance is ready to migrate VM using vddk plugins now. Refer [Coming soon...](Link) to use vddk plugins for migration. |
0 commit comments