Install Host Hyper-V in Apache CloudStack 

Install Host HyperV in Apache CloudStack
This tutorial focuses on the steps to use Hyper-V hypervisor to run guest virtual machines and install Hyper-V on the hosts in Apache CloudStack.

 

Apache CloudStack is a free and open-source Infrastructure as a Service (IaaS) platform that orchestrates and manages pools of the network, storage, and other computer resources to build a private or public IaaS compute cloud. Apache CloudStack allows any IT service provider to offer public cloud services to their customers. It can also be used by companies who wish to offer hybrid and private cloud services to their users.

 

In this tutorial, we will learn the steps to use Hyper-V hypervisor to run guest virtual machines and install Hyper-V on the hosts in Apache CloudStack. This tutorial provides the Apache CloudStack specific steps required to prepare a Hyper-V host to work with Apache CloudStack.

 

System Requirements 

The system requirements to run Hyper-V Hypervisor hosts in Apache CloudStack are: 

 

Supported Operating Systems:

  • Hyper-V 2012 R2
  • Windows Server 2012 R2 Standard
  • Windows Server 2012 R2 Datacenter

 

Minimum System Requirements: 

  • 1.4 GHz 64-bit processor with hardware-assisted virtualization
  • 32 GB of disk space
  • 800 MB of RAM 
  • Gigabit (10/100/1000baseT) Ethernet adapter

 

Supported Storage:

  • Primary Storage: Server Message Block (SMB) Version 3, Local
  • Secondary Storage: SMB

 

Preparation Checklists

For the smooth installation of Hyper-V Hypervisor hosts in Apache CloudStack, gather the following details before starting: 

  

Hyper-V RequirementsValueDescription
Server RolesHyper-VAfter the Windows Server 2012 R2 installation, make sure that Hyper-V is selected from Server Roles.
Domain and HostHosts should be part of the same Active Directory domain.
Share LocationNew folder in the /Share directoryMake sure that the folders are created for both Secondary and Primary storage. The Server Message Block (SMB) share and the hosts should be part of the same domain.

If the users use Windows SMB share, the file share location for the Hyper-V deployment should be in the new folder created in \Shares on the selected volume. Users can create sub-folders for both PRODUCT Primary and Secondary storage within the share location. When the user chooses the profile to the file shares, they should select SMB Share -Applications. This creates the file shares with settings appropriate for Hyper-V.

Hyper-V UsersFull ControlFull control on the SMB file share.
Virtual SwitchIf the users are using Hyper-V 2012 R2, manually create an external virtual switch before adding the host to the PRODUCT. If the Hyper-V host is added to the Hyper-V manager, choose the host, click Virtual Switch Manager, and then New Virtual Switch. In the External Network, choose the desired NIC adapter and finally click the Apply button.

If users are using Windows 2012 R2, the virtual switch is created automatically.

Virtual Switch NameMake a note of the virtual switch name. Users need to specify that when configuring PRODUCT physical network labels.
Hyper-V Domain Usersl  Add the Hyper-V domain users into the Hyper-V Administrators group.

l  A domain user should have complete control of the SMB share exported for both secondary and primary storage.

l  This domain user should be part of the Local Administrators group and Hyper-V Administrators on the Hyper-V hosts that are to be managed by the PRODUCT.

l  The Hyper-V Agent service runs with the domain credentials of this user account.

l  Specify the domain user credential while adding a host to the PRODUCT to manage it.

l  Specify the domain user credential while adding a shared SMB secondary or primary storage.

MigrationMigrationEnable migration
MigrationDelegationIf the users want to use Live Migration, enable Delegation. Enable the following services of other hosts participating in Live Migration: Microsoft Virtual System Migration Service and CIFS.
MigrationKerberosEnable Kerberos for live migration.
Network Access Permission for Dial-inAllow accessAllow access for Dial-in connections.

 

Steps to Install Hyper-V

To install Hyper-V, follow the below steps: 

  • Download the operating system and install it on the host.
  • Post-installation, ensure that the user enables Hyper-V role in the server.
  • If no Active Directory domain exists in the user deployment, create one and add users to the domain.
  • In the Active Directory domain, make sure that all the Hyper-v hosts are added so that all the hosts are part of the domain.
  • Add the domain user to the following groups on the Hyper-V host: Local Administrators and Hyper-V Administrators.

 

 Install Apache CloudStack Agent on a Hyper-V Host 

The Hyper-V Agent helps Apache CloudStack perform operations on the Hyper-V hosts. The Hyper-V Agent communicates with the Management Server and helps to control all the instances on the host. Each Hyper-V host must have the Hyper-V Agent installed on CloudStack for successful interaction between the Apache CloudStack and host. The Hyper-V Agent will run as a Windows service. Install the Agent on each host using the following steps.

 

Apache CloudStack Management Server communicates with Hyper-V Agent by using HTTPS. For secure communication between the host and the Management Server, install a self-signed certificate on port 8250.

 

First, create a self-signed SSL certificate by executing the following command. The below command will create the self-signed certificate and add that to the certificate store LocalSystem\My.

 

# New-SelfSignedCertificate -DnsName apachecloudstack -CertStoreLocation Cert:\LocalSystem\My

 

Then, add the created certificate to port 8250 for HTTPS communication by executing the following command. 

 

netsh http add sslcert ipport=0.0.0.0:8250 certhash=<thumbprint> appid="{727beb1c-6e7c-49b2-8fbd-f03dbe481b08}"

 

>> Note: Thumbprint is the thumbprint of the certificate users created.

 

  • Next, build the Apache CloudStack Agent for Hyper-V.
  • Then, run the installer as an administrator user. 
  • Finally, provide the Hyper-V admin credentials when prompted. When the Agent installation is completed, the agent will run as a service on the host machine.

 

Physical Network Configuration for Hyper-V 

Users should plan how the hosts will be cabled and which physical NICs will carry what types of traffic. By default, Apache CloudStack will utilize the device that is used by the default route.

 

If the users are using Hyper-V 2012 R2, manually create an external virtual switch before adding the host to the Apache CloudStack. If the user wants to add Hyper-V host to the Hyper-V manager, select the host, click Virtual Switch Manager, and then New Virtual Switch. In the External Network, select the desired NIC adapter and finally click the Apply button.

 

If the users are using Windows 2012 R2, the virtual switch is created automatically.

 

(Optional) Storage Preparation for Hyper-V

Apache CloudStack allows administrators to set up shared Secondary and Primary Storage that uses SMB. For the same, follow the below steps: 

1. Create an SMB storage and expose it over SMB Version 3. Users can also create and export SMB shares using Windows. After installing the Windows Server 2012 R2, select the File and Storage Services from Server Roles to create an SMB file share.

2. Add the Server Message Block (SMB) share to the Active Directory domain. The hosts and the SMB share managed by Apache CloudStack need to be in the same domain. However, the storage can be accessed from the Management Server with domain user privileges.

3. While adding storage to Apache CloudStack, ensure that the correct domain and credentials are provided. This user should be able to access the storage from the Management Server.

 

Conclusion 

This tutorial presents the steps to use Hyper-V hypervisor to run guest virtual machines and install Hyper-V on the hosts in Apache CloudStack. Hope this tutorial was helpful, and do reach out to us if you have any query or suggestions.

Share this post

Share on facebook
Share on linkedin
Share on twitter
Share on whatsapp

Services to Explore

Stay up to date!

Stay up to date with the Web Hosting, Cloud and Server Management Industry News and Tutorials!

We will send you only the relevant emails, and we respect your privacy. Please review our privacy policy for more info.

Apache CloudStack Management

Focus on your business, and let us take care of your Apache CloudStack!
From what you are reading, it seems you are interested in Apache CloudStack and related technologies. If you have a moment to spare, please take a look at our Apache CloudStack Management plan, which might interest you even more!
Apache CloudStack Management

Value-Added Services

We have services that can help you run a successful business. With us, you don't have to worry about these areas because our experts will take care of it for you.

ServerHealers uses cookies.