Virtualbox: Difference between revisions

From Bitpost wiki
No edit summary
 
(One intermediate revision by the same user not shown)
Line 15: Line 15:


=== LAN and DHCP ===
=== LAN and DHCP ===
ALWAYS use bridged mode, so the boxes can see each other, and the host, and the internet, ffs:
* For each VM > Settings > Network > Adapter1 > Attached to: Bridged Adapter
* Do NOT "create a network" for the host
That spoofs VM packets so they travel to host LAN as if VM was also on the LAN.  From what I've read, wifi connections in linux do NOT work with bridged due to anti-spoofing protections.  But wired works fine.  You'll get an IP from the host's LAN.  You can go host <-> VM since they are both on the LAN.
OLD NOTES


I think these are the defaults, they seem sane:
I think these are the defaults, they seem sane:

Latest revision as of 15:10, 20 April 2018

Guest Additions

Guest additions seem to be a necessary evil to get the clock syncing. Which version to install? Seems that the apt way is working best.

  • In Ubuntu you can use apt:
sudo apt-get install dkms
sudo apt-get install virtualbox-guest-additions-iso
# check the status:
sudo service virtualbox-guest-utils status
# DO NOT INSTALL ntp!
sudo apt remove ntp
  • You can mount /dev/cdrom to get the version that came with the Windows host install.
su -
mount /mnt/cdrom /mnt/guestiness
cd /mnt/guestiness/
./VBoxLinuxAdditions.run

LAN and DHCP

ALWAYS use bridged mode, so the boxes can see each other, and the host, and the internet, ffs:

  • For each VM > Settings > Network > Adapter1 > Attached to: Bridged Adapter
  • Do NOT "create a network" for the host

That spoofs VM packets so they travel to host LAN as if VM was also on the LAN. From what I've read, wifi connections in linux do NOT work with bridged due to anti-spoofing protections. But wired works fine. You'll get an IP from the host's LAN. You can go host <-> VM since they are both on the LAN.

OLD NOTES

I think these are the defaults, they seem sane:

Host app > File > Host Network Manager > Properties > Adapter > [x] Configure automatically
                                                    > DHCP Server > Server Address > 192.168.56.100
                                                                  > Lower/Upper bounds .101 - .254

So we can just set a static one in a VM to:

192.168.56. [2 through .99]

And set up the host in the VM hosts file to:

192.168.56.100