Jared Heinrichs

  • Technology Blog
  • Winnipeg Computer Repair
  • Winnipeg Photographer
  • Cooking With Jared
You are here: Home / Uncategorized / How to install CentOS on Hyper-V with networking

Apr 28, 2012 By Jared Heinrichs 2 Comments

How to install CentOS on Hyper-V with networking

I had one heck of a time getting CentOS working on Hyper-V. I am using Microsoft Hyper-V Server and CentOS 6.2. I sifted through many online forums and blog posts to make an “All-in-one” resource guide on how to get centOS working on Hyper-V. Don’t worry about installing a legacy NIC either Winking smile

First I will explain what I used to get things working. I am using 3 machines for this “How to” and I will refer to them in this way:

  • DC – Has Hyper-V Manager installed. Running AD
  • HYPERV – The actual Hyper-V Server. Part of the Domain configured on DC.
  • centOS – Hyper-V Linux Guest

You will need to download a few things:

  • centOS ISO
  • Linux Integration Components – Linux.IC.v3.2.iso
  • On HYPERV I create a folder C:\iso and put copy both of the ISO files here.

Step by step how I installed CentOS on Hyper-V with Networking.

On DC open Hyper-V Manager. Create a new virtual machine.

How to install CentOS on Hyper-V with networking

Name the Virtual Machine. hit Next.

How to install CentOS on Hyper-V with networking

Enter the amount of ram you want to give the centOS guest machine.

How to install CentOS on Hyper-V with networking 01

Make sure to tell the Virtual Machine what Hyper-V Network to use.

How to install CentOS on Hyper-V with networking 02

I just took all the defaults.

How to install CentOS on Hyper-V with networking 03

Tell Hyper-V Manager to use an ISO file. C:\iso\CentOS-6.2-x86_64-bin-DVD1.iso

How to install CentOS on Hyper-V with networking 04

Hit next and finish

Right Click the centOS Guest and click START. When the VM starts click “Install or Upgrade…”

How to install CentOS on Hyper-V with networking 05

I would recommend that you hit ok to test the media. I’ve already done this so I will hit “Skip”.

How to install CentOS on Hyper-V with networking 06

Hit Ok

How to install CentOS on Hyper-V with networking 07

Hit Ok

How to install CentOS on Hyper-V with networking 08

Hit Ok

How to install CentOS on Hyper-V with networking 09

“Re-initialize all”.

How to install CentOS on Hyper-V with networking 10

Select your UTC.

How to install CentOS on Hyper-V with networking 11

Enter your password.

How to install CentOS on Hyper-V with networking 12

Use the defaults

How to install CentOS on Hyper-V with networking 13

Write changes to disk

How to install CentOS on Hyper-V with networking 14

Twiddle your thumbs and grab a coffee. This will take a few minutes.

Yay! You should be done now. REBOOT!

How to install CentOS on Hyper-V with networking 15

When the centOS machine reboot login with root and password you entered during the setup.

How to install CentOS on Hyper-V with networking 16

On DC in Hyper-V Manager we need to load the Linux Integrated components ISO in the virtual Machine.

How to install CentOS on Hyper-V with networking 17

Once you have applied the new ISO go back to the centOS VM. You will need to start typing a bunch of commands. If we were to take the PDF seriously and type in the commands as is you will get the error message:

ls: cannot access kmod-hyper-v-rhel6-43.1.x86_64.rpm: no such file or directory
ls: cannot access hyper-v-rhel6-43.1.x86_64.rpm: no such file or directory
RPM’s are missing

Wow that is a mouthful! So instead of wasting your time let’s not follow the PDF and do it correctly from the beginning. I’m going to explain the screenshot first so you can understand what is happening.

We’re going to mount the CD inside centOS. We then need to copy the files from the CD and then run the Linux Integration components installer. There are 5 command you will have to enter. The last command starts with a “.” just encase you didn’t see that.

How to install CentOS on Hyper-V with networking 18

You should see a bunch of things being installed. When done it will ask you to reboot your machine.

How to install CentOS on Hyper-V with networking 19

Here’s the command to reboot. When the machine boots please login as root.

How to install CentOS on Hyper-V with networking 20

Congrats. You now have the Linux Integration components installed. You can verify that they are by looking at the Hyper-V manager. If the tools tell you the heartbeat is “OK” you know you’ve successfully completed all the steps up till now. You should also be able to click inside the virtual machine without doing a dance and you can hit power on the Hyper-V tools and the VM should power down nicely.

