Moving a set of VM guests from one VMware server to another

VM guests (their disk data and configuration) are stored in datastores. A datastore is simply a unix partition with a collection of directories, one per VM guest. A datastore is usually located on a SAN volume - the advantage of this is that it is very simple to move a set of VM guests to a new server in the event of a server failure, simply by mounting the datastore on the replacement server and issuing some simple commands.

To move a datastore (and its VM guests) from server A to server B.

  1. Assuming server A is still running, on server A run /etc/rc.d/init.d/vmware stop - this should close down all VM guests. Now shutdown server A (or at least dismount the datastore). Note: if (and only if) server A and server B are of identical hardware type it may be safe to suspend, rather than stop, the VM guests.
  2. Ensure that the SAN volume holding the datastore is accessible by server B and not server A (using LUN masking). For safety's sake, disable access to the volume from any other server.
  3. Cut and paste the relevant fstab entries for the datastore from server A's LCFG profile to server B's LCFG profile. Remember to comment out the entries in server A's LCFG profile.
  4. Mount the datastore on server B
  5. Connect to server B's web console and configure VMware to use the datastore by choosing the "Add Datastore" command (right most pane).
  6. Again using the web console, add each of the VM guests in the datastore using the "Add Virtual machine to inventory" command. You will have to navigate into each VM guest directory and choose the .VMX file for that VM guest.
  7. Start the VM guests. For each VM guest you will be asked whether you are copying or moving/migrating the VM guest - you are moving/migrating the guests.

-- AlastairScobie - 16 Apr 2009

Topic revision: r2 - 22 Nov 2010 - 15:35:39 - AlastairScobie
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
This Wiki uses Cookies