VMware Communities
Marty_M
Contributor
Contributor
Jump to solution

How to change host IP on Linux/RHEL for host only virutal network?

I have a Windows XP guest running on RHEL 6.2 host.  I am using VMware Workstation 8.0.3.  I have a host only virtual network adapter without DHCP.

My guest needs to use ip addresses 190.168.128.1 through 190.168.128.9.  However, this confilcts with the automatically assigned Host address of 190.168.128.1.  I can't find a way to change the address of the host.  I would like to set it to 190.168.128.10.

Strangely, my virtual network adapters don't show up when I click on Network icon on the taskbar.

Previously I have had this configuration setup up on a Windows 7 host and I was easily able to change this setting though the virtual network adapter properties.  In Windows, when a new virtural adapter is added, it shows up in the list of available adpater.

Thanks,

Marty

0 Kudos
1 Solution

Accepted Solutions
WoodyZ
Immortal
Immortal
Jump to solution

but in my /etc/vmware folder I only have a folder for vmnet8 and not for 1 and 2.  They are present if I run ifconfig.  Also, if it matters, I am not using DHCP on either host only virtual network.

Then you'll need to add the following to the /etc/vmware/networking file as root and then reboot the Host.

With the VM shutdown, not suspended and VMware Workstation closed...

In a Terminal:

su -

nano /etc/vmware/networking

Add the following under: answer VNET_1_VIRTUAL_ADAPTER yes

answer VNET_1_VIRTUAL_ADAPTER_ADDR 190.168.128.10

Ctrl+O to save Ctrl+X to exit

Reboot the system, (shutdown -r now) if you want to do it from the Terminal.

There actually is a way to stop the VMware Networking Services to then edit the file, and then restart the services and not have to reboot however I don't have the commands handy so a reboot of the Host should take care of it.

View solution in original post

0 Kudos
8 Replies
AWo
Immortal
Immortal
Jump to solution

See: http://pubs.vmware.com/ws8/wwhelp/wwhimpl/js/html/wwhelp.htm#href=using_ws/GUID-EA545AA3-8562-4F89-9...

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
Marty_M
Contributor
Contributor
Jump to solution

AWo,

    My understanding is that the "Subnet IP" just defines the IP address range of the subnet, not the IP address of the host..  I have it set to 190.168.128.0 with a subnet of 255.255.255.0.  So valid addresses should be 190.168.128.1 through 190.168.128.254.  It appears the host grabs the first valid address.

0 Kudos
AWo
Immortal
Immortal
Jump to solution

You are right. The host gets the 1. The DHCP range for the VMware DHCP server, serving the guests, usually starts with 128.

You can change the host adapter IP address in the vmnetdhcp.conf file (Windows) and /etc/vmware/vmnet1/dhcp/dhcp.conf file (Linux).

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
Marty_M
Contributor
Contributor
Jump to solution

"You can change the host adapter IP address in the NIC setup of the host."

This is what I can't figure out how to do in Linux.  The virtual network adapters don't show up alongside the physical adapters, so I can't find where to change their settings.

0 Kudos
AWo
Immortal
Immortal
Jump to solution

Sorry, read my post again, you can change that in the /etc/vmware/vmnet1/dhcp/dhcp.conf file.

The address is a reserved DHCP address.

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
Marty_M
Contributor
Contributor
Jump to solution

Thanks for the continued help, but in my /etc/vmware folder I only have a folder for vmnet8 and not for 1 and 2.  They are present if I run ifconfig.  Also, if it matters, I am not using DHCP on either host only virtual network.

0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

but in my /etc/vmware folder I only have a folder for vmnet8 and not for 1 and 2.  They are present if I run ifconfig.  Also, if it matters, I am not using DHCP on either host only virtual network.

Then you'll need to add the following to the /etc/vmware/networking file as root and then reboot the Host.

With the VM shutdown, not suspended and VMware Workstation closed...

In a Terminal:

su -

nano /etc/vmware/networking

Add the following under: answer VNET_1_VIRTUAL_ADAPTER yes

answer VNET_1_VIRTUAL_ADAPTER_ADDR 190.168.128.10

Ctrl+O to save Ctrl+X to exit

Reboot the system, (shutdown -r now) if you want to do it from the Terminal.

There actually is a way to stop the VMware Networking Services to then edit the file, and then restart the services and not have to reboot however I don't have the commands handy so a reboot of the Host should take care of it.

0 Kudos
Marty_M
Contributor
Contributor
Jump to solution

I used "vi" instead of "nano" just because of my familiarity with it.  But the end result was the same.

Thanks!!

0 Kudos