Hi, If I try to create a bridge on Archlinux with virt-manager I get this error. bridge-utils is installed.
Error creating interface: 'Could not define interface: internal error: could not get interface XML description: unspecified error - aug_save failed: multiple failures'
Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/asyncjob.py", line 90, in cb_wrapper callback(asyncjob, *args, **kwargs) File "/usr/share/virt-manager/virtManager/createinterface.py", line 1141, in do_install self.interface.install(meter, create=activate) File "/usr/share/virt-manager/virtinst/interface.py", line 257, in install raise RuntimeError(_("Could not define interface: %s") % str(e)) RuntimeError: Could not define interface: internal error: could not get interface XML description: unspecified error - aug_save failed: multiple failures
What's the problem? Niccolò
On 02/04/2016 07:01 AM, Niccolò Belli wrote:
Hi, If I try to create a bridge on Archlinux with virt-manager I get this error. bridge-utils is installed.
Error creating interface: 'Could not define interface: internal error: could not get interface XML description: unspecified error - aug_save failed: multiple failures'
Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/asyncjob.py", line 90, in cb_wrapper callback(asyncjob, *args, **kwargs) File "/usr/share/virt-manager/virtManager/createinterface.py", line 1141, in do_install self.interface.install(meter, create=activate) File "/usr/share/virt-manager/virtinst/interface.py", line 257, in install raise RuntimeError(_("Could not define interface: %s") % str(e)) RuntimeError: Could not define interface: internal error: could not get interface XML description: unspecified error - aug_save failed: multiple failures
What's the problem?
The problem is that someone decided to simply place the netcf source into the Arch packages system without actually adding an Arch-specific backend to it, so it's trying to do either debian or Fedora config changes on a system that has a completely different (afaik) networking config setup.
This came up at least a year ago and I had assumed that the Arch people had removed the package from their system at that time, but apparently not.
To make this functionality work on Arch, someone needs to write an Arch backend for netcf (I'd be happy to help with that by providing advice, but have never run Arch myself, so have no info on exactly what it would look like). Otherwise, you will just need to find/follow some instructions on manually creating a host bridge on Arch.
Hi Laine, Thanks for your answer, I was suspecting something similar. Arch can use almost every backend you want, I don't think it has something like a default one: https://wiki.archlinux.org/index.php/Network_configuration
If you're willing to create an Arch backend just let me know how I can help you and I will provide you all the info you need.
Thanks, Niccolò
On 02/04/2016 08:35 AM, Niccolò Belli wrote:
Hi Laine, Thanks for your answer, I was suspecting something similar. Arch can use almost every backend you want, I don't think it has something like a default one: https://wiki.archlinux.org/index.php/Network_configuration
I don't see any mention there of either /etc/network/interfaces (debian/Ubuntu) or /etc/sysconfig/network-scripts (RHEL/Fedora/CentOS). Although I'm sure someone sufficiently motivated could tack either of those onto the side, the fact that they would likely have to maintain it themselves makes it very unlikely to actually happen :-)
If you're willing to create an Arch backend just let me know how I can help you and I will provide you all the info you need.
Since I don't use Arch, and have other backends that I could justify working on (to my employer) if I had time (which I don't :-( ), that's also very unlikely. Usually the way it works is that someone who actually uses a particular distro creates the backend (based on their knowledge of the distro they want it to run on, the existing examples, and answers to questions posted here on the mailing list), then hopefully also maintains those distro-specific parts as bugs / new features come up.
Ok, I understand it. I manually create a tap device and I added it to my bridge, can you please at least tell me how am I supposed to use it with virt-manager? With plain qemu I simply use -net nic,model=virtio -net tap,ifname=tap0,script=no,downscript=no,vhost=on but I didn't find how to use tap0 with the virt-manager graphical interface.
Niccolò
On 02/04/2016 01:07 PM, Niccolò Belli wrote:
Ok, I understand it. I manually create a tap device and I added it to my bridge, can you please at least tell me how am I supposed to use it with virt-manager? With plain qemu I simply use -net nic,model=virtio -net tap,ifname=tap0,script=no,downscript=no,vhost=on but I didn't find how to use tap0 with the virt-manager graphical interface.
Ah, I think you've misunderstood the use of the virt-manager command to create a bridge. That command uses netcf (where available) to create a bridge device that is attached to a physical ethernet on the host. You only do that once.
If you already have a bridge setup on your host, for each guest you just add an interface in the normal manner (NB: you do not create any tap devices; libvirt does that for you and connects them to the proper place), and tell it to connect to the bridge device that was already created. If your bridge doesn't show up in the list provided by virt-manager (which would likely happen if your libvirt was built with netcf support on a distro that has a non-functioning netcf), then just select "Specify shared device name" at the bottom of the list of network sources, then type in the bridge's name yourself. (you could eliminate this problem by rebuilding libvirt to use the "udev" backend to the interface driver rather than the "netcf" backend, but if I were in your position I wouldn't bother with that - too much potential to break something else).
Alternately, once you have the host bridge created on your host (for example's sake let's say it is named "br0") you can create a libvirt network that references this existing bridge like this:
1) create a temporary text file (name it anything you like, e.g. xyzzy.xml) with the following contents:
<network> <name>bridge-net</name> <bridge name='br0'/> <forward mode='bridge'/> </network>
2) as root, run the following commands:
# virsh net-define xyzzy.xml # virsh net-autostart bridge-net # virsh net-start bridge-net
Now when you select the "network source" for a guest's interface in virt-manager, one of the selections will be:
Virtual network "bridge-br0"
That's the one you should use.
At this point your problems are really in the realm of libvirt rather than netcf, so it might be more useful if you sent further questions to "libvirt-users@redhat.com" rather than the netcf list. Alternately, if you use IRC, connect to irc.oftc.net and ask in #virt, which is frequented by nearly all the libvirt developers, as well as quite a few kvm/qemu people.
You may also want to read the libvirt wiki page on networking:
Thanks, selecting "Specify shared device name" worked flawlessly! One more question: often I work with virtual machines with public ip addresses and routed networking (not bridges!), how can I achieve it with Arch and virt-manager?
Niccolò
On 02/04/2016 02:47 PM, Niccolò Belli wrote:
Thanks, selecting "Specify shared device name" worked flawlessly! One more question: often I work with virtual machines with public ip addresses and routed networking (not bridges!), how can I achieve it with Arch and virt-manager?
If you want to create a completely separate subnet contained within the host, and have all traffic to/from the outside routed via the host's IP stack, define a libvirt network, setup the IP subnet you want for the network, then in the final screen select "Forwarding to physical network", Destination: "Any physical device", Mode: "Routed". Once you've started this network, it will appear in the list of possible connections for a guest's network interfaces. Note that you will need to teach the rest of the network to forward packets for this new subnet to the host's physical ethernet IP (but if you're specifically asking for a routed network, then you likely already know this (either that or I've misunderstood your question) :-)
You can see more info about the possible types of networks here:
http://www.libvirt.org/formatnetwork.html
I've set Reply-To: in this message to libvirt-users@redhat.com. It really is a more appropriate place for these questions, as the netcf mailing list deals specifically with the netcf library, which isn't involved in any of the things we're discussing here.
netcf-devel@lists.fedorahosted.org