Install CentOS Linux on Hyper-V Virtual Machine

In this article I’ve described steps to install CentOS Linux Hyper-V VM.

If you have other Linux distributive, make sure it’s fully compliant with Hyper-V:

  1. Download minimal ISO from CentOS website. In our case we use minimal CentOS 7 ISO – If you are using Virtual Machines Manager, you have to download and import ISO to VMM Library first.
  2. Create desired VM hardware configuration. For example, 2 vcpu, 2GB RAM, 50GB HDD. Save the configuration.
  3. Attach CentOS ISO to VM, then start VM.
  4. Linux will load automatically, if you don’t have any specific requirements accept default disk partitioning, set time zone, root password and hostname.
  5. Wait till all packages will be installed and reboot newly installed server.
  6. On next step you have to download and install Linux Integration Services. You need to have this part of OS installed to fully integrate VM into Hyper-V infrastructure. You can easily find and download latest Linux Integration services (LIS) ISO by searching it on Microsoft Downloads.
  7. Dismount CentOS ISO and attach LIS ISO.
  8. In Linux console type this command: “mount /dev/cdrom /media
  9. Switch to “media” folder typing this command: “cd /media
  10. Type the command “./” to start installation of LIS. After completion reboot server.
  11. If you need to configure IP stack, run “nmtui” tool from terminal.
  12. Restart network with command “systemctl restart network“. Check the status of interfaces with the commands “ifconfig” or “ip addr“.
  13. Update packages to the latest version by typing the command “yum update”. Restart the server.
  14. Linux Hyper-V VM is ready to use!

You may also like

Leave a Reply

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

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