2 NICS, Debian 12, Using KVM, Host is server on Cloudmin Webmin 2.105 How do I configure network

2 NICS 1 onboard 1 PCI-E
Debian 12
Cloudmin 9.8 (latest as of this post)
Webmin 2.105
Ryzen 5900G
HOST IS SERVER
USING KVM

Would like to get Local Area Network IP’s for my KVM’s so they are viewable by other PC’s on my LAN.

Would like to use the HOST NIC for the Host server, and 2nd NIC for KVM’s

Have Cable hooked to both NIC’s going to Unmanaged Switch and Unmanaged switch hooked to my router.

Plan to have everything on one machine and would like KVM’s to get Local IP’s from my existing LAN which is 192.168.1.X router sits at 192.168.1.2

Now I have tried many ways to get this working but kind of my first go at setting up KVM instances so I’m sure I have to do configuration that is not mentioned in the documentation of cloudmin although I have tried for many hours I have failed to configure everything correctly.

I have scoured the forums and google for a guide or a video to show networking setup but no one really shows you how to go from Start to Finish with Cloudmin actually in the way of content there is nearly Zero Videos and the content is pretty sparse.

This is not a VPS somewhere else it is Bare Metal On Location.

Closet I’ve come to KVM is running virtual box or VMware Workstation on windows. Its quite a bit different cause it essentially sets up the networking portion for you like magic. Upon trying to use Cloudmin I’ve tried likely every possible way to do it that don’t work nearly but haven’t found the way that does work as of yet so I know I haven’t exactly hit the every possible way quite yet.

So to cut this short if someone has some spare time and they could point me in the proper direction to read literature that assumes the person doesn’t know nothing ELI5 type no assumed knowledge literature to go from start to finish to accomplish this task or if someone knows of a good source of info. I mean what gets me is I’m not new to routing and networking at all but the KVM stuff is kind of getting the best of me. So I’m sure the documentation leaves something out or there is simply assumed knowledge that is left out but doing this the first time through for KVM’s I’d rather assume nothing and follow the directions at this point being that it wasn’t as intuitive as say setting up virtualmin. So if I need to use ip link commands from the terminal or brctl commands to pre set stuff up I’m likely missing this although I’ve tired a few things along with changing configuration files as suggested elsewhere with no luck.

I don’t want VLAN essentially what I want is for my VM’s to be on my Lan as if they were just computers on my network. I figure with 2 NIC’s this should be possible most likely.

I know it used to be possible to have a NIC listen for multiple addresses. I haven’t done this in quite a while. Maybe lose the second NIC and have the VM’s listen to their one virtual NIC for both?

I used to have the CCNP but KVM networking brings me to tears. :frowning:

1 Like

Never got into Cisco much a little back in 2004 when I was getting some certs as well but many small businesses in this area for whatever reason kinda ditched Cisco managed switches and equipment for unmanaged switches. Routers for whatever reason a lot of them wound up with HP equipment or equipment from their providers at the edge even. So yeah IDK there was a be more web based management and less cli stuff. With the advent of DDWRT, OpenWRT, Tamato, Merlin etc it even made consumer devices pretty dang useful. I’ve taking a liking to web based gui management with a mix of GUI and have stuck with adoption of such things. For instance I’ve taken a liking to EdgeOS. But for wireless AP’s I still have a ton of the EAXXXX models some of them the last models that Cisco made after selling out their consumer division to Belkin I have about 20AP/Rrouters from that era just sitting here collecting dust cause I didn’t think they’d last. But let me tell you a secret these things have been going even in outdoors type conditions high heat or frigid cold they just keep right on ticking they are like tanks I’ll keep using these AC based AP’s until its no longer practical to do so. But wow highly useful AP’s with aftermarket firmware. I believe the EA6XXX series was the last line that was developed by Cisco but made by Belkin. But I will say Cisco makes good equipment it was a shame to see their aqusition of linksys go to Belkin. I had bad luck with Belkin products over the years from power strips, to wireless N routers, to usb and video equipment. Common thread for me for Belkin was decent product with a short lifespan almost as if there was planned failure built into all of their devices so I stopped using Belkin in general.

