Quantcast
Viewing all articles
Browse latest Browse all 2

Migrate from VirtualBox to vSphere 5.1 VMWARE

Migration of VirtualBox server to vSphere VMWare 5.1

Overview

  The following are notes to myself about what worked in my successful migration, after many pitfalls.   Note that VirtualBox supports many different hardware configurations found on PC workstations but VMware is designed for Data Center class servers which are built using Xeon CPU, and SCSI disk controllers.  Also note that VirtualBox Export does not follow the Open Virtualization Format (OVF) standard as strictly as VMware expects.  Not sure who is to blame but the result is a less than smooth migration.

Resources I liked these BLOG postings which were very helpful.

STEPS

  1. Export the VM Appliance from Oracle VirtualBox (CTRL-E) or just select from the top menu.  FILE>Export Appliance.Image may be NSFW.
    Clik here to view.
    ExportVM1
  2. Make sure to Check the [x] Write legacy OVF 0.9.This will ensure the best compatibility for VMWare.
  3. Choose OVF, not OVA.Image may be NSFW.
    Clik here to view.
    ExportVM2
  4. Do not check the [ ] Write Manifest file.  If you check this, you will not be able to edit the exported OVF file because it will tell you it has been corrupted.  The manifest file contains checksum and certificate info.
  5. Select a destination location that has enough disk space for your big ole virtual machine.  It may default to your C: documents folder.
  6. Just click [Export] and wait a while.  ..coffee getting cold.

Image may be NSFW.
Clik here to view.
ExportVM3

NOW THE FUN BEGINS!!!

If you try to run vSphere and import the machine (which is actually referred to Deploy), you can expect to see many errors displayed.  such as… Unsupported Element ‘Description’ .

Image may be NSFW.
Clik here to view.
error

You need to open your favorite text editor ( I like Notepad++) and open the OVF file that was created in the previous Export Appliance.  Check each <item> </item> block in the OVF file and correct the order of the entries.  Remember the acronym “C. D. I. R. R.” [Caption, Description, InstanceID,ResourceType].  There will probably be about  9-10 of these.  Before editing, save a backup copy of the OVF file in case you screw it up!!!    Remember how long it took to export the VM!!!

  • Caption
  • Description
  • InstanceId
  • ResourceType
  • ResourceSubType (if applicable)

Here is an example edit.

BEFORE (original OVF) 

We need to move the <rasd:AllocationUnits …> line down and insert between <rasd:ResourceType> and <rasd:Virtual Quantity..>

<Item>
<rasd:AllocationUnits>MegaBytes</rasd:AllocationUnits>
<rasd:Caption>4096 MB of memory</rasd:Caption>
<rasd:Description>Memory Size</rasd:Description>
<rasd:InstanceId>2</rasd:InstanceId>
<rasd:ResourceType>4</rasd:ResourceType>
<rasd:VirtualQuantity>4096</rasd:VirtualQuantity>
</Item>

AFTER (Corrected entry in the OVF file)

<Item>
<rasd:Caption>4096 MB of memory</rasd:Caption>
<rasd:Description>Memory Size</rasd:Description>
<rasd:InstanceId>2</rasd:InstanceId>
<rasd:ResourceType>4</rasd:ResourceType>
<rasd:AllocationUnits>MegaBytes</rasd:AllocationUnits>
<rasd:VirtualQuantity>4096</rasd:VirtualQuantity>
</Item>

NOTE:  Some items will NOT have ResourceSubType.  Don’t worry! For other entries, VMWare says that the sub items should be in Alphabetical Order.  But the first ones never change (C.D.I.R.R.) Here are some other editing tips, courtesy of TAD-DO.NET

CPU and memory both have VirtualQuantity parameter. It should be the last. Memory has also AllocationUnits element; it goes before VirtualQuantity. Address goes before BusNumber for the ide/scsi/usb controllers. AutomaticAllocation, Connection go in this order for Ethernet adapter(s). HostResource goes before Parent for a disk. Parent first, AddressOnParent second for the disks and cdroms. I know, it looks complicated, but you can always do this by trial and error.

Next step is to change sound card’s ovf settings:

<Item ovf:required="false">
     <rasd:Caption>sound</rasd:Caption>
     <rasd:Description>Sound Card</rasd:Description>
     <rasd:InstanceId>9</rasd:InstanceId>
     <rasd:ResourceType>35</rasd:ResourceType>
     <rasd:ResourceSubType>ensoniq1371</rasd:ResourceSubType>
     <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
     <rasd:AddressOnParent>3</rasd:AddressOnParent>
 </Item>

VMWare dislikes SATA controllers. Convert SATA to SCSI(Instance Id needs to be unique for all the elements):

<Item>
     <rasd:Caption>scsiController0</rasd:Caption>
     <rasd:Description>SCSI Controller</rasd:Description>
     <rasd:InstanceId>12</rasd:InstanceId>
     <rasd:ResourceType>6</rasd:ResourceType>
     <rasd:ResourceSubType>lsilogic</rasd:ResourceSubType>
     <rasd:Address>1</rasd:Address>
     <rasd:BusNumber>1</rasd:BusNumber>
 </Item>

Now change your disk’s parent element to ID of SCSI controller:

<Item>
     <rasd:Caption>disk1</rasd:Caption>
     <rasd:Description>Disk Image</rasd:Description>
     <rasd:InstanceId>11</rasd:InstanceId>
     <rasd:ResourceType>17</rasd:ResourceType>
     <rasd:HostResource>/disk/vmdisk1</rasd:HostResource>
     <rasd:Parent>12</rasd:Parent>
     <rasd:AddressOnParent>0</rasd:AddressOnParent>
 </Item>
LAST STEP!!  *almost.  DEPLOY THE CORRECTED OVF File!!!
Run vSphere Client 5.1 and select the File menu.  Deploy OVF Template.  Locate your new improved OVF and cross your fingers!!
Now fire up that virtual Machine and watch!

DOH!

This IS happening!  But its not as serious as it looks.  It might have even worked for you.  In my case, the VM created by vSphere as set to [Windows Server 2003 32bit] but the original VM from VirtualBox is a [Windows Server 2008 R2 64bit].

  1. Power down your new vSphere VM.
  2. Right click on the VM and select [ Edit settings…]
  3. On the options tab, change the drop down [Guest Operating System] to the correct entry.
  4. click OKImage may be NSFW.
    Clik here to view.
    windows64bit
  5. Power on your shiny new VM!
  6. Cross your fingers.  Hold your breath.
  7. SWEEET!Image may be NSFW.
    Clik here to view.
    sweet

  8. Last step.  Logon as Administrator  .  CTRL-ALT-INSERT
  9. Install VMWARE Tools.  From the vSphere console, choose the Inventory menu if using the vSphere Client.  This one is too easy.  Just select Install/Upgrade VMware tools and then go to the Console tab and continue with the install in the Guest VM.  Click OK, install!
  10. Reboot the VM when done.Image may be NSFW.
    Clik here to view.
    VMWARE TOOLS

 

GRAB A BREW!


Viewing all articles
Browse latest Browse all 2

Trending Articles