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