[kwlug-disc] Networking on libvirt vs. VirtualBox
Khalid Baheyeldin
kb at 2bits.com
Fri Aug 1 12:27:21 EDT 2014
On VirtualBox, I was able as non-root to get bridged networking by doing:
vboxmanage createvm --name p1 --ostype Ubuntu_64 --register
vboxmanage modifyvm p1 ... --nic1 bridged --bridgeadapter1 eth0 --nictype1
82543GC
And that provided me functional two-way networking, assigning a new IP
address from the router, and allows incoming and outgoing networking
transparently.
On KVM, I did:
virt-install --name p1 --ram 512 --disk path=~/p.img,size=2 --cdrom
./media/precise64/ubuntu-12.04.4-server-amd64.iso --boot cdrom --network
bridge=eth0
That would not work because it requires root (VirtualBox worked without
sudo).
So, I need to use sudo before that command. But when I do this, I get the
error:
ERROR Unable to add bridge eth0 port vnet0: Operation not supported
Googling for that error suggests that this command should fix it:
virsh iface-bridge eth0 br0
But it does not work, with or without sudo, with the following error:
error: failed to get interface 'eth0'
error: this function is not supported by the connection driver:
virInterfaceLookupByName
So, the question is, using libvirt and kvm, how does one get bridged
networking to work?
--
Khalid M. Baheyeldin
2bits.com, Inc.
Fast Reliable Drupal
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra
Simplicity is the ultimate sophistication. -- Leonardo da Vinci
For every complex problem, there is an answer that is clear, simple, and
wrong." -- H.L. Mencken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20140801/35b506c5/attachment.htm>
More information about the kwlug-disc
mailing list