[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-discuss] missing some fundamental concepts
From: |
F. Heitkamp |
Subject: |
[Qemu-discuss] missing some fundamental concepts |
Date: |
Mon, 16 Sep 2019 12:22:27 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.0 |
I have been trying to get a QEMU hosted virtual machine to connect to my
host network.
I have a simple network configuration on my host.
It is configured on 192.168.0.0/16.
There is a dhcp and dns caching server running on the host
The host interface is enp9s0 and hast a static IP 192.168.0.2
Everything works fine. I have several computers and devices on my
network and they are able to obtain addresses from my host, and
communicate with the outside world.
My virtual machine installation runs GNOME network manager and is able
to connect fine, i.e. obtain address vi a dhcp etc., to my network when
installed on a hard disk and booted on one of my other computers.
When I copy the installation to a image file I can boot it with qemu and
with default options it runs and I am able to run firefox and surf the
web etc. The problem is the machine is on the 10.0.2.0 net coming from
QEMU using the slirp interface I suppose.
What I am trying to get working is to make the installation connect to
my host network so I can mount an NFS share to it.
My other boxes, on my network, are able to run the image, mount the NFS
when running in VMWARE and Virtualbox.
I tried configuring the qemu command line with option:
-netdev user,id=mynet0,net=192.168.0.0/16 -device e1000,netdev=mynet0
When the machine boots it gets an address 192.168.2.x hence is not on
the same subnet on my host. If I change the address and routing to be
on the same subnet it still does not see my host network.
I tried using iproute2 utils to create a bridge and a tun/tap device
bridged to enp9s0 on my host. However two problems occur, one I lose
connectivity to the outside world, two, the bridge I create is not
detected by my virtual machine when running in qemu. Most of the
bridging examples also assign a static IP to the bridge.
I also have an unused Ethernet port/card on the host.
I am also avoiding libvirt, spice, etc for the time being in order to
torture myself.
The problem seems deceptively simple:
Allow qemu to detect my host network and use the host dhcp server to
obtain an IP address using either some sort of bridge or by passing the
unused NIC on the host through qemu. None of my surfing has found
solutions to these, at least in a way I understand.
Usually this means it is intuitively obvious or no one else wants to do
this.
Any suggestions welcome.
Fred
- [Qemu-discuss] missing some fundamental concepts,
F. Heitkamp <=