qemu-stable
[Top][All Lists]
Advanced

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

Re: How to make a VM guest look like just another metal machine on my LA


From: john doe
Subject: Re: How to make a VM guest look like just another metal machine on my LAN?
Date: Sun, 21 Feb 2021 11:00:25 +0100

On 2/21/2021 9:46 AM, Steve Litt wrote:
Hi all,


I'll answer some hints that will hopefully help you but I can't directly
answer your question.

My LAN at home is on 192.168.0.0/24, connected to the Internet via a
cablemodem/firewall/router/gateway at 192.168.0.1. My Daily Driver
Desktop (DDD), which will after this be referred to as the "host" or
"metal host" is at 192.168.0.2. I have a printer with an http interface
at 192.168.0.13. Throughout this post I'm careful to discriminate
between the metal host and the VM guest, which is created on the metal
host, for all config options.

What I'm trying to accomplish is to launch a VM guest (Devuan) on my
metal host (Void Linux), such that the VM guest performs as if it were
just another physical computer on my LAN.

I've been reading and experimenting for four days and still don't have
what I need. Here are some of the documents I've used trying to get
this done:

https://wiki.qemu.org/Documentation/Networking#User_Networking_.28SLIRP.29

https://ahelpme.com/linux/howto-do-qemu-full-virtualization-with-bridged-networking/


Using a bridge is what you want.

http://www.mpaoli.net/~root/bin/TEMPLATE

https://www.debian.org/doc/manuals/debian-handbook/sect.virtualization.en.html#sect.lxc.network

I'm trying to do it purely with ip commands, although I could use brctl
if necessary. I'm staying away from virt-manager and aqemu because they
don't work on my Void Linux metal host, and would just add even more
variables and ambiguity.

Speaking of ambiguity, every document I've read (and I've read dozens)
has the following ambiguities:

1) When discussing a setting, they don't indicate whether that setting
    should be on the metal host or the VM guest. Perhaps to a person who
    thoroughly understands virtual machines, such a distinction would be
    obvious via context, but it's not obvious to me.


The bridge will need to be setup on the host (metal host in your case).

Based on the previously listed links, I deduce that the TAP is created
by the guest VM, in such a way that it attaches to the bridge created on
the metal host, and therefore I have no need to create a TAP on the
metal host.


Libvirt or Qemu should do that for you assuming that you pass the
correct options.

Here's my progress so far, based on the links listed above and my
other readings and experimentation:

***

I build the bridge purely with ip commands. Also, I don't mess
with the firewall (which perhaps has been my problem all along). I'll
investigate the firewall aspect tomorrow.


It is unlikely that you won't have to modify the fw when setting up a
bridge.

Also, are you allowing trafic from your guest to the other hosts on the
network (firewall    in the way...)?

HTH.

--
John Doe



reply via email to

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