Powerchute Network Shutdown – ESXi/vMA install

image_pdfimage_print

Powerchute Network Shutdown version 3.0.0 software for ESXi is now free when you purchase a network shutdown management card from the APC website.

1. Download VMA (vSphere Management Assistant)

1. Highlight VM Host> File> Deploy OVF Template> Browse to VMA Folder and Select the OVF> Next> Accept Licence> Next> Keep Default Disk Configuration> Next> Finish

1. This will create a new VM on the host.

1. Using the VIC attach a CD Drive to the VMA Virtual Machine

1. Start the Virtual Machine

1. Follow the Wizard (Default Option is show in Brackets)

Step1) Configure IP Address, Subnet, Gateway/DHCP or Static

Step2) Configure DNS Servers/DHCP or Static

Step3) Configure Hostname for the VIMA VM ie VIMA.domainname.local

Step 4) Confirm the settings

1. The VM will now apply the settings and restart the VM Network

1. Enter a password for the vi-admin account

1. Open a terminal emulation application such as Putty and Connect to the VIMA Vm using its IP Address on port 22 (SSH)

1. Login as vi-admin, using the password you created in the previous step

1. When you are connected you will be presented with a terminal.

Enter the following string into the terminal window

Vifp addserver “name of server” or “IP Address” (name of server preferred)

1. Enter the password for the host when prompted (Vmware Host Root User Password)

1.Enter the following string into the terminal window

Vifp listservers

1. This should return the IP Address and name of the Vmware Host that you just added

1.Enter the following string into the terminal window to enable FastPass to the Host

1. Vifptarget -s “SERVERNAME – Vmhost Server”

1. To confirm the above step has worked type

Vicfg-nics –l

This should return a list of NICS

1. Install the UPS, configure the Network management card and configure your settings with the UPS Management Console (browser)

1. Insert your media into the VMHost and attach it to the VMA Virtual Machine (ie CD)

1. Connect to the VMA management console via Terminal Emulator

1. Login to the Management Console

1. Create a mount point : sudo mkdir /mnt/cdrom

1. Change the permissions on the mount point: sudo chmod 666 /mnt/cdrom

Type: sudo mount –t iso9660 /dev/cdrom /mnt/cdrom

Type: cd /mnt/cdrom/ESXi

Type: sudo cp /etc/vma-release /etc/vima-release

Type: sudo ./install.sh

1. Accept the licence agreement

1. Press enter to keep default PowerChute Instance

1. Press enter to keep default installation directory

1. Confirm the installation

1. This will install the Java Runtime

1. Type: CD /opt /APC/PowerChute/group1Enter

1. Type: sudo ./PCNSConfig.sh

1. Enter your root Password

1. Select your UPS Configuration Option

1. Enter the Management Card IP Address

1. Select yes at the do you want to register these settings

1. Select Yes to starting the Powerchute Network Shutdown Service

1. You will then be show a configuration

  1. Download VMA (vSphere Management Assistant)
  1. Highlight VM Host> File> Deploy OVF Template> Browse to VMA Folder and Select the OVF> Next> Accept Licence> Next> Keep Default Disk Configuration> Next> Finish
  1. This will create a new VM on the host.
  1. Using the VIC attach a CD Drive to the VMA Virtual Machine
  1. Start the Virtual Machine
  1. Follow the Wizard (Default Option is show in Brackets)

Step1) Configure IP Address, Subnet, Gateway/DHCP or Static

Step2) Configure DNS Servers/DHCP or Static

Step3) Configure Hostname for the VIMA VM ie VIMA.domainname.local

Step 4) Confirm the settings

  1. The VM will now apply the settings and restart the VM Network
  1. Enter a password for the vi-admin account
  1. Open a terminal emulation application such as Putty and Connect to the VIMA Vm using its IP Address on port 22 (SSH)
  1. Login as vi-admin, using the password you created in the previous step
  1. When you are connected you will be presented with a terminal.
  1. Enter the following string into the terminal window
    1. Vifp addserver “name of server” or “IP Address” (name of server preferred)
  1. Enter the password for the host when prompted (Vmware Host Root User Password)
  1. Enter the following string into the terminal window
    1. Vifp listservers
  1. This should return the IP Address and name of the Vmware Host that you just added
  1. Enter the following string into the terminal window to enable FastPass to the Host
    1. Vifptarget -s “SERVERNAME – Vmhost Server”
  1. To confirm the above step has worked type

Vicfg-nics –l

This should return a list of NICS

  1. Install the UPS, configure the Network management card and configure your settings with the UPS Management Console (browser)
  1. Insert your media into the VMHost and attach it to the VMA Virtual Machine (ie CD)
  1. Connect to the VMA management console via Terminal Emulator
  1. Login to the Management Console
  1. Create a mount point : sudo mkdir /mnt/cdrom
  1. Change the permissions on the mount point: sudo chmod 666 /mnt/cdrom

Type: sudo mount –t iso9660 /dev/cdrom /mnt/cdrom

Type: cd /mnt/cdrom/ESXi

Type: sudo cp /etc/vma-release /etc/vima-release

