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:
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:
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.
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.