kvm: change mac address

natxo

Member
May 17, 2008
30
0
6
another problem ;)

I have 2 kvm vm's, both with debian etch. They work fine, but they both get the same mac-address. So when I turn the second on, I lose network connectivity.

Here http://blog.cynapses.org/2007/07/12/qemu-kvm-internal-network-setup/ I get a tip.

This is the original /etc/qemu-server/xxx.conf:

network: model=rtl8139,tap

and I change it to

network: model=rtl8139,macaddr=52:54:00:12:34:57,tap

but then when i stop and start the vm I have no eth0.

how can I solve this? TIA
 
I fixed it for now adding this to eth0 in /etc/network/interfaces:

hwaddress ether 52:54:00:12:34:57

but this should be fixed during the installation of the kvm vm
 
You need to delete the udev file z25_persistent-net.rules inside the VM if you change the mac address:

> rm /etc/udev/rules.d/z25_persistent-net.rules

We will generate an unique MAC in V1.0 - its already on the TODO list.

- Dietmar
 

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!