$ virsh dumpxml myvm | grep address <mac address='52:54:00:fa:c8:17'/> $ virsh detach-interface myvm bridge --mac '52:54:00:fa:c8:17' error: operation failed: network device cannot be detached - device state missing $ virsh attach-interface myvm bridge br0 --mac '00:16:3e:10:34:31' Interface attached successfully $ virsh dumpxml myvm | grep address <mac address='52:54:00:fa:c8:17'/> <mac address='00:16:3e:10:34:31'/> $ virsh detach-interface myvm bridge --mac '52:54:00:fa:c8:17' error: operation failed: network device cannot be detached - device state missing $ virsh detach-interface myvm bridge --mac '00:16:3e:10:34:31' Interface detached successfully $ virsh net-list --all Name State Autostart -----------------------------------------
$ ping -c1 myvm PING myvm.inside.mydomain.net (10.10.10.38) 56(84) bytes of data. 64 bytes from myvm.inside.mydomain.net (10.10.10.38): icmp_seq=1 ttl=64 time=12.7 ms --- myvm.inside.mydomain.net ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 12.718/12.718/12.718/0.000 ms $ virsh shutdown myvm Domain myvm is being shutdown $ virsh dumpxml myvm <domain type='kvm'> <name>myvm</name> <uuid>594c38f9-bf5f-7cf2-53f4-d6d1d6fa0da3</uuid> <memory>524288</memory> <currentMemory>524288</currentMemory> <vcpu>1</vcpu> <os> <type arch='x86_64' machine='pc-0.12'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> </features> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/opt/vm/myvm/tmpQPc9uI.qcow2'/> <target dev='hda' bus='ide'/> </disk> <interface type='bridge'> <mac address='52:54:00:fa:c8:17'/> <source bridge='br0'/> <target dev='vnet7'/> <model type='virtio'/> </interface> <serial type='pty'> <target port='0'/> </serial> <console type='pty'> <target port='0'/> </console> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'/> <video> <model type='cirrus' vram='9216' heads='1'/> </video> </devices> </domain> $ The problem is the inability to remove the original MAC address of a VM, whereas removing a 2nd MAC that was added with a "virsh attach- interface" works. Why is that? -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to libvirt in ubuntu. https://bugs.launchpad.net/bugs/629247 Title: Failure to alter VM's MAC address with virsh -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs