Friday, March 29, 2013

Move Virtual Box Virtual Machines to New Server/Location

Step 1: Locate and move the Virtual Machine
You will be looking for a .vdi file. The location of this file will depend upon the host platform. On Linux host, the file will be found in ~/VirtualBox VMs.

On Mac Host, the file will be found in Go>Home>VirtualBox VMs

Within that directory, you will find sub-directories of all your virtual machines. Within the virtual machine directory in question, you will find the .vdi file — that is, the file that must be moved to the new host. Copy that file to an external or shared drive and then copy it onto the new host (the location doesn’t matter).


Step 2: Create a new virtual machine
The process of creating the new virtual machine will be the same as if you were creating a standard virtual machine until you get to the Virtual Hard Disk creation screen (Figure-1). You will select Use Existing Hard Disk, click the folder icon, navigate to the newly copied .vdi file, select the file in question, and then click Next.



Step 3: Copy All MAC addressess
When you move your VM to new location it is good to copy your network card MAC address from Old Virtual Box and past into new Virtual Box virtual machine, For doing this you will not face any complicated network connectivity issue after starting your machine.

Follow the step below:

1..Select newly created Virtual machine in virtual box.
2..Click on setting
3..Click on Network
4..Delete existing MAC address and Past the same mac address as it was in old Virtual Box VM.
5..Do it with all network Cards.
6..Also make same setting for network like "NAT or Bridge" etc.


------------------------------------------------------------------------------------------------------


Since your mac address have changed you no longer have an interface called eth0, this name is reserved for an interface with the "old" mac-address. The "new" interface should have the next free name (eg. ethN).


To see all the interfaces on the machine you can use this command:

ifconfig -a

If you want to reset the name reservations for network interfaces you can remove the file

/etc/udev/rules.d/70-persistent-net.rules

and restart the machine (or remove/insert the device, though this is not possible in this case).

Alternatively you can change the interface-name that you have configured to what ever the new one is called by changing all occurences of the old name with the new one in the file


/etc/network/interfaces

No comments:

Post a Comment