0

Trying to get network up and running on a VM, but having some difficulties which I just can't figure out.

Host OS is Ubuntu 18.04, guest OS is nix-based OS where I can include and load the drivers necessary, e.g. virtio, vmxnet3, e1000 and whatever else.

If I compile the guest OS VM loading the vmxnet3 driver and run it on VMware Player (NAT network), networks runs fine and I can transfer files between host and guest OS with scp, etc. Output from ifconfig on guest OS:

enter image description here

If I compile the guest OS VM loading the virtio driver and run it on VirtualBox (again NAT network), I' not being able to get the network up and running for some reason. Output from ifconfig on guest OS:

enter image description here

What I notice is of course that in VirtualBox I don't get assigned an (ivp4) IP for the vt0 interface. I can of course run ifconfig vt0 xxx.xxx.xxx.xxx netmask 255.255.255.0 but I'm not sure if that's supposed to do the trick, at least it doesn't work when trying to connect to the VM through ssh/scp.

enter image description here

I've checked that the host PC (IP for MTU 1500, same as in guest OS, is 172.16.129.1) has port 22 open;

sudo nmap -sS -p- 172.16.129.1

Starting Nmap 7.60 ( https://nmap.org ) at 2018-06-19 10:47 CEST
Nmap scan report for linux (172.16.129.1)
Host is up (0.000013s latency).
Not shown: 65532 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
902/tcp  open  iss-realsecure
1716/tcp open  xmsg

So basically, the only difference between these two VMs besides the obvious difference of the software used (VMware vs VirtualBox) is the driver that is loaded for each of them. Rest of the code for compiling the guest OS VM is exactly the same with no changes whatsoever, so I'm really confused.

I've also tried using e1000 as driver and selecting one of the Intel NIC drivers in VirtualBox, but that doesn't work either - the closest I've gotten so far in VirtualBox is using the virtio driver.

Does anyone have a suggestion for what I might try, or know what I might be overlooking here? E.g. does there exist a vmxnet3 driver for VirtualBox?

I could of course just settle for the VMware solution, but I prefer using VirtualBox since that's what I'm using otherwise - I just tested VMware now to see if it worked there, which it does.

1
  • I see now when running ifconfig on the host, the virtual interfaces are called vmnet1 and vmnet8, which makes me suspect they're for VMware only. Removed VMware player now, and now I don't have any virtual interface available in the host, so maybe I just need to configure that in some way?
    – blubbafett
    Jun 19, 2018 at 10:40

1 Answer 1

0

Figured out that I hadn't set up VirtualBox properly, thus why it wouldn't work at all. I hadn't set the Paravirtualization interfacein VirtualBox to KVM, and thus the virtio driver wasn't enabled. Now that this is taken care of it all works like a charm - I probably got fooled by the fact that I didn't have to do this in VMware player.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .