[SOLVED] Command "pct set VMID -net0" now changing hwaddr value

Datajock

Active Member
Jan 14, 2019
11
2
43
Yesterday I started having issues with the Ansible "
community.proxmox.proxmox" module where is "changes" an LXC container that had nothing changed. I tracked it down to the hwaddr getting changed on the network interface. This must have changed at some point because this did not previously make that change on subsequent calls of the module.

I have been able to reproduce this with this command.

Code:
pct set 6063 -net0 name=eth0,bridge=vmbr0,gw=192.168.6.1,ip=192.168.6.201/24,type=veth

In this example here is the diff of the config file that got changed.

Code:
root@gadget2:~# diff /etc/pve/nodes/gadget2/lxc/6063.conf 6063.conf
7c7
< net0: name=eth0,bridge=vmbr0,gw=192.168.6.1,hwaddr=BC:24:11:01:E3:80,ip=192.168.6.201/24,type=veth
---
> net0: name=eth0,bridge=vmbr0,gw=192.168.6.1,hwaddr=BC:24:11:B9:BB:49,ip=192.168.6.201/24,type=veth

This is a three node cluster (probably irrelevant) with this version of PVE.

Code:
root@gadget2:~# pveversion -v
proxmox-ve: 8.4.0 (running kernel: 6.8.12-15-pve)
pve-manager: 8.4.14 (running version: 8.4.14/b502d23c55afcba1)
proxmox-kernel-helper: 8.1.4
proxmox-kernel-6.8: 6.8.12-15
proxmox-kernel-6.8.12-15-pve-signed: 6.8.12-15
proxmox-kernel-6.8.12-9-pve-signed: 6.8.12-9
ceph: 19.2.2-pve1~bpo12+1
ceph-fuse: 19.2.2-pve1~bpo12+1
corosync: 3.1.9-pve1
criu: 3.17.1-2+deb12u2
frr-pythontools: 10.2.3-1+pve1
glusterfs-client: 10.3-5
ifupdown2: 3.2.0-1+pmx11
intel-microcode: 3.20250512.1~deb12u1
ksm-control-daemon: 1.5-1
libjs-extjs: 7.0.0-5
libknet1: 1.30-pve2
libproxmox-acme-perl: 1.6.0
libproxmox-backup-qemu0: 1.5.2
libproxmox-rs-perl: 0.3.5
libpve-access-control: 8.2.2
libpve-apiclient-perl: 3.3.2
libpve-cluster-api-perl: 8.1.2
libpve-cluster-perl: 8.1.2
libpve-common-perl: 8.3.4
libpve-guest-common-perl: 5.2.2
libpve-http-server-perl: 5.2.2
libpve-network-perl: 0.11.2
libpve-rs-perl: 0.9.4
libpve-storage-perl: 8.3.7
libspice-server1: 0.15.1-1
lvm2: 2.03.16-2
lxc-pve: 6.0.0-1
lxcfs: 6.0.0-pve2
novnc-pve: 1.6.0-2
proxmox-backup-client: 3.4.6-1
proxmox-backup-file-restore: 3.4.6-1
proxmox-backup-restore-image: 0.7.0
proxmox-firewall: 0.7.1
proxmox-kernel-helper: 8.1.4
proxmox-mail-forward: 0.3.3
proxmox-mini-journalreader: 1.5
proxmox-offline-mirror-helper: 0.6.8
proxmox-widget-toolkit: 4.3.13
pve-cluster: 8.1.2
pve-container: 5.3.3
pve-docs: 8.4.1
pve-edk2-firmware: 4.2025.02-4~bpo12+1
pve-esxi-import-tools: 0.7.4
pve-firewall: 5.1.2
pve-firmware: 3.16-3
pve-ha-manager: 4.0.7
pve-i18n: 3.4.5
pve-qemu-kvm: 9.2.0-7
pve-xtermjs: 5.5.0-2
qemu-server: 8.4.3
smartmontools: 7.3-pve1
spiceterm: 3.3.1
swtpm: 0.8.0+pve1
vncterm: 1.8.1
zfsutils-linux: 2.2.8-pve1

Any help in resolving this will be much appreciated.
 
This may be an issue with the proxmoxer python module or even something that changed in the "community.proxmox.proxmox" module. I looked at a different system and is running a little older PVE version, that I don't remember having an issue and it also changes the hwadddr when not specified.
This feels like a bug. If I specify hwaddr=xx in command, then I would expect it to be changed, but when omitted, I would expect this to be left unchanged.
 
Last edited:
It looks like this is an issue with the Ansible community.proxmox.proxmox module and that I had changed to that from using the community.general.proxmox module. This appears to be where things changed.

I still can't help but feel like the API changing the hwaddr of an LXC container like that is the wrong thing for it to do.

But since this doesn't seem to have changed in Proxmox itself, this thread can be closed.