[SOLVED] when cloning a kvm VM the mac address is renewed

Jul 2, 2016
13
0
21
49
Hi
I don't know if it is a feature or a bug, but when I do a full clone of a kvm virtual machine by the WebUI, the mac address of the new machine is not the same than the source machine.

When I read this https://pve.proxmox.com/wiki/Duplicate_Virtual_Machines I do understand that if you want a new mac address you must remove the NIC after the cloning and add a new one.

I run the last proxmox version :

root@htpc:~# apt list proxmox* pve*
Listing... Done
proxmox-ve/now 4.2-48 all [installed,local]
pve-cluster/now 4.0-39 amd64 [installed,local]
pve-container/now 1.0-62 all [installed,local]
pve-firewall/now 2.0-25 amd64 [installed,local]
pve-firmware/now 1.1-8 all [installed,local]
pve-ha-manager/now 1.0-28 amd64 [installed,local]
pve-kernel-4.4.6-1-pve/now 4.4.6-48 amd64 [installed,local]
pve-libspice-server1/now 0.12.5-2 amd64 [installed,local]
pve-manager/now 4.2-2 amd64 [installed,local]
pve-qemu-kvm/now 2.5-14 amd64 [installed,local]

When I do a backup and then I restore it to another VM ID, the mac address is the same, so I have an immediate workaround because I mainly use proxmox to virtualise SME Server and the Mac address is used in the configuration database to set the IP. Therefore if the mac change, you must reconfigure you vm before to use the network.
 
Jul 2, 2016
13
0
21
49
Thanks a lot for your answer. Virtualbox asks if you want to reinitialise the Mac addresses of all NIC by a checkbox just before to clone the VM,....that would be a nice NFR.

I will go with the backup and restoration process
 
Jul 2, 2016
13
0
21
49
Indeed, it is another solution, but ..... Sorry for my impertinence ...I'm just coming from a full Virtualbox solution and I feel that the time to clone a machine is really long (much longer than VB). The backup/restoration process is a quick and easy way.

Maybe I can be the bug also... As I said I'm a newby here.
 
Jul 2, 2016
13
0
21
49
I tested the solution to copy and paste the old Mac address to the new machine, and it doesn't work, the new machine is looking to the old NIC without finding it....it seems like the udev rules as changed something.

EDIT:
Maybe something specific to SME Server 9(centos6 based) but every new mac add a new rule to /etc/udev/rules.d/70-persistent-net.rules with a new NIC name (eth1,eth2,eth3...). Of course it is not good for me :)
 
Last edited:

fabian

Proxmox Staff Member
Staff member
Jan 7, 2016
7,483
1,395
164
Indeed, it is another solution, but ..... Sorry for my impertinence ...I'm just coming from a full Virtualbox solution and I feel that the time to clone a machine is really long (much longer than VB). The backup/restoration process is a quick and easy way.

Maybe I can be the bug also... As I said I'm a newby here.

the time to clone depends very much on whether you are doing a full or a linked clone and on the underlying storage technology and speed.
 

LnxBil

Famous Member
Feb 21, 2015
6,059
740
133
Germany
One thing that does also change by cloning is the system UUID, which is needed for Windows Activation.
 
Jul 2, 2016
13
0
21
49
Indeed the clone linked is much more faster than a full clone :

I solved my issue by the backup and the restore feature...do a backup of your vm, then in the storage view restore the backup to another vm ID
 

SynCron

New Member
Jan 16, 2021
3
0
1
49
Would it be possible to put a duplicate VM with the same MAC in a different subnet?
 

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 your own in 60 seconds.

Buy now!