Virtual PC Guy's Blog

-- Ben Armstrong, Virtualization Program Manager

Talking about core virtualization at Microsoft (Hyper-V, Virtual PC and Virtual Server).

Welcome to MSDN Blogs Sign in | Join | Help

The virtual machine MAC address changes under Virtual PC...

MAC address management is a tricky task with virtual machines.  We need to be able to generate unique MAC addresses for each virtual machine - and try to do everything we can do to avoid MAC address conflicts.  Under Virtual Server we allow a user to specify whether their virtual machine should use static MAC addresses (managed by the user) or dynamic MAC addresses (managed by us) - but under Virtual PC we only allow for the use of dynamic MAC addresses.  What this means is that Virtual PC will generate a new MAC address for the virtual machine on the following events:

  1. When the virtual machine is created
  2. When we detect a MAC address conflict with another running virtual machine
  3. When the virtual machine is registered

The purpose of the 3rd event is so that if a user takes an existing virtual machine and copies it - they can then bring it up without having to worry about duplicate MAC addresses.  However, this can cause problems in scenarios where multiple users are sharing a physical computer and virtual machine. Each time a new user logs in and attempts to use the virtual machine, it will have to be registered and we will generate a new MAC address.  A relatively easy way to work around this problem is to create a batch file that does the following:

  1. Backs up the existing .VMC file
  2. Registers the virtual machine using 'Virtual PC.exe -registervm'
  3. Restores the backed up .VMC file
  4. Powers on the virtual machine

This way the original MAC address will be maintained.

Cheers,
Ben

Published Tuesday, February 15, 2005 12:06 PM by Virtual PC Guy

Comments

# re: The virtual machine MAC address changes under Virtual PC...

What program use for backup ?
Tuesday, February 15, 2005 9:45 PM by web

# re: The virtual machine MAC address changes under Virtual PC...

Just use 'copy' to copy the .VMC file to a safe location.

Cheers,
Ben
Tuesday, February 15, 2005 11:14 PM by Virtual PC Guy

# re: The virtual machine MAC address changes under Virtual PC...

this is a very good tip!
I didn't know about point #3.

Thanks
Wednesday, February 16, 2005 6:06 AM by Gabriele
New Comments to this post are disabled
 
Page view tracker