<div dir="ltr"><div>After defining br0 in the host's network, if I specify bridge=br0, it works fine, but only with sudo, which is annoying.<br><br></div><div>VirtualBox did not need any host changes, and did not require sudo.<br>
<br></div><div>Is there a way to do this on kvm/libvirt?<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 1, 2014 at 3:03 PM, William Park <span dir="ltr"><<a href="mailto:opengeometry@yahoo.ca" target="_blank">opengeometry@yahoo.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Fri, Aug 01, 2014 at 12:27:21PM -0400, Khalid Baheyeldin wrote:<br>
> On VirtualBox, I was able as non-root to get bridged networking by doing:<br>
><br>
> vboxmanage createvm --name p1 --ostype Ubuntu_64 --register<br>
> vboxmanage modifyvm p1  ... --nic1 bridged --bridgeadapter1 eth0 --nictype1<br>
> 82543GC<br>
><br>
> And that provided me functional two-way networking, assigning a new IP<br>
> address from the router, and allows incoming and outgoing networking<br>
> transparently.<br>
><br>
> On KVM, I did:<br>
><br>
> virt-install --name p1 --ram 512 --disk path=~/p.img,size=2 --cdrom<br>
> ./media/precise64/ubuntu-12.04.4-server-amd64.iso --boot cdrom --network<br>
> bridge=eth0<br>
><br>
> That would not work because it requires root (VirtualBox worked without<br>
> sudo).<br>
><br>
> So, I need to use sudo before that command. But when I do this, I get the<br>
> error:<br>
><br>
> ERROR    Unable to add bridge eth0 port vnet0: Operation not supported<br>
><br>
> Googling for that error suggests that this command should fix it:<br>
><br>
> virsh iface-bridge eth0 br0<br>
><br>
> But it does not work, with or without sudo, with the following error:<br>
><br>
> error: failed to get interface 'eth0'<br>
> error: this function is not supported by the connection driver:<br>
> virInterfaceLookupByName<br>
><br>
> So, the question is, using libvirt and kvm, how does one get bridged<br>
> networking to work?<br>
<br>
</div></div>From memory, QEMU simply adds its tap interface to existing bridge.  I<br>
had to setup bridge and add wlan0 (my wireless connection) to it.  Then,<br>
the virtual machine got its IP from the wireless router.<br>
<span class="HOEnZb"><font color="#888888">--<br>
William<br>
<br>
<br>
_______________________________________________<br>
kwlug-disc mailing list<br>
<a href="mailto:kwlug-disc@kwlug.org">kwlug-disc@kwlug.org</a><br>
<a href="http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org" target="_blank">http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>Khalid M. Baheyeldin<br><a href="http://2bits.com" target="_blank">2bits.com</a>, Inc.<br>Fast Reliable Drupal<br>Drupal optimization, development, customization and consulting.<br>
Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra<br>Simplicity is the ultimate sophistication. --   Leonardo da Vinci<br>For every complex problem, there is an answer that is clear, simple, and wrong." -- H.L. Mencken<br>

</div>