1

We are trying to distribute a virtualized version of our product (a tiny computer) by setting up a virtual machine, installing all of our software on it, exporting it as an appliance, and distributing this appliance to users. The issue is, we rely on the MAC address of each of our physical devices to be unique for registration purposes, and every VM that is created from the image of our original VM has the same MAC address by default.

So the question is, is there some way to distribute VM-appliance images such that each one generated a unique mac-address on boot? If not, are there any unique identifiers (unique across all copies of the same image) that we could use in place of a mac-address to do this?

John Allard
  • 3,564
  • 5
  • 23
  • 42

1 Answers1

3

If using VirtualBox, the only way to ensure a different mac address from the original source is to make a new clone and ensuring to check the "Reinitialice MAC Address", then, export the appliance from the new clone. Due the fact that you can do this also from "vboxmanage", and also, from the same utility you can change the macaddress of the machine, you can set up your clone with the specific mac for your customer "X" first (scripted), then from it create the appliance !.

vboxmanage modifyvm NameOrUUIDOfYourClonedVM --macaddress<1-N> THENEWMAC

Later, export the appliance with the same utility:

vboxmanage export NameOrUUIDOfYourClonedVM

Remember you can script everything !.

tigerlinux
  • 386
  • 1
  • 6
  • Thanks for the reply, I'll test it out later today and accept if it works. – John Allard Oct 07 '16 at 21:06
  • Actually, quick question, this only changes the mac address to that single clone, right? If I then export an appliance of this clone, everyone who loads that appliance will have the same mac-address, right? So essentially I need to make as many clones as number of copies I have to give out? – John Allard Oct 07 '16 at 21:09
  • Yes and Yes. The procedure will change the mac of that single clone, and anything exported from it will have the same mac. You'll have to construct an individual clone for a individual user as you wrote in your comment. – tigerlinux Oct 08 '16 at 18:40
  • Unfortunately not everything can be reliably scripted. You cannot *get* MAC address reliably. Order of `/VirtualBox/GuestInfo/Net//`is not guaranteed to be stable, and duplicates may appear. – George Sovetov Dec 14 '17 at 17:04