You have a host that has network link, but is configured to remain disconnected and you have (KVM?) VM guest on that host that you want to connect?
You failed to configure the network with current hypervisor, so you installed different hypervisor (virtualbox) but it has entirely different issues.
If the host should have no connectivity, then the network card should be attached to the guest. Libvirtd/KVM can definitely do that (but I have not done it). I usually manage libvirtd with virt-manager, but there are CLI commands too.
Actually i have a little offline LAN. And the host and guest need to communicate with an other offline PC in this LAN.
When i want to add something, i take an USB key.
And yes i change solution with virtualbox. Before, it was gnome-boxes (yes it is based on kvm).
Ok, so i can attach network card to my guest with virt-manager, that could be a solution (but for this i need to sacrifice the host os network). I will check this solution but for now i will focus on virtualbox installation, juste to have something who works quickly.
I’m trying to install virtualbox because it’s very easy to add bridge network to the VM unlike gnome-boxes (as far as i know).
Actually, i downloaded new packages to install virtualbox. I use /sbin/vboxconfig to watch missing packages. I’m well on my way to making virtualbox work.
I’ve never used gnome-boxes nor virtualbox. Default desktop install does install libvirt-based virtualization packages, while virtualbox is third-party.
If you have only one network port, then both the LAN and WAN have to share it. That is possible with VLANs. However, then the device at the other end of the network cable has to support VLAN too.
Lets assume that you have three devices: this host, the other PC, and managed switch.
Both host and PC are connected to the switch. The switch is configured with two VLANs: “LAN” and “WAN”.
The PC is on switch port that has LAN, untagged.
The host is on switch port that has both LAN and WAN, both tagged. A VLAN “trunk”.
The switch has an another port on WAN, untagged, that connects to router, etc uplink.
The network port on host, lets call it “em1” receives both LAN and WAN traffic, all VLAN tagged.
The em1 has no IPv4/IPv6 config.
There are two VLAN connections on em1. One for LAN, other for WAN. They have no IP config either.
There is a bridge connection on each VLAN, “brlan” and “brwan”.
Host has IP address on brlan. Host does not have IP address on brwan.
All that config is created with NetworkManager (I would use nmcli. See man nmcli-examples) before any virtualization is installed or started.
Then we start libvirtd and give the guest interfaces to both bridges. Now guest has two interface, “eth0” and “eth1”, one on LAN and another on WAN. (The guest can download from WAN and upload to LAN members; no need for USB?)