Copying VM from one machine to another

From Nuclear Physics Group Documentation Pages
Revision as of 19:32, 22 December 2009 by Tbow (talk | contribs)
Jump to navigationJump to search

1. In the VMWare Infrastructure Web Access page select:

 Virtual Machine>Add Virtual Machine to Inventory
 Browse through and find the VM you want to add and select the .vmx file in the directory.

2. When you hit Power On you will get a message giving you two options to choose from when copying a VM from machine to machine and then starting that VM:

 I moved it
 I copied it

I moved it

This option preserves everything in the VM and as long as the VMWare server configuration is identical between the two machines the VM will start with no problems.

Important Note:

 If you copy the VM while it is running make sure to run rm -rf *.vmem *.lck 
 in the copied directory before starting the VM

I copied it

This will give you some trouble because VMWare server will try to reconfigure the virtual network interfaces by changing the MAC addresses.

You can change the MAC on each virtual interface in the main configuration of the machine on the VMWare Infrastructure Web Access page.

 Click on "Network Adapter 1" and click edit.
 In this window you can manually enter the MAC.

The easiest way is to go into the virtual console and recreate the interface files in /etc/sysconfig/network-scripts.

In fedora 11 you can't login into the gui as root, so with the focus on the console just hit Ctrl-Alt-F1-9.

Important Note:

 If interfaces don't come up then this may be due to a mismatch in MAC addresses and correcting the MACs in 
   /etc/sysconfig/ network-scripts/
 But sometimes this will not work.  So I found by running the command:
   dmesg|grep eth0
 it would output something like this:
    "eth1 being renamed to eth4"
 This lead me to change the eth0 and eth1 MACs in: