Problem
I would like to move my OpenServer 5 Definitive Virtual Machine from VirtualBox to VMware ESXi.
Solution
Take the following steps to prepare your VM for export for VMware ESXi.
1) Shutdown and power off the VM in VirtualBox Manager.
2) Create a full clone of the VM and power it up, leaving the original VM powered off.
3) Login to the cloned VM as root4) Save a copy of the existing kernel, to retain the ability to boot the VM on VirtualBox:
btmnt -w
cp /stand/unix /stand/unix.vbox
btmnt -r5) Setup a new kernel environment for VMware ESXi with these changes:
5a) Edit /etc/conf/sdevice.d/lsil
(verify entries set to 'Y')5b) Edit /etc/conf/sdevice.d/ahci (change all from 'Y' to 'N')
5c) Edit /etc/conf/sdevice.d/wd (change all from 'N' to 'Y')
5d) Edit /etc/conf/cd.d/mscsi Change 'ahci Srom' entry to 'wd Srom 0 0 0 0' Change 'ahci Sdsk' entries to 'lsil Sdsk 0 0 0 0' incrementing the target id so each line is unique.
the results should look similar to:wd Srom 0 0 0 0
lsil Sdsk 0 0 0 0
lsil Sdsk 0 1 0 05e) Build a new kernel:/etc/conf/cf.d/link_unix -y6) Shutdown using `shutdown -y -g0`7) Power down the VM in VirtualBox Manager8) From VirtualBox Manager, choose File->Export ApplianceUse 'Open Virtualization Format 1.0' (OVF) file type to create an OVA (Open Virtualization Archive) file. Referenced as MyVM.ova for this article.
NOTE: The OVA archive is a tar archive with ovf and vmdk files included.9) Modify the OVF file in the OVA archive.
9a) Use `tar` to extract the OVA archive
tar xvf MyVM.ova9b) Edit MyVM.ovf using your preferred editor.
9c) Search for the line: <vssd:VirtualSystemType>virtualbox-2.2</vssd:VirtualSystemType> change it to: <vssd:VirtualSystemType>vmx-07</vssd:VirtualSystemType>
NOTE: Failure to do step 9c will result in an import error:
"Unsupported Hardware Family virtualbox-2.2"9d) Search for the section for the SATA controller, similar to:
<rasd:Caption>sataController0</rasd:Caption>
<rasd:Description>SATA Controller</rasd:Description>
<rasd:ElementName>sataController0</rasd:ElementName>
<rasd:InstanceID>3</rasd:InstanceID>
<rasd:ResourceSubType>AHCI</rasd:ResourceSubType>
<rasd:ResourceType>20</rasd:ResourceType>Change this to an lsilogic SCSI controller, like this:
<rasd:Caption>scsiController0</rasd:Caption>
<rasd:Description>SCSI Controller</rasd:Description>
<rasd:ElementName>scsiController0</rasd:ElementName>
<rasd:InstanceID>3</rasd:InstanceID>
<rasd:ResourceSubType>lsilogic</rasd:ResourceSubType>
<rasd:ResourceType>6</rasd:ResourceType>NOTE: Failure to do step 9d will result in an import error:
"OVF hardware element 'ResourceType' with instance ID '3'
No support for the virtual hardware device type '20'"9e) Remove section for SATA CD-ROM from the ovf file
<Item>
<rasd:AddressOnParent>1</rasd:AddressOnParent>
<rasd:AutomaticAllocation>true</rasd:AutomaticAllocation>
<rasd:Caption>cdrom1</rasd:Caption>
<rasd:Description>CD-ROM Drive</rasd:Description>
<rasd:ElementName>cdrom1</rasd:ElementName>
<rasd:InstanceID>5</rasd:InstanceID>
<rasd:Parent>3</rasd:Parent>
<rasd:ResourceType>15</rasd:ResourceType>
</Item>NOTE: Failure to do step 9e will result in an import error:
"No space for ID 5 on Parent 3"9f) Use tar to recreate MyVM.ova archive file:
tar cvf MyVM.ova MyVM.ovf MyVM-disk001.vmdk MyVM-disk002.vmdk10) Transfer the modified OVA file to a location where you can import it through your VMware vSphere client.
11) When importing the OVA file into ESXi, the VM should be configured with these characteristics.
Edit the VM settings, check the configuration of these devices:
SCSI LSI Parallel HBA with disks matching IDs set in mscsi. CD-ROM drive as IDE, primary, master [IDE(0:0)] E1000 vNIC
NOTE: During import you may see an error about OVF conformance or compliance
check failures. When prompted, choose 'retry' to relax the OVF
specification. The import should continue.12) Boot the new VM in VMware ESXi. You will see errors
about a missing network card. Enter maintenance mode.13) Run `netconfig`,13a) Highlight the existing LAN adapter13b) Choose Hardware->Remove network device13c) Choose Hardware->Add new LAN adapter13d) Configure the Intel Pro 1000 for the VMware network
13e) Upon exit, rebuild kernel, shutdown and reboot.
At this point your Virtual Machine migration should be
complete. If the hostname or IP address changed for the new network,
the system node name, hostname, domain name and gateway may also
need to be updated. Examine and correct these files:/etc/default/tcp
/etc/hosts
/etc/resolv.conf14) Load VMware tools from the OpenServer5 Definitive ISO.
14a) Map the ISO image to the CD-ROM using the vSphere client.
14b) Mount the ISO to the /mnt directory:
mount /dev/cd0 /mnt14c) Using the scoadmin software manager (custom), choose: Software->Install New->(this host)->Media Images When prompted for the directory use: /mnt/opt/osr507v Expand the OSR507V for VMware Virtual Machines (ver 3.0) Deselect the main package and select these sub packages:
libdnet - low-level network interface library (ver 3.0.0Ab) pth - GNU Portable Threads (ver 3.0.0Ab) skglib - threaded glib (ver 3.0.0Ab) uriparser - RFC 3986 URI parsing library (ver 3.0.0Ab) vmtools - VMware Tools (ver 3.0.0Ab)
Choose Install14d) Shutdown and Reboot the VM to start the vmtools.
See also
TA105356 - Can I change my SCSI root controller to another type without reinstalling?
TA127730 - Can my 507v3 virtual machine on VMware be modified to use the E1000 vNIC?
TA110039 - How to change the System Name, Domain Name, and IP address?
TA102428 - Receiving "WARNING: portmapper on server [IP] is not responding" or "WARNING: NLM: RPC call failed: RPC_PMAPFAILURE".