For more information, refer to the Oracle VM VirtualBox User Manual. Also, make sure that your hardware is capable of running the template's virtual machine. In particular, the virtual machine is preconfigured with 4 GB of RAM for optimal running of the software. You can assign static MAC addresses to the virtual NIC of a powered off virtual machine by using the vSphere Web Client. Assign a Static MAC Address in the Virtual Machine Configuration File To set a static MAC address for a virtual machine, you can edit the configuration file of the virtual machine by using the vSphere Web Client. It is an actual template being deployed, with a customization profile. The new VM has nothing to do with the existing one except that they were from the same template originally. I converted the template back to a VM to see if its NIC had the same MAC as these 2 are getting, but it's different. No 3rd party tools are being used for this deployment.
Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upHave a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
commented Sep 3, 2015

I am cloning from a template and not a VM in order to create Vagrant machines; when attempting to set an address type I get a NotSupportedException and when attempting to set a MAC address I'm getting 'The resource '###' is in use.' I think this is because in clone.rb add_custom_address_type and add_custom_mac_address are being called on the template before the new VM has been created. I changed my copy of clone.rb to clone first, with powerOn: false, then call add_custom_* on new_vm, all of which use ReconfigVM_Tasks. Then a PowerOnVM_Task starts the new machine. This approach has been working quite well in my testing; is there any reason it's not generally applicable? I'd be happy to open a pull request for review, but it may take some time as I'm not very proficient with Ruby and right now a number of extraneous ReconfigVM_Tasks are being executed which could be batched together. It might be better for someone more familiar with Ruby and this plugin to craft a more elegant solution. |
Vm Template With Manual Machine
commented Dec 30, 2015
I'm running into the same issue. Can you submit a pull request so i can see what you have done to solve this? |
commented Jan 6, 2016
@palmertime Sorry for the delay in my response. Unfortunately I am not permitted to open pull requests at this time; however, it's a pretty simple change in lib/vSphere/action/clone.rb. Essentially, a card_spec is built in add_custom_mac as in add_custom_address_type and then ReconfigVM_Task is called on new_vm with the spec parameter being card_spec. |
commented May 20, 2018
Is there any update on this ? |
I am trying to deploy a VM from a template. This template has been used dozens of times before; nothing special. The problem is that seemingly out of nowhere when I deploy a VM, it's giving it the same MAC address as an existing powered on VM.
Vmware Template Vm
Both VMs are using automatic MAC assignment.
It seems that the usual cause for this is having more than 1 vCenter without giving each one a unique ID. Thing is, we only have 1 vCenter.
I have confirmed in the vCenter database, using the following query, that there are no other conflicts in the cluster:
I keep deleting the newly minted VM and trying to re-deploy it, but it gives out the same MAC every time.
When I create a new VM from scratch, it uses a unique MAC.
I can't find any other instances of something like this online, and I can't figure out how this is possible nor what I can do to fix it. I don't want to start assigning MAC addresses manually.
Update
This has gone from a problem that was repeatable to.. not a problem. I don't know what happened or why, but this originally occurred for me on Friday evening, several times. I was able to repeat it this morning before posting this.
Testing now shows unique MACs being generated; no duplicates.
I have no idea why, I'd still like insight if anyone has ideas. I have a sneaking suspicion that this is going to come back. Ugggh.
1 Answer
Vm Template With Manual Mac Os
I've seen similar issues after upgrading vCenter with old customization profiles, after some version upgrades the profiles become flaky. The usual fix is to just recreate the customization profile from scratch.