Type: sudo ./install.sh

  1. Accept the licence agreement
  1. Press enter to keep default PowerChute Instance
  1. Press enter to keep default installation directory
  1. Confirm the installation
  1. This will install the Java Runtime
  1. Type: CD /opt /APC/PowerChute/group1             Enter
  1. Type: sudo ./PCNSConfig.sh
  1. Enter your root Password
  1. Select your UPS Configuration Option
  1. Enter the Management Card IP Address
  1. Select yes at the do you want to Register these settings
  1. Select Yes to starting the Powerchute Network Shutdown Service
  1. You will then be show a configuration

16 comments

    • Simon

      To use Powerchute with ESXi you need the Powerchute Network Shutdown for VMware.

      From ESXi 3.5 Update 4 onwards VMware restricts RCLI (remote command line interface) administration access for the free version of ESXi.
      To make PCNS (PowerChute Network Shutdown) work properly you will need to purchase a license for ESXi which can be anything other than ESXi free edition/vSphere Hypervisor. (New name for the free edition with vSphere 4.1)

  • Tim

    You need to buy the PCNS VMware edition for 99,99€ for a single Physical Server License? Holy Cow, what’s the big difference compared to the free linux edition to justify this price?

    Is it possible to install the Linux version on vMA? We already spent enough money on the UPS 😉

    Regards

    • admin

      I don’t think there is much difference between the two versions. Unfortunately you can’t use the Linux version. I did try but it didn’t work.
      This is the only way to manage it.

  • Tim

    Ok, fyi, a possible workaround:
    Install a linux VM, connect the expensive, network-able APC UPS via USB to the ESXi server hosting the linux VM, pass through the USB to the VM, install the free powerchute agent on the linux and make it send shutdown commands to the vMA.

    Regards 😉

    • admin

      Tim

      Powerchute Network Shutdown version 3.0.0 software for ESXi is now free from the APC website.

      See link at the top of the article.

  • duck

    I don’t have a PCNSConfig.sh in /opt /APC/PowerChute/group1
    Will this affect anything?
    Also pcns is not accepting my credentials to log in?
    Is there a way to reset the creds?
    I tried this:

    f you forget or lose your password, you can set a new one and also change the user name and
    authentication phrase by editing the pcnsconfig.ini file. In the [NetworkManagementCard]
    section of the INI file, set the following lines with your new values:
    username= new user name
    password= new password
    authenticationPhrase= new authentication phrase
    not reseting the auth phrase though, and it didn’t make any difference?
    Any ideas

  • Cyril

    HI Sir

    I follow yr step, the Host can shutdown gracefully, But the VM is not work.
    Do you have any suggestions on it?

    • admin

      Hi Cyril,

      Not sure I understand the question correctly, but if you are asking why the virtual machine didn’t shutdown automatically when you shutdown the host via the APC software then that is because you need to either configure the host to shutdown the virtual machine with the host via the configuration tab or install the APC software inside the VM, then configure the APC network management software to shutdown the VM a few minutes before the host.

  • duck

    Cyril:

    As Simon says, If you have a look at the Configuration tab in the ESXi vSphere client, you’ll see a link under Software…
    Virtual Machine Startup/Shutdown.
    If you click on that link, then click the Properties link.
    You can configure … funnily enough … startup and shutdown of the VM’s.
    In saying this, there is a known issue that this doesn’t work as expected.
    See here link to VMware KB Article 1008182 (Virtual machines do not shut down gracefully) http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008182

    As well as that, you may need to make sure you’re VMware tools (on the VM’s) are running the correct scripts.
    By default the shutdown script does nothing.

    For Windows guests:
    If you have a look at the VMware Tools Properties->Scripts tab
    You can see for the shutdown script, that it actually does nothing.
    If you find that your Windows box is not shutting down cleanly…
    Add a custom script to the “Shut Down Guest Operating System” Script Event
    I just created a shutdown.bat with the following in it.
    C:WindowsSystem32shutdown.exe -s -t 1
    This cleared up any errors I was getting in my Windows7 logs.

    For Linux guests:
    Read this link http://ubuntuforums.org/archive/index.php/t-998271.html
    There are also vmware-tools scripts
    Mine didn’t appear to do much, but my server was being shutdown cleanly.

    Hope this helps.

  • guson99

    I don’t understand the operation of VIMA and APC well, I already installed VIMA and agent APC. I add 2 host esxi with the command “sudo vifp addserver .” I enter to the agent’s configuration APC http://vimaIP:6547 to configure the events of shut down.
    Does this configuration apply for all the esxi that are in the list of VIMA?
    does all the host shut down?

    Thanks.

  • Kc

    Hi Simon,
    Wonderful article and I’ve implemented the graceful shutdown via VMA couple of occasions within my solutions. My question to you on a different scenario if you could help me on…
    I’ve got a client who has a free hyper visor of VMware 5.0 installed and couple of VM’s running on the box. However, there is no Smart UPS to configure graceful shutdown. What they have is a HP T1500 UPS connected to a different Windows 2003 host and only mgt you have is USB connected to the UPS. Now I can use a long power cable to source the power to the VMware hyper visor (Esxi) . How do I configure a graceful shutdown within this environment?
    Kindly shed some light on this pls..
    Cheers!
    KC

Leave a Reply

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


*