Minimal CentOS 6.4 with Hyper-V

Now that CentOS includes the kernel drivers for Hyper-V it is very easy to setup a CentOS 6.4 based server in Hyper-V. Download the “minimal” ISO and create a new Hyper-V VM. Run through the installation and reboot.

What you will notice when logging in is that the eth0 NIC has not been started. This is normal and if you want to access the network with a DHCP assigned address simply start the interface:

ifup eth0

Now you should be able to access the network that your Hyper-V VM has access to.

Since you don’t wan’t to do this everytime you start your system you need to change a config file. The file to change is (provided your NIC is named eth0)

/etc/sysconfig/network-scripts/ifcfg-eth0

The contents of this file is something similar to this:

DEVICE=eth0
HWADDR=00:15:5D:01:7F:0C
TYPE=Ethernet
UUID=7042ad34-28c7-4b0e-96ab-3c69ee778901
ONBOOT=no
NM_CONTROLLED=yes
BOOTPROTO=dhcp

If you’re happy with getting your IP from the DHCP server, simply change the “ONBOOT=no” to “ONBOOT=yes”. Next time you reboot you will get your network straight away.