0

I am using an Ubuntu virtual machine. I would like my VM to be in the same LAN as my actual host machine (a wireless laptop). To be reflected as if its a completely separate host. Is this possible, if so how should I go about editing the settings?

1
  • In the Virtualizing APP (VMware or other), set the LAN settings of the Guest machine to be a Bridged Network. Restart the Guest. Now it has an IP from your router on the very same Subnet as the Host (but a different IP address).
    – John
    Aug 2, 2020 at 17:01

1 Answer 1

0

If you are in VirtualBox/VMware you are looking for bridged networking. It allows a VM to directly connect your router.

First click the VM > Settings > Network and set Attached to "Bridged adapter".

Now to change private IP address of Ubuntu VM, boot it and open terminal. Run sudo nano /etc/network/interfaces to open The file in name or in any of your liked editor like gedit or Vim.

Then find these:

auto eth0
iface eth0 inet dhcp

And populate with settings:

auto eth0
iface eth0 inet static
address private_ip
netmask subnet_mask
gateway router_or_gateway_ip
dns-nameservers dns_1 dns_2

Reboot and then your VM will be visible in LAN. You can use ifconfig to see IP address and other network configuration for VM.

You must log in to answer this question.

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