qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] About network bridge.


From: Jakob Bohm
Subject: Re: [Qemu-discuss] About network bridge.
Date: Mon, 22 Apr 2013 23:39:19 +0200
User-agent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5

On 4/22/2013 4:54 PM, Yaodong Yang wrote:
Hello everyone,

Thanks for reading my email. I got a question about the network bridge in qemu-kvm.
Actually qemu-kvm (when setup to use a bridge) uses the regular bridge
feature of the host's linux kernel, libvirt documentation and mailing
lists arehighly confused on this subject (for instance they think that
all Linuxcomputers run Red Hat, that libvirt has any business changing
the hostsnetwork configuration, that a special kernel module is needed
to set upbridging without rebooting and other such nonsense).

When I start my vm using virsh start vm2 or virt-manager, the vm's network is working. I can access the internet within the vm. However, we I start the same vm using qemu-system-x86_64 vm2.img -m 1024. The vm can run but without internet access. I do not know the reason, can someone give me a direction?
To access networking (and many other kinds of virtual hardware),
that hardware must belisted on the qemu command line.  To see
most of the command line used by libvirt,use the following
command sequence

virsh dumpxml vm2 > tmp.xml
virsh domxml-to-native qemu-argv tmp.xml


The procedure to set up the system.
1. install the host os, set up bridge networking.
2. use virt-manager create guest vm, choose bridge network in the creation option of virt-manager.
3. run the guest vm.

My system configuration is as follows:

1. Host OS, Ubuntu 12.10 server with a kubuntu-desktop.
2. QEMU-KVM version is 1.2.0.
3. Host network configuration is bridge type, as follows:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto em1
iface em1 inet manual

auto br0
iface br0 inet static
        address 192.168.1.2
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 129.93.6.189

        bridge_ports em1
        bridge_fd 9
        bridge_hello 2
        bridge_maxage 12
        bridge_stp off

4. Guest OS ubuntu-server 12.10. network configuration is as follows:
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.1.12
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 129.93.6.189


Enjoy

Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S.  http://www.wisemo.com
Transformervej 29, 2730 Herlev, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded




reply via email to

[Prev in Thread] Current Thread [Next in Thread]