Re: Is it possible to configure libvirt's MAC generation?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 12, 2020 at 02:18:13PM -0400, Alvin Starr wrote:
> One solution would be to dump the XML for the domain and then run something
> like sed on it to change what ever you want and then update the domain.
> Of course that will only work if the domain is stopped.

Another one is to use the virt-xml tool to update only the part you need:

virt-xml <domain> --edit --network network=default,mac.address='<new_mac>'

^This would require you to restart the domain for the change to take effect.

virt-xml <domain> --update --remove device --network mac.address='<old_mac>'
virt-xml <domain --update --add-device --network network=default,mac.address='<new_mac>'

^This would not, because it translates to hot-unplug and hot-plug respectively.

Just an alternative to using sed.

Regards,
Erik




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux