Windows 10: Hyper-V VM - Install CentOS Linux in Windows 10  

    Hyper-V VM - Install CentOS Linux in Windows 10

    Hyper-V VM - Install CentOS Linux in Windows 10

    How to Install CentOS Linux on Hyper-V Virtual Machine in Windows 10
    Published by Category: Virtualization
    07 Oct 2014
    Designer Media Ltd

    Published by


    Kari's Avatar
    Finnish but not finished


    Location: A Finnish ex-pat in Germany
    Posts: 11,254

    Show Printable Version 


    How to Install CentOS Linux on Hyper-V Virtual Machine in Windows 10


    Note   Note
    A working and quite nice alternative for dual booting is to install various operating systems on a virtual machine. CentOS is officially supported by Microsoft as a guest OS for Hyper-V and is nicely integrated when installed. Since CentOS version 6.4 the Linux Integration Services (LIS) for Hyper-V have been included in CentOS, making the use of it on a virtual machine much easier.

    About LIS:

    Microsoft said:
    Hyper-V supports both emulated (“legacy”) and Hyper-V-specific (“synthetic”) devices for Linux virtual machines. When a Linux virtual machine is running with emulated devices, no additional software is required to be installed. However, emulated devices do not provide high performance and cannot leverage the rich virtual machine management infrastructure that the Hyper-V technology offers. To make full use of all benefits that Hyper-V provides, it is best to use Hyper-V specific devices for Linux. The collection of drivers that are required to run Hyper-V-specific devices is known as Linux Integration Services (LIS).
    Linux Integration Services v35.pdf

    Although there are more suitable Linux distos for beginners, CentOS is easy enough to install and use with very basic knowledge of Linux. The native integration components and services make it an ideal guest for Hyper-V.

    CentOS on Wikipedia: CentOS - Wikipedia, the free encyclopedia


    Before starting you need to download the CentOS 7 ISO image: Download CentOS (version 7 is the latest at the moment this tutorial is written).

    Contents:





    Hyper-V VM - Install CentOS Linux in Windows 10 Part One Hyper-V VM - Install CentOS Linux in Windows 10
    Create a new virtual machine

    1.1) If you have not set up Hyper-V do it now as told in Hyper-V tutorial Part One through Part Three
    1.2) Create a new virtual machine as told in Hyper-V tutorial Part Four with following settings (steps here referring to respective steps in Hyper-V tutorial):

    • Step 4.5 > If you have less than 4 GB RAM on your host, assign the vm 1 GB (1024 MB) and unselect Use Dynamic Memory. When Dynamic Memory is enabled CentOS uses quite a lot of RAM and can slow down your host system. I recommend enabling Dynamic Memory only if you have more than 4 GB of RAM
    • Step 4.6 > Select Not Connected
    • Step 4.7 > If you will only use your CentOS for some simple testing, surfing and so on, an 8 to 10 GB virtual hard disk is enough, I recommend 20 to 30 GB
    • Step 4.8 > Use the CentOS ISO file you downloaded
    • Come back to this tutorial after Step 4.9




    Hyper-V VM - Install CentOS Linux in Windows 10 Part Two Hyper-V VM - Install CentOS Linux in Windows 10
    Configure temporary network access

    2.1) To be sure CentOS has network connection during the installation we use a virtual legacy network adapter. Right click your new CentOS vm in Hyper-V Manager and select Settings
    2.2) Remove the network adapter:

    Name:  2014-10-07_15h39_21.png
Views: 5192
Size:  76.3 KB

    2.3) Still in vm settings, select Add Hardware on left pane, select Legacy Network Adapter and click Add:

    Name:  2014-10-07_20h00_49.png
Views: 3750
Size:  61.8 KB

    2.4) Select an existing external switch, click OK to save changed settings:

    Name:  2014-10-07_20h05_42.png
Views: 3668
Size:  81.7 KB




    Hyper-V VM - Install CentOS Linux in Windows 10 Part Three Hyper-V VM - Install CentOS Linux in Windows 10
    Configure CentOS

    3.1) Double click your CentOS vm in Hyper-V Manager to open the Virtual Machine Connection window, click Start button to boot the vm. Alternative method to start a vm, see the Hyper-V tutorial Part Four Step 4.10

    Name:  2014-10-07_20h13_21.png
Views: 18957
Size:  18.8 KB

    3.2) Press I (letter i) followed by Enter to start setup:

    Name:  2014-10-07_16h17_57.png
Views: 18970
Size:  18.6 KB

    3.2) First message you will get is an error message: Fast TSC calibration failed. No worries this is totally OK; as CentOS has not had any chance to connect to time servers to calibrate time, this message will be shown. CentOS setup continues after a short while
    3.3) Select the installation language you want CentOS to use:

    Click image for larger version. 

Name:	2014-10-07_15h42_18.png 
Views:	577 
Size:	207.7 KB 
ID:	6371

    3.4) Installation Summary screen will be shown. We need to do something for those five items marked in below screenshot, starting with Network & Hostname (#1). Click it to enter Network and Hostname settings:

    Click image for larger version. 

Name:	2014-10-07_16h08_59.png 
Views:	485 
Size:	201.5 KB 
ID:	6372

    3.5) Switch connection ON (#1), name your Host (#2), wait until you see that it's connected (green highlight in screenshot), click Done:

    Click image for larger version. 

Name:	2014-10-07_16h29_02.png 
Views:	424 
Size:	186.4 KB 
ID:	6375

    Note   Note
    The Hostname can only contain characters a to z, A to Z, 0 to 9, hyphens (-) and periods (.). Parts between two periods must contain something (two periods in a row not allowed) and cannot start or end with a hyphen.

    3.6) Back on Installation Summary page click Date & Time to select your region, set timezone and time format as shown in screenshot below, click Done (top left) when done:

    Click image for larger version. 

Name:	2014-10-07_16h34_35.png 
Views:	501 
Size:	556.7 KB 
ID:	6385

    3.7) If you use another input language (keyboard layout) than the default for the language you are installing, click Keyboard on Installation Summary page. Select your input language as shown in screenshot (don't panic, I'll explain all those arrows and numbers ):

    Click image for larger version. 

Name:	2014-10-07_15h44_29.png 
Views:	395 
Size:	240.5 KB 
ID:	6386

    1. Click the + button to open language list
    2. Select your desired input language
    3. Click Add
    4. Move your preferred input language to top of the list with arrow buttons
    5. Click Done

    3.8) Back on Installation Summary page, select Software Selection. You can of course select any setup you want to, screenshot shows my recommnedation. Click Done when you have selected your packages:

    Click image for larger version. 

Name:	2014-10-07_15h57_14.png 
Views:	694 
Size:	172.2 KB 
ID:	6387

    3.9) Once again back on Installation Summary. Click Installation Destination, accept default partitioning settings by clicking Done:

    Click image for larger version. 

Name:	2014-10-07_16h32_40.png 
Views:	377 
Size:	109.1 KB 
ID:	6388



    Hyper-V VM - Install CentOS Linux in Windows 10 Part Four Hyper-V VM - Install CentOS Linux in Windows 10
    Install CentOS, create users

    4.1) Start installation by clicking Begin Installation:

    Click image for larger version. 

Name:	2014-10-07_21h35_15.png 
Views:	735 
Size:	209.4 KB 
ID:	6389

    4.2) While CentOS installs we can set the root password and create a user account. Root in world of Linux is a rough equivalent of built-in administrator in Windows, the almighty user allowed to do whatever. The root password and at least one user account must be created for installation to complete.
    4.3) Click Root Password:

    Click image for larger version. 

Name:	2014-10-07_16h42_25.png 
Views:	443 
Size:	263.0 KB 
ID:	6390

    4.4) Set the root password, click Done when ready:

    Click image for larger version. 

Name:	2014-10-07_16h43_48.png 
Views:	319 
Size:	52.2 KB 
ID:	6391

    4.5) Next your personal user account. Click User Creation:

    Click image for larger version. 

Name:	2014-10-07_16h44_53.png 
Views:	302 
Size:	72.9 KB 
ID:	6392

    4.6) Enter your preferred credentials, do not forget to make your account administrator (highlighted), click Done when ready:

    Click image for larger version. 

Name:	2014-10-07_21h59_31.png 
Views:	354 
Size:	75.8 KB 
ID:	6393


    4.7) Now just wait installation to complete. It can take some time, installing now to get screenshots for this tutorial it took over half an hour on quite a powerful host computer, mostly because all the packages I selected to install (Part Three Step 3.8). When installation is done click Reboot:

    Click image for larger version. 

Name:	2014-10-07_17h35_50.png 
Views:	357 
Size:	185.3 KB 
ID:	6396

    4.8) After the reboot you have to accept the EULA. Click License Information:

    Name:  2014-10-07_17h39_16.png
Views: 18451
Size:  13.6 KB

    4.9) Accept the EULA, click Done:

    Click image for larger version. 

Name:	2014-10-07_17h40_00.png 
Views:	377 
Size:	76.9 KB 
ID:	6398

    4.10) Click Finish Configuration:

    Click image for larger version. 

Name:	2014-10-07_17h41_48.png 
Views:	390 
Size:	166.9 KB 
ID:	6399

    4.11) Kdump is a program to collect information in case of crash. It can help in analyzing crashes but requires some of system memory. I recommend enabling Kdump but the decision is yours. Click Forward when you made your selection:

    Click image for larger version. 

Name:	2014-10-07_17h43_06.png 
Views:	369 
Size:	239.1 KB 
ID:	6400

    4.12) When finally on desktop you don't have network connectivity. To fix this we need first to shutdown the vm:

    Click image for larger version. 

Name:	2014-10-07_23h13_48.png 
Views:	555 
Size:	553.6 KB 
ID:	6401

    4.13) Wait until the shutdown progress indicator is all green and shutdown succeeded, then open vm settings from File > Settings:

    Name:  2014-10-07_23h25_15.png
Views: 18398
Size:  26.7 KB



    Hyper-V VM - Install CentOS Linux in Windows 10 Part Five Hyper-V VM - Install CentOS Linux in Windows 10
    Configure network access

    5.1) In vm settings, select the Legacy Network Adapter we set up in Part Two and click Remove:

    Name:  2014-10-07_23h42_16.png
