LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices

Reply
 
Search this Thread
Old 11-30-2010, 05:51 PM   #1
zoran119
Member
 
Registered: Dec 2007
Posts: 217

Rep: Reputation: 18
qemu/kvm virsh networking help


hi everyone,

i am using qemu/kvm and am trying to manage my virtual machines using virsh. i have hit a problem with networking.

i would like all my virtual machines to be visible on my lan. i attempted to create a new network (called 'out', see the xml config link below) and altered the virtual machine config to use this new network but my virtual machines are still not visible on the lan and further more can only talk to the host and not to the outside world.

can someone tell me how to do this? do i need some iptable rules or a bridge that enslaves eth0 and virbr1? do i even need the new 'out' network?

here is the current setup:
virtual machine config: http://pastebin.com/duX45CTt
default network: http://pastebin.com/TWr7EksH
my custom network: http://pastebin.com/pDsD7knQ
ifconfig: http://pastebin.com/bk70u1nT
iptable rules: http://pastebin.com/RY4sRfBR

thank you for your help

Last edited by zoran119; 12-01-2010 at 02:18 AM.
 
Old 12-01-2010, 03:05 AM   #2
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 848

Rep: Reputation: 91
You need to set up a bridge on top of a NIC attached to the network, and connect the VMs to that bridge using "Bridged Network" config
 
Old 12-02-2010, 02:43 AM   #3
zoran119
Member
 
Registered: Dec 2007
Posts: 217

Original Poster
Rep: Reputation: 18
i got the network problem solved. all i did was create a bridge like this:
Code:
brctl addbr br0 && brctl addif br0 eth0 && ifconfig eth0 0.0.0.0 promisc && ifconfig br0 up && dhclient br0
and add the following to the definition of the virtual machine:
Code:
    <interface type='bridge'>
      <mac address='00:11:22:33:44:55'/>
      <source bridge='br0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </interface>
the problem i am having now is that a regular user (who is in libvirt group) cannot start virt-manager (root can). this is the error:
Code:
$ virt-manager --debug
2010-12-02 18:43:05,639 (virt-manager:161): Application startup
/usr/lib/python2.6/site-packages/urlgrabber/grabber.py:394: ImportWarning: Not importing directory '/usr/lib/python2.6/site-packages/i18n': missing __init__.py
  from i18n import _
2010-12-02 18:43:05,738 (keyring:31): No support for gnome-keyring
2010-12-02 18:43:05,789 (engine:129): About to connect to uris ['qemu:///system']
2010-12-02 18:43:05,849 (engine:414): window counter incremented to 1
2010-12-02 18:43:05,850 (connection:764): Scheduling background open thread for qemu:///system
2010-12-02 18:43:05,850 (connection:897): Background thread is running
2010-12-02 18:43:05,864 (connection:932): Unable to open connection to hypervisor URI 'qemu:///system':
authentication failed
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 887, in _try_open
    None], flags)
  File "/usr/lib/python2.6/site-packages/libvirt.py", line 111, in openAuth
    if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: authentication failed

2010-12-02 18:43:05,864 (connection:937): Background open thread complete, scheduling notify
2010-12-02 18:43:05,864 (connection:942): Notifying open result
2010-12-02 18:43:05,865 (error:86): Uncaught Error: Unable to open a connection to the libvirt management daemon.

Libvirt URI is: qemu:///system

Verify that:
 - The 'libvirtd' daemon has been started
 : Unable to open connection to hypervisor URI 'qemu:///system':
authentication failed
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 887, in _try_open
    None], flags)
  File "/usr/lib/python2.6/site-packages/libvirt.py", line 111, in openAuth
    if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: authentication failed

Last edited by zoran119; 12-02-2010 at 02:45 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Qemu (KVM) and Vista. ComputerGreek Linux - Software 53 07-06-2012 01:47 AM
Error while installing qemu (qemu-kvm-0.13.0) in rhel 5.3 birla.sunil Linux - Virtualization and Cloud 2 10-19-2010 04:56 AM
On qemu-kvm, qemu-ifup script not found on Slackware 13 AndrewGaven Linux - Virtualization and Cloud 14 01-29-2010 04:36 AM
Kvm/ qemu + spice nixfreakz Linux - Virtualization and Cloud 1 12-17-2009 09:17 AM
Loading kvm-intel module for qemu-kvm 0.11.0 alkos333 Slackware 6 11-13-2009 11:01 PM


All times are GMT -5. The time now is 07:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration