Offline software installation

Hello everyone,

I need some help.

Here the background :

  • I have a PC without internet connexion where Rocky Linux is installed.
  • I have a web server VM in this PC.

What I wish :

  • I wish to connect my web server VM in a LAN.

What i tried :

  • Try to connect the VM in LAN with gnome-boxes (FAILED, seems very complicated for me)

So I decided to Install Virtualbox :

I did this commands in a rockylinux PC with internet :

sudo dnf download --resolve virtualbox.rpm --downloaddir=/path/

(virtualbox.rpm is the package downloaded on virtualboxwebsite for RHEL 8)

I copied all packages in USB key and did this to the rockylinux offline PC :

sudo dnf install *.rpm -y --disablerepo appstream --disablerepo baseos --disablerepo extras

After that when i start virtualbox and import my web server VM, i have an error :

Kernel driver not installed (rc=1908)
The Virtualbox Linux kernel driver is either not loaded or not set up correctly.

Did i forget some packages ?

Thank you all for you time and help !

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.

Thank you for your answer jlehtone,

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?)