Hyper-V Cloud Node Configuration
Introduction to Hyper-V 2012 R2 plugin
The Hyper-V 2012 R2 plugin is not compatible with previous versions of Hyper-V. This means that you cannot use it with Hyper-V 2008 and 2012 R1. You must not have any hypervisors of these previous versions registered in Abiquo when you install the plugin.
Hyper-V 2012 R2 important notes
Support for Hyper-V CSV in Abiquo 3.6 and above
Abiquo 3.6 introduced support for Hyper-V clustered shared volumes (CSV). Datastores with CSV enabled can be detected by Abiquo. And users can deploy in these datstores. Abiquo will detect movements between physical machines in a Failover Cluster. And Abiquo can discover virtual machines that are deployed on clustered shared volumes.
Administrators cannot configure failover clusters within Abiquo. In addition they cannot manage failover clusters, for example, they cannot remove a VM from a cluster. Abiquo High Availability is not compatible with CSV enabled datastores.
This section explains how to configure Hyper-V for use with Abiquo.
The basic steps for Hyper-V configuration are:
- Configure Registry
- Add the Hyper-V to a Windows domain
- Run the powershell as the domain admin
- Enable remote desktop (optional)
- Configure Network
- Configure firewall to allow incoming connections
- Create vSwitch in Hyper-V Manager
- Configure Storage
- Enable iSCSI
- Change initiator IQN
- Mount shared datastore (samba)
This configuration requires registry modifications.
Hyper-V configuration steps for management through DCOM
Abiquo uses the WMI API, through J-Interop and JWbem libraries.
See http://sourceforge.net/p/j-interop/code/138/tree/trunk/j-interop/src/readme.htm
Therefore, you will need to make the registry modifications described below to enable remote management and monitoring of Hyper-V.
Add Hyper-V to a Windows Domain
Add the Hyper-V server to a Windows Domain.
Automatically Edit the Registry
Download the powershell script in the attached file change_registry.ps1
Log in as the domain admin. Use the fully qualified domain name, e.g. MY-DOMAIN\administrator
Run the powershell script.
This script will set the owner of the following registry keys to be changed to the user who runs the script.
The manual process to change domain owner and edit registry keys is described in Hyper-V Configuration
Registry Changes
These registry changes are included in the attached file hypervconfig.reg.
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\AppID\{76A64158-CB41-11D1-8B02-00600806D9B6}] "DllSurrogate"="" [HKEY_CLASSES_ROOT\CLSID\{76A64158-CB41-11D1-8B02-00600806D9B6}] @="WBEM Scripting Locator" "AppID"="{76a64158-cb41-11d1-8b02-00600806d9b6}" [HKEY_CLASSES_ROOT\CLSID\{76A64158-CB41-11D1-8B02-00600806D9B6}\InProcServer32] @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\ 00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,77,00,62,00,\ 65,00,6d,00,5c,00,77,00,62,00,65,00,6d,00,64,00,69,00,73,00,70,00,2e,00,64,\ 00,6c,00,6c,00,00,00 "ThreadingModel"="Both" [HKEY_CLASSES_ROOT\CLSID\{76A64158-CB41-11D1-8B02-00600806D9B6}\ProgID] @="WbemScripting.SWbemLocator.1" [HKEY_CLASSES_ROOT\CLSID\{76A64158-CB41-11D1-8B02-00600806D9B6}\Programmable] [HKEY_CLASSES_ROOT\CLSID\{76A64158-CB41-11D1-8B02-00600806D9B6}\TypeLib] @="{565783C6-CB41-11D1-8B02-00600806D9B6}" [HKEY_CLASSES_ROOT\CLSID\{76A64158-CB41-11D1-8B02-00600806D9B6}\Version] @="1.0" [HKEY_CLASSES_ROOT\CLSID\{76A64158-CB41-11D1-8B02-00600806D9B6}\VersionIndependentProgID] @="WbemScripting.SWbemLocator"
Configure Network for Hyper-V
Configure the network in Hyper-V Manager by checking the MAC addressing and add a new network attached to the service network interface.
Configure VLANs
To allow Abiquo to manage VLANs in this Hyper-V server, add a new network attached to the service network interface. The network name should use appropriate characters and can be chosen by the network administrator.
In Hyper-V Manager, go to Virtual Switch Manager -> New virtual network switch. Use the default options with 'External' type
Configure Persistent iSCSI Storage
This section describes how to configure persistent iSCSI storage.
Disk Management is in Win8MetroUI + Settings + "Create and format hard disk partitions"
Install iSCSI Service
The first thing you need to do is enable the iSCSI service and set it to start automatically:
C:\Users\Administrator> sc config msiscsi start= auto ChangeServiceConfig SUCCESS C:\Users\Administrator> net start msiscsi The Microsoft iSCSI Initiator Service service is starting. The Microsoft iSCSI Initiator Service service was started successfully.
Manually Set Initiator IQN
iSCSI Configuration
Run iscsicpl to open the iSCSI configuration popup on a Core installation
Once the iSCSI service is enabled, you must manually set the initiator IQN for the machine. To do this, go to Start > Administrative tools > iSCSI Initiator, and select the Configuration tab. Click the Change button. The following dialog appears:
You can accept the default value. You MUST do these steps manually even if the value of the initiator IQN field does not change. If this is not done manually, the initiator IQN will be dynamically computed based on the host and domain name, and may change without any warning, making the external storage volumes inaccessible.
iSCSI Firewall Rule
See Configure Firewall below to set the iSCSI firewall rules via netsh.
SAN Policy Configuration
Open a command line and run the following commands to set the appropriate SAN Policy:
diskpart san policy=OfflineAll exit
Configure Firewall for Abiquo and Hyper-V
For information about configuring Windows Firewall, please contact Abiquo Support.
Check Abiquo Configuration Properties File and Samba Service
Open an SSH session to the Abiquo server and check the following items:
Samba Server
- Is the SAMBA server up and running?
Start the service with the following command.
/etc/init.d/smb start
- Samba server must be started at boot
chkconfig smb on
Abiquo Configuration Properties
Set the maximum number of open virtual factory sessions to 1.
Abiquo cannot make multiple concurrent connections to Windows-based machines.
The Abiquo Configuration Property "abiquo.virtualfactory.openSession" must be set to 1 to enable the Hyper-V plugin to work correctly.
abiquo.virtualfactory.openSession = 1
Check the SMB path in the config file /opt/abiquo/config/abiquo.properties
abiquo.appliancemanager.localRepositoryPath = /opt/vm_repository/ abiquo.appliancemanager.repositoryLocation = 192.168.1.10:/opt/vm_repository abiquo.virtualfactory.hyperv.repositoryLocation = //<SERVER_IP>/vm_repository abiquo.virtualfactory.xenserver.repositoryLocation = 192.168.1.10:/opt/vm_repository abiquo.virtualfactory.vmware.repositoryLocation = 192.168.1.10:/opt/vm_repository
Restart the Abiquo Tomcat server
/etc/init.d/abiquo-tomcat restart
Hyper-V in the Abiquo Platform
This page describes aspects of Hyper-V in the Abiquo platform
Remote Access
There are two options for remote access to Hyper-V virtual machines on the Abiquo platform.
FreeRDP Proxy
You can Configure FreeRDP for Hyper-V to set up remote access through the eye icon.
Default Configuration
Without this configuration, by default, in Hyper-V 2012, there is no VNC/RDP access through the eye icon. Abiquo provides RDP connection details for VMs. Users will require access to the hypervisor to connect to VMs.
Abiquo recommends xfreerdp. When you click the eye icon, Abiquo opens a popup displaying the connection details in xfreerdp format.
xfreerdp /d:my.domain.com /u:Administrator /p:abiqu0! /vmconnect:27b6f5f6-7c83-447c-83c3-b4093dc16f14 /v:10.60.10.230
Best Practices
Datastores
Abiquo will allow you to configure a system drive as the datastore. However, this is not recommended because of disk latency or potential disk space problems. You can use a local datastore or an SMB share.
Linux Guests
Linux Integration Services are required for disk controller detection.
Prepare to Add a Hyper-V Hypervisor to Abiquo
Create a virtual switch for use by Hyper-V before you add it to Abiquo, for example, using Hyper-V Manager.
Create a Network Service Type in Abiquo before you add the hypervisor.
Adding Hyper-V to the Abiquo GUI
Create a physical machine with a hypervisor type of Hyper-V.
General Information
Enter the User name. It can be an Active Directory login or local user.
Use an Administrator account.
Network Interfaces
Select the network service type for your virtual switch.
Datastore
The datastore must be a mapped drive.
A datastore can be:
- local datastore (e.g. D:\)
- Abiquo recommends that you do not use C:\
- SMB share (e.g. X: which has the share \\SMB_SERVER\sharefolder mounted)
- this configuration is suitable for a shared datastore
When Abiquo is retrieving the details of the hypervisor, it will ignore volumes with a drive letter but no capacity (for example, recovery volumes).