Views: 3625
Size:  63.6 KB

    5.2) Select Add Hardware > Network Adapter (not the Legacy adapter we used earlier!), click Add:

    Name:  2014-10-07_23h43_04.png
Views: 3998
Size:  62.1 KB

    5.3) Select the Network Adapter you just added, connect it to an existing external switch (see Hyper-V tutorial Part Three), click OK to save the settings:

    Name:  2014-10-07_23h44_07.png
Views: 3667
Size:  90.3 KB




    Hyper-V VM - Install CentOS Linux in Windows 10 Part Six Hyper-V VM - Install CentOS Linux in Windows 10
    Enjoy!


    Boot the vm, enjoy your newly installed CentOS Linux .

    Click image for larger version. 

Name:	2014-10-07_23h36_14.png 
Views:	449 
Size:	371.5 KB 
ID:	6404


    If you have any questions do not hesitate to post them in this thread.

    Kari



  1. Posts : 804
    10 Pro Preview x64
       23 Oct 2014 #1

    Nice tutorial. Note that if you want to change the screen resolution use this (changing the resolution to what you want).

    Code:
    grubby --update-kernel=ALL --args="video=hyperv_fb:1440x900"
    It is maintained when kernel is updated too and also works in CentOS 7 minimal (version with no GUI).
      My ComputerSystem Spec


  2. Posts : 14,998
    Microsoft Windows 10 Pro 64-bit 14393, Windows 10 Insider Fast Ring, Windows 8.1 Update, Ubuntu
       24 Dec 2015 #2

    @Kari I have it up and running
    Click image for larger version. 

Name:	Image 004.png 
Views:	564 
Size:	618.3 KB 
ID:	55150
    The installation is a tiny bit more involved than Ubuntu or Windows, but, your tutorial brought me through unscathed
    I'm letting it update first now, then I will sync Firefox to get my add-ons and settings set for that, then I'll explore the OS a bit. I chose the Gnome desktop as I like it better personally. I like how I can also choose which packages for a desktop to install or not install, to keep space reduced to just what I need(for example I won't need office stuff)
    Only problem I have is I cannot find a way for Restricted Extras(they're codecs as in Ubuntu Restricted Extras, as flash won't play and some other codecs, be they web or music & video).
      My ComputersSystem Spec


  3. Posts : 11,254
    Windows 10 Pro
    Thread Starter
       24 Dec 2015 #3

    Cliff, I thought that CentOS vm supports the enhanced mode because it also supports the generation 2 (UEFI) mode, but apparently I was wrong. It looks that the only way to get audio is to connect to your CentOS vm remotely.
      My ComputerSystem Spec


  4. Posts : 14,998
    Microsoft Windows 10 Pro 64-bit 14393, Windows 10 Insider Fast Ring, Windows 8.1 Update, Ubuntu
       24 Dec 2015 #4

    ´Codecs are a problem too (for surfing) Debian OSs have "Restricted Extras" I can download through their package manager or using Synaptic and I can install them as needed. They are the codecs like Mp3 flashplayer and so on, CentOS is RedHat based and I have no experience with it... yet, Looks like a learning curve ahead for me, good for the brain matter
      My ComputersSystem Spec


  5. Posts : 14,998
    Microsoft Windows 10 Pro 64-bit 14393, Windows 10 Insider Fast Ring, Windows 8.1 Update, Ubuntu
       24 Dec 2015 #5

    Hey Kari, something interesting I just found:
    at least some failures from the guest OS are given in Event Viewer!
    Click image for larger version. 

Name:	Image 001.png 
Views:	329 
Size:	88.2 KB 
ID:	55171
      My ComputersSystem Spec


  6. Posts : 11,254
    Windows 10 Pro
    Thread Starter
       24 Dec 2015 #6

    Yeah, CentOS and Red Hat are quite well integrated in Windows Hyper-V.
      My ComputerSystem Spec

  7.    16 Feb 2016 #7

    I am getting below attached error Centos 7 on Hyper-v windows 8.1 pro


    Kari said: View Post
    Yeah, CentOS and Red Hat are quite well integrated in Windows Hyper-V.
    I am getting below error after cross grub menu:

    tsc: tsc Fast tsc calibration failed
    PCI:Fatal No config space access function found
    No controller found

    How can I fıx them ?

    Regards
    Sibel
      My ComputerSystem Spec


 

Related Threads
deleted - updated in another thread
Hi there Trying to install programs while connected via RDP (the normal way of accessing your HYPER-V VM remotely). Cannot install programs. This seems a bit daft - I can't always be at the console of the HOST machine - I usually access VM's...
Hi there I can't install HYPER-V properly on a W10 HOST -- gets message about something in BIOS not enabled. Installs fine on W8.1 . On W10 the boxes are greyed out. Cheers jimbo
Hi there Cannot see any option on HYPER-V to INSTALL an OS ????!!. The management and configuration screens come up but HOW do I install the OS and Start the VM !!! Using WINDOWS 10 as HOST. Cheers jimbo
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 00:44.
Find Us