Anyways yeah well I’m glad I’m not the only one not getting it right off the bat. However at the same time would it not be logical to say that if something is not intuitive for the intended crowd that maybe it needs either more polishing or better documentation? I suppose though everything is a work in progress this space is highly competitive although I hope the web based/cli mixture wins it out over the implicit GUI with less ability to configure and manage but maybe I’m just a bit old school that way IDK proxmox and VMWare seems to have a fairly steep adoption rate although somehow I feel even without getting things working Cloudmin/Virtualmin is far superior just looking at how configurable it is well that and experience with Virtualmin.

Its almost relational to like VMware being like the consumer router OS as to where Cloudmin would be more like the OPENWRT version of VMware superior in many ways.

Wow I went ahead and said screw it time to do some work around the house came back just knowing my connections all had to be right I went ahead and executed commands to download virtualmin and install it oddly I’ve been connected all this time.

There is only one part of Cloudmin that works to get things running even installing virtualmin via preinstall selecting that does not install virtualmin to the server good lord almighty Now I have to remember everything I did to get signal yeah it is kinda crappy the way nothing seems to work via cloudmin but once you got signal SSH and an IP and you see eth0 in your options your golden you just have to download virtualmin-install.sh via the command execution then run it with -f flag and viola you are in there like swimwear.

So I can say cloudmin works on Debian 12 finally its just lacking a crap ton of functionality like 80% of the menu options to control your server or see it VIA VNC or install virtualmin or webmin all of this stuff doesn’t work @ ALL … WHEW! What a job to recall all I did with networking thats another story.

Install Cloudmin I suggest using PRO skip GPL all together just use the link they provide you it inserts your serial number and downloads and installs it.

First I setup a pool of IP’s from 192.168.1.170-180 in cloudmin

Then I downloaded the images to for KVM that I might use in my case Debian 11 was available.

Next I installed bridge utils from the terminal as root. Then qemu-system then libvirt-daemon-system

apt install bridge-utils
apt install qemu-system
apt install libvirt-daemon-system

Next I disabled suspend mode for good measure

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

Also note I used X11 rather than Wayland as Wayland has issues with screen recording down on the lower right hand corner when you login for me I wanted the Desktop and GNOME X11 for other people it may vary. But just a good hint in case others want to use Desktop on their server as well. I had no choice the Terminal seems to be a mess using cloudmin at least on Debian 12.

There is no text input shown on screen and text output is all over the screen its kind of like bad visual basic output I used to get trying to output webpages on my ESP8266 if you didn’t add special formatting to it. But anyways I had to fire up desktop just to use a terminal that looked decent. And didn’t randomly freeze like the one in cloudmin. Your travels and results may vary.

So when you su on desktop make sure you su --login so it puts you in the right file path. I notices something odd if you don’t su --login the file path seems to stay as if you are the user.

so don’t just use su or su root use su --login on Debian 12 at least

Well now that we got cloudmin and the extras installed that we will need to run KVM … Heres what I did next.

I know I grabbed my MAC ID

ip address show dev enp4s0 | awk '$1=="link/ether" {print $2}'

enp4s0 should be replaced with your NIC connection name depending upon what that is as a note for new folks.

For [performance and security reasons], disable netfilter for bridges. Create /etc/sysctl.d/bridge.conf with these contents:

net.bridge.bridge-nf-call-ip6tables=0
net.bridge.bridge-nf-call-iptables=0
net.bridge.bridge-nf-call-arptables=0

Next I Create /etc/udev/rules.d/99-bridge.rules with the following contents. This udev rule applies the sysctl settings above when the bridge module is loaded. (If using Linux kernel 3.18 or later, change KERNEL=="bridge" to KERNEL=="br_netfilter".) That has this info:

ACTION=="add", SUBSYSTEM=="module", KERNEL=="bridge", RUN+="/sbin/sysctl -p /etc/sysctl.d/bridge.conf"

Next I created my bridge in etc/network/interfaces to look like this.

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# If unsure what 'netmask' or 'gateway' should be, ask your hosting provider.

