Installing CentOS 5.5 on Hyper-V


  1. Hyper-V is installed and you have a new VM set up.  For help with this, see the post:  Walk-through: Hyper-V on Windows Server 2008 R2.
  2. Install the Legacy Network Adapter for your VM instead of the default.  To do this:  In the “Settings” page of the VM, click “Add Hardware”.  Select “Legacy Network Adapter” and “Add”.  Select the network to connect it to from the list and hit “Apply” to save changes.  At this point you can remove the other Network Adapter if your VM only needs one virtual NIC.
  3. Make sure that you have the installation media either on physical CD/DVDs or in the form of an .ISO or other supported image file and that the VM is set to boot from it.  See the link above if you need help mounting the installation media.

Starting the Installer

  1. For the purposes of this walk-through, I will be using the “net install” version of the CentOS media.  This will only work if your VM has a working internet connection during installation.
  2. Connect to your VM by right-clicking it and clicking “Connect…”
  3. Click the “Start” button on the toolbar to crank it up
  4. At the “boot:” prompt, type “linux text” and press enter.  (graphical mode can get ugly in Hyper-V)
  5. Choose your language and keyboard layout.
  6. When prompted for the “Installation Method”, choose “HTTP”
  7. On the next screen you will get a chance to configure the TCP/IP settings of the virtual network interface.  Set them up appropriate for your network and click “OK”.
  8. When prompted for the web site and directory, use the following:
    • Web site name:  mirror.centos.org
    • CentOS directory:  centos/5.5/os/x86_64
    • NOTE: Your location may vary!  I am installing the 64bit version of CentOS 5.5 in this example.  If you were installing the 32bit version of CentOS 5.4, your directory would be “centos/5.4/os/i386”
  9. If the installer was able to access the server and directory, you should see a message welcoming you to CentOS!

Configuring CentOS

  1. The first thing the installer will want to do is set up the drives/partitions.  I normally allow it to “Remove all partitions on selected drives and create default layout.”  Since this is a virtual machine, we will assume that there is no dual-boot situation here or any reason to leave existing partitions intact.  If you feel the need to choose a different scheme here, do so at your own risk.
  2. You will be asked to configure your NIC.  Do so and make sure that IP4 is selected, as well as “Activate on boot”.  IP6 is up to you.
  3. The next few prompts will be your standard NIC settings:  DHCP vs. Manual, DNS settings, hostname, etc.
  4. Set your time zone when prompted.
  5. Set your root password.  (NOTE:  This is very very important.  Make it strong and remember it!)
  6. The next section will be focused on package selection.  Keep in mind that using the GUI on a linux guest in Hyper-V ranges from “no fun” to “non-functional”.  I would stick to a bare bones install without Gnome or KDE.  You may want to select “Customize software selection” to get some of the packages that you will be using installed right off the bat.  Once you have made your selections, click “OK”.
  7. CentOS will now start downloading and installing the selected packages.  When package installation is complete, you will be prompted to reboot the VM.
  8. When the VM reboots you should be greeted with the CentOS Setup Agent.  If it brings you back to the installer, turn off the VM, go to “File->Settings” and set the DVD Drive Media to “None”.  This is the equivalent of ejecting the CentOS installation CD.  Start the VM again.
  9. The Setup Agent will allow you to further customize your system settings.  Going into all of these settings is beyond the scope of this guide, but most are self-explanatory.  At this point your CentOS virtual machine is installed and running.  For more help configuring CentOS, visit centos.org or search this site for other articles about CentOS.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.