install CentOS 6.3 minimal on Hyper-V


Published on

install CentOS 6.3 minimal on Hyper-V

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

install CentOS 6.3 minimal on Hyper-V

  1. 1. INSTALL CENTOS MINIMAL ON HYPER-VI’ll quickly take you through the steps required to get the CentOS 6.3 minimalLinux distribution up and running on a Hyper-V host, along with networking andthe Linux integration components all enabled.The minimal release of CentOS only appeared with release 6.2 –You get literally thecore OS, and nothing else (not even network access, but we’ll fix that!) – You justinstall what you require afterwards. I think this is a great idea, as it will keep yourattack surface area to a minimum, you’re not wasting resources on the Hyper-V nodewith components you’re not going to use, and it’s much quicker to download(~=330MB) than the full DVD ISOs (~=5.4GB)!First, download the CentOS 6.3 minimal ISO. While we’re at it, grab a copy of theLinux integration components.While they are downloading, head over to your Hyper-V host, and create a new virtualmachine.
  2. 2. Hyper-V ManagerName it as you please, then make sure you connect it to a network with externalconnectivity. On disk size, if you want to keep it tight, you could get away with 2GB.When we get to the installation option screen of the new VM wizard, we will want totell it to boot from our CentOS minimal ISO. Hopefully your download has finishednow, so copy it along with the Linux integration components ISO, onto your Hyper-Vhost. Select the CentOS minimal ISO as the boot image file, then continue with thewizard. When the wizard has completed, start the new VM, from the actions on theright, then click connect. CentOS minimal installerAt the startup screen, select the first option to start the CentOS installer. I would skipthe media check that the installer offers as it can cause the ISO to eject.
  3. 3. In the installer you will need to select the regional settings appropriate to you. TheVHD for the VM will be empty/not formatted, so needs initializing: CentOS drive initializationKeep going through the wizard, entering your timezone and root password. For diskpartitioning, just go with the defaults (unless you have special requirements) andwrite the changes to the disk.
  4. 4. CentOS disk partitioning
  5. 5. Our CentOS system should now begin the installation, don’t make a coffee – it won’t take very long! CentOS installationOnce the installation has finished, the VM will reboot. It might end at the installerscreen, as our ISO is still mounted. Don’t go through the installation again! Turn offthe VM via the action menu, then from the media menu, eject the CentOS minimalISO, and replace it by moutning the Microsoft Linux Integration Components that wedownloaded earlier, and start up the VM again.All being well, we should end up at the login prompt, login with username root, andwhatever password you chose earlier. We will now install the Linux IntegrationComponents. These enhance your VM by adding features such as time sync with theHyper-V host, heartbeat reporting to Hyper-V host, multi processor support, shutdownsupport form Hyper-V manager, and also NIC, IDE and SCSI drivers. Issuing thefollowing commands as root should install the Linux Integration Components:
  6. 6. mount –r /dev/sr0 /mediacd /media/RHEL63./install.shOnce installed we’ll need to restart again, type reboot at the command prompt.While the VM is rebooting, we can eject the ISO via the media menu. Hopefully theHyper-V management console should now be reporting on the heartbeat status foryour VM.If we log in again as root, with the password we used earlier, we can now proceedd toconfigure the network on the VM, as the system isnt’t going to be much use withoutit!Run ‘vi /etc/sysconfig/network-scripts/ifcfg-eth0’ at the command prompt, then invi, press i to go into insert mode, then enter the following:DEVICE=eth0BOOTPROTO=staticONBOOT=yesIPADDR= you have to replace the settings with the correct details for your network!To save the file, press Esc, Shift + : , wp, <Enter>We now need to do the same as above for /etc/resolv.conf – add the IP’s of your DNSservers to this file:nameserver final file we need to edit is /etc/sysconfig/network in order to enablenetworking, and set the system hostname. Add the following ot this
  7. 7. Now start the network by entering the command ‘service network restart’. You shouldsee eth0 start up, and should be able to ping other hosts on your network, andbeyond!At this stage I like to update all the packages on the system with the followingcommand ‘yum –y update’Once the update has completed, we’ve got a minimal CentOS system configured, withnetwork connectivity and the Linux integration components fully working – now it’stime for you to install whatever you need onto it, and put it to some use!