How to install CentOS on Hyper-V with networking 21

Yippy! Actually not really. Our VM on reboot will not have a NIC. We first will need to right click the centOS VM and write down the MAC address Hyper-V gave the centOS VM.

How to install CentOS on Hyper-V with networking 23

We will now need to make a bunch of changes to some centOS config files. Very fun!

How to install CentOS on Hyper-V with networking 24

Press i Key on keyboard and type the below lines. Please notice I used the MAC address from the screen shot a few lines up

How to install CentOS on Hyper-V with networking 25

To save the file hit: “ESC” then “SHIFT + :” and then type “wq” and hit ENTER.

We will need to edit another file.

How to install CentOS on Hyper-V with networking 26

Again you’ll want to hit “I” to insert some info.

How to install CentOS on Hyper-V with networking 27

To save the file hit: “ESC” then “SHIFT + :” and then type “wq” and hit ENTER.

You will now need to bring up the network card (ifup eth01 command) and then verify that it got an IP address (ifconfig command)

How to install CentOS on Hyper-V with networking 28

The first thing I would do to test the NIC and it’s stability is by updating the box with all the updates. To do this we will use the yum command.

How to install CentOS on Hyper-V with networking 29

After all the updates get applied. Force the machine to reboot. Double check all the updates got applied. Hopefully I saved you a few hours of mindless searches Smile

Filed Under: Uncategorized

Comments

  1. Bill says

    Aug 9, 2012 at 8:12 am

    Hi Jared,

    I followed your steps (which work alot better than Microsoft’s) however I am receiving an error that
    kernel (strln) = oxd0d86– is needed by kmod-microsoft-hyper-v-r—–.i386

    I see several lines like this all are different though. It finally stops and says Kmod RPM installation failed, Exiting.

  2. ichi says

    Aug 16, 2012 at 3:32 pm

    thanks a lot. really useful. 🙂

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Board Game Rules
  • Camera
  • Computer Hardware
    • Blackberry
    • drivers
    • iPad
    • Magic Jack
    • USB
  • Damn Small Linux
  • Exam Notes
  • Facebook
  • FREE Flashcards
  • Games
    • PC
      • League of Legends
    • Wii
    • xbox 360
  • Music
  • Networking
    • Cisco Certification
    • Mitel
    • Palo Alto Firewall
  • News
    • Google
    • Microsoft
  • Operating System
    • Active Directory (2003)
    • Android
    • Command Prompt
    • Damn Small Linux
    • Group Policy
    • Hyper-V
    • IIS
    • ISA 2006
    • Mac OS X
    • Microsoft Exchange Server
    • Powershell
    • Security
    • SME Server
    • Terminal Server 2003
    • Ubuntu Linux
      • Adito Web SSL VPN
      • OpenVpn-als
      • Webmin
    • Virtual Machine Manager
    • Windows 2003 SBS
    • Windows 2003 Server
    • Windows 2008
    • Windows 2008 R2
    • Windows 2012R2
    • Windows 7
    • Windows 8
    • Windows Command Line
    • Windows Deployment Services
    • Windows Server Backup
    • Windows Vista
    • Windows XP
  • Phones
  • Photography
  • Photos
    • Animals
    • Misc
    • Nature
    • Portraits
  • Portfolio
  • Programming
    • CSS
    • HTML
    • jQuery
    • MySQL
    • PHP
    • Script
  • Programs
    • Acrobat
    • Acrobat Reader
    • Adobe Dreamweaver
    • Adobe Illustrator
    • Adobe Photoshop
    • Anti-virus Software
    • Antivirus
    • Backup Exec
    • Bittorent
    • Blackberry BESADMIN
    • Internet Explorer 9
    • Lightroom
    • Microsoft Office
    • Netbeans
    • Onenote
    • Outlook
    • Shelby
    • Sysprep
    • Trend
    • Video Editing
    • Visual Studio
    • Windows Live Writer
    • WireShark
    • XP Mode
    • Zarafa
  • Recipe
  • Review
  • Software Links
  • Troubleshooting
  • Uncategorized
  • Videos
  • Web Applications
    • Brage
    • Google
    • Spiceworks
    • Wordpress
  • Web Browsers
    • Internet Explorer
  • Web Server
    • XAMPP
  • Winnipeg
    • ISP

Try searching this site!

Copyright © 2021 Winnipeg Web Design