iface enp4s0 inet manual

auto 0 br0 conf eth0
iface br0 inet static
	address 192.168.1.172
	netmask 255.255.255.0
	network 192.168.1.0
	bridge_ports enp4s0
	bridge_stp off
    # Use the MAC address identified above.

    # If you want to turn on Spanning Tree Protocol, ask your hosting
    # provider first as it may conflict with their network.
    # If STP is off, set to 0. If STP is on, set to 2 (or greater).

iface br0 inet6 static
	pre-up /sbin/modprobe -q ipv6 ; /bin/true
	address 2001:db8::1
	netmask 64

iface eth0 inet static
	address 192.168.1.170
	netmask 255.255.255.0
	network 192.168.1.0

Run the following:

ip address flush enp4s0 scope global && ifup br0

After doing so I setup my KVM server. And Spun up a KVM

After I got SSH access on it I set the network to connect to br0 under system settings and network interfaces for the VM not the KVM server.

Active now looks like:



	Name	Type	IPv4 address	Netmask	IPv6 address	Status
br0 	Bridge 	192.168.1.172 	255.255.255.0 	2001:db8::1 	Up
enp3s0 	Ethernet 	192.168.1.228 	255.255.255.0 	
	Up
enp4s0 	Ethernet 	No address configured 	None 	
	Up
lo 	Loopback 	127.0.0.1 	255.0.0.0 	::1 	Up
tap0 	Unknown 	No address configured 	None 	fe80::88f4:b5ff:fe92:416c 	Up

Then Activated At Boot looks like:




	Name	Type	IPv4 address	Netmask	IPv6 address	Active
br0 	Bridge 	192.168.1.172 	255.255.255.0 	2001:db8::1 	Yes
enp4s0 	Ethernet 	No address configured 	None 	
	No
eth0 	Ethernet 	192.168.1.170 	255.255.255.0 	
	Yes

Set act as router yes Under Routing and gateways with enp4s0 selected

My Active configuration looks like:


	Destination	Gateway	Netmask	Interface
default 	192.168.1.2 	
	enp3s0
192.168.1.0 	
	255.255.255.0 	br0
192.168.1.0 	
	255.255.255.0 	enp3s0

So once all that is verified as working and you have SSH

I had to go to my KVM in cloudmin from the dropdown that says SSH by it.

I had to use System Operations → Run Commands

I ran this command first to download virtualmin as it wasn’t preinstalled like it was supposed to be.

wget https://software.virtualmin.com/gpl/scripts/virtualmin-install.sh

next I installed it with the -f option

sh install virtualmin-install.sh -f

There will be some barking and yelling about errors just give it time let it do its thing right now is piss and a pop time. If you gave it a good while don’t pay attention to what it says just think how much time it takes to install there will be -t errors galore but just ignore them for now and just give it sometime.

Now that you gave it time you should be able to login to Virtualmin using the IP in my case I opened up a browser and fired up 192.168.1.170:10000 cause thats my eth0 address and golden I got my first VM up and running.

I can’t wait to see a more intuitive process when some of the other features start working hopefully soon here. Well the more people that purchase cloudmin the more funds they’ll have to keep people live working on stuff around the clock to get it up and running. I can get some of it running but a lot of things require Java so well…

Anyways thats how I got it going with two NIC’s One Working as a bridge the other working as a host machine NIC.

Enjoy maybe this will help someone.

New issue: After uploading my backup of virtualmin I rebooted and now I get ping failed status what in gods green earth is this Vodoo Networking they got going on in KVM nothing adheres to a standard its like guess and check networking for heaven sakes.

Yeah my configurations are all the same so it kinda begs the question how do you go from everything working to NOT WORKING on a reboot???

Maybe you have to restart networking every time you reboot if so why doesn’t cloudmin do this by default ?

IDK any suggestions I’m back at square one trying to figure out the networking which was working 100% and now there is license errors and the whole bit its like DONT YOU DARE YELL AT ME FOR A LISCENSE! The software isn’t working properly!