Page 1 of 1

Virtualbox taking Ip 10.2.x.x instead 192.1638.x.x,Fix IP

Posted: 28. Aug 2015, 06:31
by shahab82
Hi,

I like virtualbox and I am using it since many years.

One problem I come across recently make my work delay because virtual box taking IP 10.2.x.x instead of 192.168.x.x

I want to keep virtual machine IP always 192.x.x and do not change in case any new virtual machine added or removed from virtualbox or vmware.

Because I have php applications installed on ubuntu virtual machine and they get IP as per virtual machine and store in database as well.

When IP change for virtual machine all applications stop working.

So Is it possible to fix (permanent) ip of virtual machine.

Regards,
Shahab

Re: Virtualbox taking Ip 10.2.x.x instead 192.1638.x.x,Fix I

Posted: 28. Aug 2015, 07:03
by BillG
You will always get a 10.2.x.x address if you are using the NAT option. If you want your machine to be reachable from the network you need to use bridged mode.

Re: Virtualbox taking Ip 10.2.x.x instead 192.1638.x.x,Fix I

Posted: 30. Aug 2015, 11:49
by shahab82
Hi,

So with bridge network option, I will be able access opt/lampp folder and run lampp on ubuntu. Share files and folder, access machine from host browser?

I am able to share folders between host and guest using guestadddiotion installation but with bridge I can mount host drives or share folders.

Why this option not working.

H:\Program Files\Oracle\VirtualBox>VBoxManage modifyvm "ubuntu" --natnet1 "192.1
68/16"

I am getting error

NAT#0: Configuration error: network '192.1' describes not a valid IPv4 network ...

Any idea?

Regards,
Shahab