How do I bind an additional IP address to a Hyper-V Linux virtual machine?
The following article explains how to bind an additional IP address to a Hyper-V Linux virtual machine running CentOS. Before you can bind an additional IP address, you must contact your sales executive to request the additional IP address(es). They will supply you with the IP address(es) which you can then bind to your machine. If you prefer we can bind the IP address(es) to your machine for you.
To bind the initial IP addresses to a Hyper-V Linux virtual machine, please follow these steps:
- Log into your server using Remote Desktop Connection.
- Open the Hyper-V Manager, typically located in Administrative Tools.
- Right-click the appropriate virtual machine and click Connect.
- On the virtual machine, create and edit the file /etc/sysconfig/network-scripts/ifcfg-eth0
- Enter the following information:
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=<IP address provided>
NETMASK=<netmask IP address provided>
NETWORK=<gateway IP address provided> - Save and exit the file.
To bind additional IP address(es) to a Hyper-V Linux virtual machine, please follow these steps:
- Log into the virtual machine using SSH.
- Create and edit the file /etc/sysconfig/network-scripts/ifcfg-eth0:# where # represents the next number in the series of additional IP addresses. (ifcfg-eth0:1 = first additional IP address, ifcfg=eth0:2 = second additional IP address, etc)
- Enter the following information:
DEVICE=eth0:#
BOOTPROTO=static
ONBOOT=yes
IPADDR=<IP address provided>
NETMASK=<netmask IP address provided>
- Save and exit the file.




