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:
vi /etc/sysconfig/network
NETWORKING=yes HOSTNAME=COMPUTERNAME.DOMAIN
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.
vi /etc/sysconfig/network-scripts/ifcfg-eth0
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:
http://www.microsoft.com/en-us/download/details.aspx?id=34603
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?
Hi,
But this is needed in case if you have lower than 2.6.32 kernel. In 2.6.32 already streamed in Hyper-V components from MS.
Version 3.5 of LIC:
http://www.microsoft.com/en-us/download/details.aspx?id=41554
Its working….
Rock on simple and elegant