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:
- When the virtual machine is created
- When we detect a MAC address conflict with another running virtual machine
- 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:
- Backs up the existing .VMC file
- Registers the virtual machine using 'Virtual PC.exe -registervm'
- Restores the backed up .VMC file
- Powers on the virtual machine
This way the original MAC address will be maintained.
Cheers,
Ben