Page 1 of 1

No Ip is assigned for Virtual Machine.

Posted: 12. Sep 2013, 07:01
by navaz
Hi

I am using a Virtual box 4.2.16 . Guest operating system is ubuntu.
I am not able to ping to my Host ip which is running Windows7.
In virtual box settings i have enabled both adapters.
1)NAT
2)Host only Adapter.
If I give ifconfig -a it will show 3 interface.
eth2,eth3,lo where no Ip is assigned to eth2 and eth3.
But i need to change it eth2 and eth3 to eth0 and eth1.
sudo dhclient eth0
command gives no such device error message.
No permission to edit the file /etc/udev/rules.d/70-persistent-net.rules .

Could you please tell me how can i able to ssh from host OS to Virtual Box running Ubuntu using Putty. Virtual Box is not getting IP.

Regards
Navaz

Re: No Ip is assigned for Virtual Machine.

Posted: 12. Sep 2013, 11:55
by mpack
Win7 ignores pings by default.

NAT VMs are not assigned an IP, they communicate using the hosts IP and a switch in the host software. You need to use "Bridged" if you want the VM to be an equal participant on the network.

Re: No Ip is assigned for Virtual Machine.

Posted: 12. Sep 2013, 15:42
by Perryg
But i need to change it eth2 and eth3 to eth0 and eth1.
Common problem that new to Linux users are faced with. Changing adapters and MAC addresses forces Linux to change the eth* to prevent problems.
You can fix this by editing the /etc/udev/rules.d/70-persistent-net.rules or you can delete the rules and Linux will configure it on the next boot.

Note: editing or deleting system files require elevated permissions. ( su/sudo )