Auto-Generate MAC Address on new interface.

Jim Surles

Member
May 29, 2018
6
0
6
50
Hello.

I am trying to determine a way to add a new network interface from the command line. After looking around, I found that I can add one using qm set:

qm set 600 -net2 virtio=00:00:00:00:00:00,bridge=vmbr4,tag=104

But the challenge I'm experiencing, is that if I leave the MAC address out, it fails because "net2.macaddr: value does not match the regex pattern". I know when creating via the GUI, it autogenerates a random one.

Is there a way to have it autogenerate a random MAC while using qm set?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!