Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Windows Server 2012 Core connecting APC UPS serial /USB

Posted on 2016-08-07
5
Medium Priority
?
960 Views
Last Modified: 2016-09-01
I'm currently buildung up a Windows Hyper-V 2012 Core and trying to use a APC Smartups 1500C to shutdown the server in a powerfail event. Unfortunately this model has no expansion slot for a network card. Is there anyway to get a serial or usb connection working with the core setup or can you point me in the right direction.
0
Comment
Question by:co_ol
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 48

Expert Comment

by:Jackie Man
ID: 41747229
There is a solution which makes use of a linux vm. Details are as follows:

Enable SSH access on your ESXi host
Create a Linux VM - I use Ubuntu. You only need a very minimal setup - no GUI or anything.
Connect your APC device via USB to the ESXi host and pass it through to the Linux VM.
Make sure that the USB controller you add to the VM matches the actual, physical USB controller the APC device is connected to, i.e. only add an XHCI controller if the physical device is a USB3 device. Mismatches seem to cause odd problems in the Linux USB device driver.
If things aren't working out and you see errors like ctrl urb status -62 in dmesg, chances are the physical controller doesn't match the one in your VM. If they do match - well then it's a problem. I have one setup with this sort of problem and no real solution to it.
Install apcupsd on the Linux VM - in Ubuntu, you can do sudo apt-get install apcupsd to install the latest version. The NUT project is also nice but I am a traditionalist.
Install the plink utility by doing sudo apt-get install putty-tools
Connect to your ESXI host by doing plink root@<your ESXi host IP>. You can close the connection immediately. The objective is to get the host key saved so plink won't prompt for it again when we run it via a script
Edit /etc/apcupsd/apcupsd.conf and change the items below so they match: UPSNAME < the name you'd like your UPS to have > UPSCABLE usb UPSTYPE usb # DEVICE DIRECTIVE should be blank for USB DEVICE Also make sure that /etc/default/apcupsd has ISCONFIGURED=yes
Edit /etc/apcupsd/apccontrol and scroll to the doshutdown case. Make it look like this: doshutdown) echo "UPS ${2} initiated Shutdown Sequence" | ${WALL} # Shut down indirectly by triggering the ESXi host to do the # shutdown via VMWare tools /usr/bin/plink root@< your ESXi host IP > -pw < your root pw > "/sbin/shutdown.sh && /sbin/poweroff" ;;
Restart apcupsd using sudo service apcupsd restart and see if things are working by invoking apcaccess. If not, check logs and dmesg
Make sure all VMs that need to shut down nicely in case of a power failure have VMWare Tools installed. Also make sure that they are part of the VM startup/shutdown list (in the vSphere Web Client, go to: vCenter -> <your host> -> Manage -> Settings -> VM Startup/Shutdown). Make sure that the shutdown action is to shut down the guest OS.

Source: http://serverfault.com/questions/462993/vmware-esxi-shutdown-triggered-by-apc-ups-connected-via-usb
0
 
LVL 37

Accepted Solution

by:
ArneLovius earned 2000 total points
ID: 41747601
APC PBE (Powerchute Business Edition) will install on server core

http://www.apc.com/us/en/tools/download/software_comp.cfm?sw_sku=SFPCBE911&id=125&swfam=125
0
 

Author Comment

by:co_ol
ID: 41752997
The install worked just fine however it seem to only support serial and network connections.
Still need to source the serial cable.
0
 
LVL 37

Expert Comment

by:ArneLovius
ID: 41756380
I have used APC PBE with USB connected UPSs.

If it did not "see" the UPS, I would try the APC software on a laptop to check that the UPS is seen in device manager on USB.
0
 

Author Closing Comment

by:co_ol
ID: 41780797
Thanks, works well on serial port, no USB option available for Hyper-V Server 2016R2
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
Optimized for private cloud infrastructures and datacenters, Nano Server is minimalistic, yet super-efficient, OS for services such as Hyper-V and Hyper-V cluster. Learn how you can easily deploy Nano Server and unlock its power!
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question