[libvirt-users] Managing eths in vm from HV

john fisher john at jpfisher.net
Fri Dec 7 20:37:48 UTC 2012


KVM Ubuntu 12.04 libvirt 1.0

Related to my post of a day ago, but I can't reply to it...

I want to control the order ( and therefore the connection) of eth devices in the vm. If I know what the MAC addresses
are on my HV, as seen in virsh domiflist or in dumpxml, and I then re-write the /etc/udev/rules/70 file in the VM, I can
get the eth devices ordered in a predictable way.

Is there a virsh way to create a VM from a generic xml file, allowing libvirt to add randomized MAC addresses, and then
edit the /etc/udev/rules/70 file in the VM, to associate the eths with the desired MAC?

Better yet, is there a way to simply control the assigning of the eths in the generic xml file used to create the VM?

So far I can make a wrapper script to virsh create  xml, read the addresses back, and then start the VM independently,
write to it, and then return control to virsh. That seems clumsy. Virsh ought to be able to control the eths in the VM
without resorting to OS-dependent kludges.

-- 
John Fisher

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20121207/da85c5e9/attachment.htm>


More information about the libvirt-users mailing list