You are not logged in.

#1 2016-06-28 09:34:14

Utini
Member
Registered: 2015-09-28
Posts: 452
Website

libvirt (virt-manager + qemu) - How to get guest on same gateway?

Hello everyone,

I am running several guest OS on Arch in a qemu/kvm via libvirt (virt-manager).
They can connect to the internet just fine but are on a different gateway than my complete home-network.

E.g.
Router: 192.168.1.1
Arch laptop: 192.168.1.2
Phone: 192.168.1.3
Guest OS on Arch laptop: 192.168.122.14

How can I get the guest OS to be 192.168.1.x ? So it should communicate with the router as gateway, not the host machine?

Thanks !

@edit:
I can ping the router (192.168.1.1) from the guest OS. Changing the guest of networking from DHCP to manual won't give me a network access.

Last edited by Utini (2016-06-28 09:35:17)


Setup 1: Thinkpad T14s G3, 14" FHD - R7 6850U - 32GB RAM - 2TB Solidigm P44 Pro NVME
Setup 2: Thinkpad X1E G1, 15.6" FHD - i7-8850H - 32GB RAM - NVIDIA GTX 1050Ti - 2x 1TB Samsung 970 Pro NVME
Accessories: Filco Majestouch TKL MX-Brown Mini Otaku, Benq XL2420T (144Hz), Lo(w)gitech G400, Puretrak Talent, Sennheiser HD800S + Meier Daccord FF + Meier Classic FF

Offline

#2 2016-06-28 11:07:49

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: libvirt (virt-manager + qemu) - How to get guest on same gateway?

You need to set up bridged networking with qemu for your guests to be on the same subnet as your host.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2016-06-28 14:06:35

Utini
Member
Registered: 2015-09-28
Posts: 452
Website

Re: libvirt (virt-manager + qemu) - How to get guest on same gateway?

slithery wrote:

You need to set up bridged networking with qemu for your guests to be on the same subnet as your host.

There are already bridges created, or is this somethign different (vibr0 and vibr0-nic) ?

ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: wlp6s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 5c:51:4f:7c:05:7e brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.117/24 brd 192.168.1.255 scope global wlp6s0
       valid_lft forever preferred_lft forever
    inet6 fe80::5e51:4fff:fe7c:57e/64 scope link 
       valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:9d:54:07 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 scope global virbr0
       valid_lft forever preferred_lft forever
4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 state DOWN group default qlen 1000
    link/ether 52:54:00:9d:54:07 brd ff:ff:ff:ff:ff:ff

I have tried creating a new bridge my self:
I am using "NetworkManager".
I create a interface in the GUI and selecte "bridge".
There I add a slave, but only with "VLAN" I cann add a WIFI as connection type, which won't connect to WIFI though.
Else I can only add Ethernet but not WIFI ?

Thanks !


Setup 1: Thinkpad T14s G3, 14" FHD - R7 6850U - 32GB RAM - 2TB Solidigm P44 Pro NVME
Setup 2: Thinkpad X1E G1, 15.6" FHD - i7-8850H - 32GB RAM - NVIDIA GTX 1050Ti - 2x 1TB Samsung 970 Pro NVME
Accessories: Filco Majestouch TKL MX-Brown Mini Otaku, Benq XL2420T (144Hz), Lo(w)gitech G400, Puretrak Talent, Sennheiser HD800S + Meier Daccord FF + Meier Classic FF

Offline

#4 2016-06-28 14:54:51

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: libvirt (virt-manager + qemu) - How to get guest on same gateway?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB