[kwlug-disc] Networking on libvirt vs. VirtualBox

unsolicited unsolicited at swiz.ca
Fri Aug 1 17:39:38 EDT 2014


Seems to me I saw a different image to use for kvm. Think it was in 
ubuntu server help/manual pages, virtual networking area.

There was stuff in and around there ... this has to work seamlessly, the 
advertising seems to indicate almost instantaneous substantiation of 
machines.

JEOS was in and around those docs.


On 14-08-01 05:05 PM, Khalid Baheyeldin wrote:
> Another difference between libvirt and VirtualBox.
>
> I was able to take the Ubuntu Server stock .iso file, and install it inside
> of VirtualBox normally. That includes installing grub in the virtual disk's
> MBR.
>
> With libvirt, grub installation does not complete, with no errors. The step
> proceeds, then returns to the tasks.
>
> So, I am unable to have a working VM with KVM and libvirt so far because of
> grub aborting.
>
>
> On Fri, Aug 1, 2014 at 4:03 PM, Khalid Baheyeldin <kb at 2bits.com> wrote:
>
>> After defining br0 in the host's network, if I specify bridge=br0, it
>> works fine, but only with sudo, which is annoying.
>>
>> VirtualBox did not need any host changes, and did not require sudo.
>>
>> Is there a way to do this on kvm/libvirt?
>>
>>
>> On Fri, Aug 1, 2014 at 3:03 PM, William Park <opengeometry at yahoo.ca>
>> wrote:
>>
>>> On Fri, Aug 01, 2014 at 12:27:21PM -0400, Khalid Baheyeldin wrote:
>>>> 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?
>>>
>>>  From memory, QEMU simply adds its tap interface to existing bridge.  I
>>> had to setup bridge and add wlan0 (my wireless connection) to it.  Then,
>>> the virtual machine got its IP from the wireless router.
>>> --
>>> William
>>>
>>>
>>> _______________________________________________
>>> kwlug-disc mailing list
>>> kwlug-disc at kwlug.org
>>> http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
>>>
>>
>>
>>
>> --
>> 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
>>
>
>
>
>
>
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
>





More information about the kwlug-disc mailing list