How To: Networking in CentOS under Hyper-V

Set up a new Hyper-V virtual machine using the wizard, and install CentOS in the Hyper-V virtual machine.

Next, download the Linux Integration Components (LinuxIC) ISO from Microsoft — the link to the current version is at the end of this article. Add the ISO as a “DVD” drive to your VM.

Log into the CentOS VM, and mount the LinuxIC ISO with this command:

Next, open the /media directory, and then open the directory corresponding to your version of CentOS. For example, if you have CentOS 6.3 installed, open /media/RHEL6. Run the install.sh script.

Create the /etc/sysconfig/network file. This may already exist. If not, enter the following:

Create the network script for the adapter. You’ll need to know the MAC address of the network adapter – you can find this in the VM settings section.

Restart the network service to bring up the adapter:

NOTE: If you need Internet access before or directly after the installation, you’ll need to add a Legacy Network Adapter – the regular network adapter will not be useable by CentOS until you have installed the Linux Integration Components from Microsoft.

Linux Integration Components download:

http://www.microsoft.com/en-us/download/details.aspx?id=34603

Comments

comments

4 Comments

  1. 1. missing info on /etc/sysconfig/network-scripts/ifcfg-eth0 script : where to put MAC address?
    2. Wouldn’t it be easier just to add legacy LAN in the VM properties?

Leave a Reply

Your email address will not be published.


*