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:
mount /dev/cdrom /media
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.
DEVICE=eth0 BOOTPROTO=dhcp NM_CONTROLLED=yes ONBOOT=yes DHCP_HOSTNAME=$(hostname -s)
Restart the network service to bring up the adapter:
service network restart
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: