If you want to use Hyper-V hypervisor to run guest virtual machines,
install Hyper-V on the hosts in your cloud. The instructions in this
section doesn’t duplicate Hyper-V Installation documentation. It
provides the CloudStack-specific steps that are needed to prepare a
Hyper-V host to work with CloudStack.

For a smoother installation, gather the following information before you
start:

Hyper-V
Requiremen
ts

Value

Description

Server
Roles

Hyper-V

After the Windows Server 2012 R2 installation,
ensure that Hyper-V is selected from Server Roles.
For more information, see Installing
Hyper-V.

Share
Location

New
folders
in the
/Share
director
y

Ensure that folders are created for Primary and
Secondary storage. The SMB share and the hosts
should be part of the same domain.

If you are using Windows SMB share, the location of
the file share for the Hyper-V deployment will be
the new folder created in the \Shares on the
selected volume. You can create sub-folders for both
PRODUCT Primary and Secondary storage within the
share location. When you select the profile for the
file shares, ensure that you select SMB Share
-Applications. This creates the file shares with
settings appropriate for Hyper-V.

Domain and
Hosts

Hosts should be part of the same Active Directory
domain.

Hyper-V
Users

Full
control

Full control on the SMB file share.

Virtual
Switch

If you are using Hyper-V 2012 R2, manually create an
external virtual switch before adding the host to
PRODUCT. If the Hyper-V host is added to the Hyper-V
manager, select the host, then click Virtual Switch
Manager, then New Virtual Switch. In the External
Network, select the desired NIC adapter and click
Apply.

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

Virtual
Switch
Name

Take a note of the name of the virtual switch. You
need to specify that when configuring PRODUCT
physical network labels.

Hyper-V
Domain
Users

Add the Hyper-V domain users to the Hyper-V
Administrators group.

A domain user should have full control on the SMB
share that is exported for primary and secondary
storage.

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

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

Specify the credential of the domain user while
adding a host to PRODUCT so that it can manage
it.

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

Migration

Migratio
n

Enable Migration.

Migration

Delegati
on

If you want to use Live Migration, enable
Delegation. Enable the following services of other
hosts participating in Live Migration: CIFS and
Microsoft Virtual System Migration Service.

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

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

Note

The Agent installer automatically perform this operation. You have not
selected this option during the Agent installation, it can also be done
manually as given in step 1.

You should have a plan for how the hosts will be cabled and which
physical NICs will carry what types of traffic. By default, CloudStack
will use the device that is used for the default route.

If you are using Hyper-V 2012 R2, manually create an external virtual
switch before adding the host to CloudStack. If the Hyper-V host is
added to the Hyper-V manager, select the host, then click Virtual Switch
Manager, then New Virtual Switch. In the External Network, select the
desired NIC adapter and click Apply.

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

You can also create and export SMB share using Windows. After the
Windows Server 2012 R2 installation, select File and Storage Services
from Server Roles to create an SMB file share. For more information,
see Creating an SMB File Share Using Server Manager.

Add the SMB share to the Active Directory domain.

The SMB share and the hosts managed by CloudStack need to be in the
same domain. However, the storage should be accessible from the
Management Server with the domain user privileges.

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