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
OneSwap is part of a set of tools and services designed to guide you in achieving a smooth transition from VMware. These include the [VMware Migration Service](https://support.opennebula.pro/hc/en-us/articles/18919424033053-VMware-Migration-Service), a complete guidance and support framework to help organizations define and execute their migration plan with minimal disruption to business operations. Further information is available in [Migrating from VMware to OpenNebula](https://support.opennebula.pro/hc/en-us/articles/17225311830429-White-Paper-Migrating-from-VMware-to-OpenNebula).
21
21
{{< /alert >}}
22
+
23
+
## Installation and requirements
24
+
25
+
The package `opennebula-swap`, provided on the official repositories, provides the command `oneswap`.
26
+
27
+
It can be installed in Ubuntu with
28
+
29
+
```
30
+
apt install opennebula-swap
31
+
```
32
+
33
+
And in Alma Linux and RHEL with
34
+
35
+
```
36
+
dnf install opennebula-swap
37
+
```
38
+
39
+
### Requirements and recommended settings
40
+
41
+
OneSwap requirements for virtual conversion from VMWare to OpenNebula are the following:
42
+
- OneSwap is only supported on Ubuntu 24.04 LTS and Alma Linux/RHEL 9 servers. On previous versions of Ubuntu and Alma/RHEL some dependencies are outdated.
43
+
- A working OpenNebula environment with capacity enough to store imported images and VMs and a user with permissions on the destination datastores. Alternatively, conversion can be done with user `oneadmin` and set the right permissions in a posterior step.
44
+
- A vCenter endpoint with valid credentials to export the VMs.
45
+
- The parameters `vcenter`, `vuser`, `vpass` and `port` must be specified.
46
+
- If Delta conversion mode is being used, the user running `oneswap` command must have ssh passwordless access to the ESXi host where the VMs to convert are running.
47
+
- If oneswap is ran on a different machine than OpenNebula frontend, then the following components must also be configured:
48
+
- Set up the transfer method options (oneswap parameters `http_transfer`, `http_host` and `http_port`).
Most OneSwap parameters can be configured on the file `/etc/one/oneswap.yaml` but **the user running `oneswap` must be able to run CLI commands on the destination OpenNebula frontend** (i.e. being able to run `onevm list`). If `oneswap` is ran from the frontend as `oneadmin` user this works directly.
If `oneswap` runs from a server different than OpenNebula frontend, [check the documentation]({{% relref "command_line_interface#cli-configuration" %}}) about installing the CLI commands and xport the variables `ONE_XMLRPC` and `ONE_AUTH` accordingly.<br/>
56
+
Normally that means populating the file `$HOME/.one/one_auth` with `username:password` and adding `export ONE_XMLRPC=http://opennebula_frontend:2633/RPC2` on the user profile, but it is recommended to check the documentation.
57
+
{{< /alert >}}
58
+
59
+
### Optional requirements and required tools
60
+
61
+
- VDDK library is recommended to improve disk transfer speeds. As of the moment of writing, the library can be downloaded from [Broadcom developer portal](https://developer.broadcom.com/sdks/vmware-virtual-disk-development-kit-vddk/latest/). VDDK version **MUST** match the vcenter version.
62
+
- It is recommended to increase the vCenter API timeout to avoid request timeouts while converting big VMs. By default this value is 120 minutes and can be changed in vCenter at "Administration -> Deployment -> Client Configuration", allowing values up to 1440 minutes (24 hours).
63
+
- The following libraries/programs must be installed
64
+
-`libguestfs` library, version must be >= 1.50
65
+
-`libvirt` library, version should be >= 8.7.0
66
+
-`virt-v2v`, stable version
67
+
68
+
Ubuntu 24.04 and AlmaLinux/RHEL 9 provide up to date versions of the packages
69
+
70
+
### Required software for migrating Windows Virtual machines
71
+
72
+
There are two requirements to convert Windows Virtual Machines:
73
+
-[VirtIO ISO drivers](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso) must be stored in the `/usr/local/share/virtio-win` directory.
74
+
-[RHsrvany, an Open Source srvany implementation](https://github.com/rwmjones/rhsrvany) to create the needed Windows services during the migration.
75
+
- In Alma Linux and RHEL this package is a dependency of OneSwap and will be installed automatically
76
+
- In Ubuntu [the package can be downloaded from fedoraproject.org](https://kojipkgs.fedoraproject.org/packages/mingw-srvany/1.1/11.eln153/noarch/mingw-srvany-redistributable-1.1-11.eln153.noarch.rpm). <br/>
77
+
For compatibility with older versions of virt2v the following symlinks are needed
OneSwap supports two different modes for the migration of Virtual machines:
101
+
-**Regular mode** (non-delta)
102
+
-**Requires VMs to be powered-off** (neither suspended or hibernating)
103
+
-**VMs to convert must not have any snapshot**
104
+
-**Delta mode** is intended for low-downtime migrations (slower)
105
+
-**VMs must be powered on**
106
+
107
+
### On Linux VMs
108
+
- The virtual machine must have the kernel headers installed. The name of the package may differ on each distribution, for instance, in Ubuntu the package to install is `linux-headers` and in Alma Linux is `kernel-headers`.
109
+
- The guest kernel version must support virtio drivers (kernel 2.6.30 or greater, which was issued on 2009-07-09).
110
+
- virt-v2v tool does not support updating GRUB2, if the following message is shown during the conversion process:
111
+
112
+
```
113
+
WARNING: could not determine a way to update the configuration of Grub2
114
+
```
115
+
116
+
booting the VM from a rescue CD and fixing grub may be necessary.
117
+
118
+
### On Windows VMs
119
+
- Fast startup must be disabled (Control Panel -> Power Options -> Advanced power settings)
120
+
- Installing (VirtIO Storage and Network drivers \(available at their github\))[https://github.com/virtio-win/virtio-win-pkg-scripts/blob/master/README.md] before the conversion will improve conversion times. If not, they will be injected later.
121
+
- Officially, Windows 2016 and onwards **require** UEFI boot.
122
+
- Windows VMs can only be converted with virt-v2v style transfer (`custom` and `fallback` styles will fail)
123
+
124
+
### Virtual machines with UEFI BIOS
125
+
OneSwap normally detects if the VM boots in UEFI mode and sets up OpenNebula template accordingly, but in some strange cases autodetection may fail. In these cases, modify the following options on the OpenNebula template:
126
+
- CPU architecture: `x86_64`
127
+
- Machine type: `q35`
128
+
- UEFI firmware: UEFI (for secure firmware the box must be checked)
129
+

130
+
131
+
## `oneswap` usage
132
+
133
+
### Transfer methods
134
+
135
+
There are four methods to transfer the images from ESX to OpenNebula. Ordered from faster to slowest:
136
+
137
+
-**Hybrid**
138
+
- Use [RbVmomi2](https://github.com/ManageIQ/rbvmomi2) library to download locally the image before importing to OpenNebula.
139
+
- Fast, but requires extra disk space as it copies the image.
140
+
-**VDDK Library**
141
+
- Use VMWare Virtual Disk Development Kit library.
142
+
- The parameter `--vddk /path/to/lib` must be defined.
143
+
-**ESXi Direct SSH transfer**
144
+
- Copy the disk via SSH from the ESXi host. Incompatible with VDDK.
145
+
- Requires defining the options `--esxi`, `--esxi_user` and `--esxi_pass`
146
+
-**vCenter API**
147
+
- The slowest option (vCenter API is used to download the image).
148
+
149
+
A custom conversion option is also provided, which is only recommended as a fallback, that does not use virt-v2v. It relies on RbVmomi2, using qemu-img and virt-customize/guestfish to prepare the image for OpenNebula.
150
+
151
+
### Importing VMs
152
+
153
+
Before migrations, `oneswap` can query ESX VMs and datacenters
154
+
155
+
| Command | Output |
156
+
| --- | --- |
157
+
|`oneswap list datacenters`| Lists Datacenters |
158
+
|`oneswap list clusters [--datacenter DCName]`| List clusters (can filter by datacenter) |
159
+
|`oneswap list vms [--datacenter DCName [--cluster ClusterName]]`| List VMs on ESX. Cluster needs the Datacenter name. |
160
+
161
+
For convenience, it is a good practice to populate the `/etc/one/oneswap.yaml` file with the values that will apply for most migrated VMs. If the user running oneswap has no permissions to edit the file, it can be copied, modified and execute `oneswap` with the parameter `--config-file NEW_CONFIG_FILE.yaml`
0 commit comments