User Guide for configuration of IPM and XenCenter Revision History Revision Description By 22 nd June 2011 Created Amita 23 rd June 2011 Updated as per comments from Prashant 3 rd Aug 2011 Updated as per the comments from Vageesha after the validation of Xen Advanced Feature done. Amita Amita Configuration Guide XenCenter & IPM
Contents 1 Introduction...3 2 Intelligent Power Plug-in for XenCenter...4 2.1 Prerequisites...4 2.2 Using Eaton IPM XenCenter Plugin...4 2.3 Using IPM with XenCenter...5 3 Power Event in XenCenter...7 3.1 Introduction...7 3.2 Download the Script...7 3.3 Configure the Web Interface...7 3.4 Test the configuration...10 4 Xen Maintenance Mode on Power Event...12 4.1 Concept of maintenance mode...12 4.2 Configuration...12 4.2.1 Prerequisites...12 4.2.2 Configuring XenCenter and IPM for maintenance mode...12 4.2.3 Configuration of the Scripts maintenancemode.js...14 4.2.4 Test of the configuration...15 5 References...16 Eaton and Virtualization...16 Citrix XenServer SDK for Powershell...16 Citrix XenServer and XenCenter...16 Intelligent Power Manager (Eaton Power Supervisor)...16 6 Appendix...17 Configuration Guide-XenCenter & IPM Page 2/20
1 Introduction Eaton s Intelligent Power Manager discovers and supervises Eaton s UPSs and epdus connected to the network (either by means of a card/proxy).it also provides local computer graceful shutdown. Citrix s XenCenter platform forms the foundation for virtualization management. Citrix XenCenter is the Windows-native graphical user interface for managing Citrix XenServer hosts. Our objective is to provide a virtualization support for Eaton s power protection software Intelligent Power Manager and adding the Xen advanced features like maintenance mode, Power events in IPM. Purpose of this document is to guide user to configure IPM with Xen virtualized environment. Following are the Xen advanced features in IPM: 1. Intelligent Power Plug-in for XenCenter 2. Power Event in XenCenter 3. Xen Maintenance Mode on Power Event Configuration Guide XenCenter & IPM Page 3/20
2 Intelligent Power Plug-in for XenCenter Intelligent Power Plug-in XenCenter, a utility developed by Eaton, is a very easy to use and deploy Plug-in to manage IPM from XenCenter. This plug-in provides the facility to integrate Intelligent Power Manager (IPM) with XenCenter environment. Once the plug-in is deployed, a tab in XenCenter will open IPM and allow users to configure and manage IPM from XenCenter environment. 2.1 Prerequisites Following are the prerequisites for Intelligent Power Plug-in XenCenter: 1. Citrix s XenCenter installed on physical windows server. 2. IPM installed on any machine in the same network 3. XenServer powershell SDK. (Power shell Snap-In) 4. Domain knowledge of XenServer Infrastructure 2.2 Using Eaton IPM XenCenter Plugin 1. Download the EatonXenPackage from Eaton website 2. Extract zip file to some location 3. Go to folder where files are extracted 4. Double click on InstallXenPlugin.exe, following window will be displayed. Field Information IPM Hostname/IP Address Host name or IP address of the machine where IPM is installed. After entering the field, click on one of the following button. 1. Create Creates (Registers) Plug-in in XenCenter. IPM tab will get added in XenCenter console. 2. Delete Uninstalls(Unregisters) Plug-in in XenCenter. XenCenter needs to be restarted and plugin needs to be rescanned to take an effect. 3. Exit It exits from the InstallXenPlugin application. To check Intelligent Power Plug-in in installed properly in XenCenter 1. Open XenCenter and click Tools->Plug-ins 2. Click Re-Scan Plug-in Directory if you are not able to see Eaton IPM Plug-in in List as shown in below snap-shot Configuration Guide XenCenter & IPM Page 4/20
2.3 Using IPM with XenCenter The Intelligent Power Manager tab will now be visible in the XenCenter Console (and in the root folder). IPM is now available and is fully functional with the XenCenter.To learn more about the features and usage of IPM, please consult the IPM User Manual. The IPM screen is shown below, note the Intelligent Power Manager tab on the top is selected. Configuration Guide XenCenter & IPM Page 5/20
Configuration Guide XenCenter & IPM Page 6/20
3 Power Event in XenCenter 3.1 Introduction The purpose of this task is to forward the power events generated through IPM in XenCenter and integrate alerts. The following are prerequisites: 1. Citrix XenCenter, Citrix XenServer host, XenServer SDK for Powershell. 2. IPM is installed on the machine on which XenCenter is installed. 3. Eaton Software & Scripts Package 4. Security certificate (root certificate) installed on XenCenter machine for every XenServer host. For more information refer appendix A. 5. The server hosting IPM must enable the execution of third party scripts on the local machine (minimum access Remote Signed ) (examples: Set-ExecutionPolicy RemoteSigned 3.2 Download the Script Extract the EatonXenPackage on the IPM machine and copy the script CreateEvent.ps1 in the root folder of IPM. Example: C:\Program Files\EATON\IntelligentPowerManager 3.3 Configure the Web Interface Connect to the Web Interface of IPM https://127.0.0.1:4679/ (or through Eaton's Plug-in) and go to the view Action on your left. Configuration Guide XenCenter & IPM Page 7/20
Click on Create new action on your right Configure the new action with the good parameters Event criticalities: Event categories: Configuration Guide XenCenter & IPM Page 8/20
Action Type: Configure the command line: powershell.\createevent.ps1 server $IPAddress -UserName $Username -Password $Password -msg "Alert from IPM {hostname} - {object} = {value} {message}" Parameters: $IPAddress: IP Address Master XenServer in the resource pool. $Username: Username of master XenServer $Password: Password of master XenServer Message : Must be between double quotes; a few parameters like {object} {nodename} can be used after msg. See screen shot below: Configuration Guide XenCenter & IPM Page 9/20
3.4 Test the configuration Select the new action that you have created and click on Test selected action Configuration Guide XenCenter & IPM Page 10/20
Data on alarms and alerts from Intelligent Power manager is added to System Alerts tab in XenCenter. Configuration Guide XenCenter & IPM Page 11/20
4 Xen Maintenance Mode on Power Event 4.1 Concept of maintenance mode In XenCenter, you can take a server offline temporarily by placing it into Maintenance Mode. When a server in a resource pool is placed into Maintenance Mode, all running VMs will be automatically migrated from it to another server in the same pool. If the server is the pool master, a new master will also be selected for the pool. Eaton uses the same virtual machine migration capability through Citrix s XenMotion when a UPS is in a critical power situation to move virtual machines off of a server that has a critical power situation. Intelligent Power Manager will now write alarms/alerts into XenCenter, which, in turn, will trigger XenMotion 4.2 Configuration 4.2.1 Prerequisites 1. Citrix XenCenter installed with a resource pool having at least 2 XenServer hosts with guest operating system installed.xenserver tools should be installed on every guest operating system to enable XenMotion Feature. 2. All the guest operating systems should reside in shared iscsi storage. 3. A security certificate (root certificate) should be installed on XenCenter for every XenServer. 4. The server hosting IPM must enable the execution of third party scripts on the local machine (minimum access Remote Signed ) (examples: Set-ExecutionPolicy RemoteSigned) 4.2.2 Configuring XenCenter and IPM for maintenance mode 1. Install the IPM on one of the machines in the subnet 2. Install XenServer SDK for Powershell on the machine where IPM is installed. Configuration Guide XenCenter & IPM Page 12/20
3. Extract the Eaton package on the machine where IPM is installed. 4. Copy the file CreateEvent.ps1 and MaintenanceMode.ps1 into the root folder of IPM. For example: C:\Program Files\EATON\IntelligentPowerManager 5. Copy the java script file MaintenanceMode.js into the folder IntelligentPowerManager\configs\scripts\ 6. Edit the javascript file, and change all the variables corresponding to the environment as described in section 4.2.3 below. 7. Restart the IPM service Configuration Guide XenCenter & IPM Page 13/20
4.2.3 Configuration of the Scripts maintenancemode.js //Information about Master XenServer var server= IP or Hostname of master XenServer ; //IP or Name of Master XenServer var username="root"; //Username of Master XenServer var password="eaton01"; //Password of Master XenServer //From here provide the information about XenServer that needs to be //put in Maintenance mode along with UPS information // Here we can configured N number of XenServer hosts and UPS // Following XenServer host must present in XenCenter and must be a part of resource pool. //--------------------START SETUP 1 ------------------------------ //--------------------HOST1/UPS 1 ------------------------------ //Information about XenServer host and its corresponding UPS (XenServer Host and Server 1) var host1= IP or Hostname of 1st XenServer host ; // the name of the host in XenCenter (IP or Name) var statusups1 = UserFunctions.getNodeData("166.99.170.147");//Name of the Node in IPM (IP,DNSName or other) //The UPS1 link to the Host1 //if the status of the UPS1 is on Battery, the Host1 enter in maintenance mode if(statusups1 && statusups1["ups.powersummary.presentstatus.acpresent"]!= 1 ) { UserFunctions.exec("powershell./MaintenanceMode.ps1 -MasterServer "+server+" -UserName "+username+" -Password "+password+" -host1 "+host1+" -IsStartMaintenance 1"); } //if the status of the UPS1 is on the sector, the Host1 exit the maintenance mode else if(statusups1["ups.powersummary.presentstatus.acpresent"] == 1) { UserFunctions.exec("powershell./MaintenanceMode.ps1 -MasterServer "+server+" -UserName "+username+" -Password "+password+" -host1 "+host1+" -IsStartMaintenance 0"); } //--------------------END SETUP1 ------------------------------ //--------------------START SETUP 2 ------------------------------ //--------------------HOST2/UPS 2 ------------------------------ var host2="ip or Hostname of 2nd XenServer host"; var statusups2 = UserFunctions.getNodeData("IP or hostname of UPS or Node Name in IPM that is powering host2"); //The UPS2 link to the Host2 if(statusups2 && statusups2["ups.powersummary.presentstatus.acpresent"]!= 1 ) { UserFunctions.exec("powershell./MaintenanceMode.ps1 -MasterServer "+server+" -UserName "+username+" -Password "+password+" -host2 "+host2+" -IsStartMaintenance 1"); } else if(statusups2["ups.powersummary.presentstatus.acpresent"] == 1) { UserFunctions.exec("powershell./MaintenanceMode.ps1 -MasterServer "+server+" -UserName "+username+" -Password "+password+" -host2 "+host2+" -IsStartMaintenance 0"); } //--------------------END SETUP2 ------------------------------ //... //... //... //--------------------START SETUP N ------------------------------ //--------------------HOST N/UPS N ------------------------------ var hostx="ip or Hostname of n-th XenServer host"; Configuration Guide XenCenter & IPM Page 14/20
var statusupsx = UserFunctions.getNodeData("IP or hostname of UPS or Node Name in IPM that is powering host n"); //The UPSx link to the Hostx if(statusupsx && statusupsx["ups.powersummary.presentstatus.acpresent"]!= 1 ) { UserFunctions.exec("powershell./MaintenanceMode.ps1 -MasterServer "+server+" -UserName "+username+" -Password "+password+" -hostx "+hostx+" -IsStartMaintenance 1"); } else if(statusupsx["ups.powersummary.presentstatus.acpresent"] == 1) { UserFunctions.exec("powershell./MaintenanceMode.ps1 -MasterServer "+server+" -UserName "+username+" -Password "+password+" -hostx "+hostx+" -IsStartMaintenance 0"); } //--------------------END SETUPN ------------------------------ 4.2.4 Test of the configuration To test the installation, perform a power failure on the UPS and see if the corresponding XenServer host goes in Maintenance mode. Besides, removing from the UPS, the user can initiate a utility failure test from the website of the network management card. To get to the Network management card website, type in the IP address of the network management card. Configuration Guide XenCenter & IPM Page 15/20
5 References Eaton and Virtualization Please visit http://www.eaton.com/virtualization Citrix XenServer SDK for Powershell Please visit http://community.citrix.com/display/xs/download+sdks for more information about installation and download of Powershell SDK. Please http://tinyurl.com/6yx9rg6 for all power shell sdk commands. Citrix XenServer and XenCenter Please visit http://www.citrix.com/english/ps2/products/product.asp?contentid=683148 for more information about download and installation of XenServer and XenCenter Intelligent Power Manager (Eaton Power Supervisor) Please visit http://download.mgeops.com/ for more information about download and installation of IPM Configuration Guide XenCenter & IPM Page 16/20
6 Appendix A. Installation of SSL Cerificate for XenServer While using Xen features like power events, maintenance mode, user may face problems related to SSL certificate. Since, for every XenServer, there is a SSL certificate associated with it; user has to install these certificates in trusted store. Following are the steps to install the SSL certificate. Following steps are applicable to Internet Explorer. These steps may vary according to Web Browsers. 1. In web browser, enter the hostname/ip address of XenServer for which you want to install SSL certificate. The SSL certificate is as shown below. Configuration Guide XenCenter & IPM Page 17/20
2. To install SSL certificate, click on The Certificate error tab shown on the right side of the address bar. 3. Click on View Certificates to view it as shown below. Configuration Guide XenCenter & IPM Page 18/20
4. Click on Install certificate to install it and then Certificate Import Wizard will be displayed. Click on Place all certificates in the following store. Click Browse and select Trusted Root Certification Authorities->Local Computer as shown in the figure below. Configuration Guide XenCenter & IPM Page 19/20
To view the installed certificate, click start-> run. Enter certmgr.msc. The following window will be displayed. In the Trusted Root Certification Authorities->Certificates,all the installed SSL certificates will be stored. Same steps are followed for installing SSL certificates for all the XenServers. These steps are to be followed on the windows machine on which XenCenter is installed and a given XenServer should be added in server list of XenCenter.. Configuration Guide XenCenter & IPM Page 20/20