VMware ESXi – Adding a USB device to a Guest Virtual Machine

KB ID 0000778 

Problem

About a week ago a client asked me how to do this, and I was surprised I’d not got it covered on the site. I have already covered how to do this with VMware Workstation, but never got round to doing the same for ESX.

There are a myriad of reasons why you may need to do this, either to connect a UPS, a printer, thumb drive, or a software dongle etc. But the process is identical.

Solution

1. USB pass through support was brought in with ESX 4.1, so make sure your Host machine is 4.1 or newer.

2. Also the “Hardware Version” of the virtual machine itself must be (at least) version 7.

3. Your first task is to add a “USB Controller” the the VM. (You will need to power the VM down before you can do this). Edit Settings > Hardware Tab > Add.

4. Select USB Controller from the list > Next > Next > Finish.

5. OK.

6. Start up the VM.

7. Once you have a USB controller, you can present the USB devices that are connected to the Host ESX server.

8. Add Hardware.

9. You will now see “USB device” as an option > Next.

10. Now you can see the USB devices that are connected to the Host (In this case an HP UPS) > Select your device > Next > Finish > OK.

Note: The option “Support vMotion while device is connected” option will do exactly as is suggests, if the VM is vMotioned to another Host, the USB device will remain connected to this VM. (That is very cool if you think about what it has to do to make that happen).

11. The first time you boot into the operating system, (In this case Server 2008 R2) it will detect the hardware, here I’m opening Device Manager.

12. And you can see the USB controller, it will need a reboot before it starts them with the correct drivers.

13. Post reboot, the USB controller and devices will load, and be connected successfully.

Note: After this you can simply add and remove USB devices, without the need for any downtime.

14. Now in Device Manager everything looks a lot healthier.

 

Related Articles, References, Credits, or External Links

NA

Install and Configure an HP UPS Network Module

KB ID 0000813

Problem

I installed one of these a couple of weeks ago, and there’s some good documentation with the module itself so installing it into the UPS and giving it an IP address was easy, getting the right client software to talk to it was a pain.

Solution

Configure the Network Module

1. Physically install the module in the UPS, it’s fixed with two screws and you can install it with the UPS powered on.

2. It takes a while for the card to boot, pop in the console cable that came with it (into the Settings/AUX socket – see above). Fire up PuTTy and connect via serial.

Note: Standard Serial Settings,

Bits per second—9600
Data bits—8
Parity—None
Stop bits—1
Flow control—None

3. The default password is ‘admin’

4. Use the menus presented to change the IP details, you MUST restart the module when you are finished or the IP address WONT change.

5. Once its rebooted (again this takes a while) you can login with a web browser, (username admin password admin).

Configure the Client Machines.

1. Download HP Power Protector, (Note: there is no client and administrator software any more, this software will do BOTH. The network module has the administration software built in).

2. Install the software on your machine, and login (again username admin password admin).

3. Select client > Save.

4. Select the Device Discovery tab. The software usually detects the network module on its own quite quickly, if it does not you can use the options on right to do a scan.

Ports Required for HP UPS Network Module

If you are connecting through a firewall (or you machine has a software firewall), make sure the following six ports are open.

TCP 5000
TCP 5001
TCP and UDP 4680
TCP and UDP 4679

5. When it’s fully detected, select the network module and select ‘Configure power source’, supply the login credentials for the network module, and the load segment the machine is plugged into (see below) > Save.

6. Back in the web console of the network module > Open ‘Notified Applications’ and in about 5-10 minutes your server should appear.

Related Articles, References, Credits, or External Links

NA

 

Installing the HP Power Agent on ESX

KB ID 0000275 

Problem

Assuming you already have the HP Power Monitor installed on another server (Windows or Linux) and you want to add the ESX server as a device.

Solution

1. Download the HP Linux Power Agent i.e. hppm40-linux-remote-agt.tar

2. Use a utility like 7Zip to extract the files in the agent to a folder on your computers C drive.

3. Create a username and password on the ESX Server.

4. Install FastSCP on your Laptop

5. File > Add Server > Give it the IP address > Supply the root credentials.

6. Supply the user credentials you created earlier > And the root password.

7. Next > Tick “Connect When I click Finish”.

8. Expand the ESX Server and etc folder > Inthe right hand window, right click and select “New Folder.”

9. Copy the Files you extracted in step 2 to the new folder on the ESX Server.

10. Go to the ESX Server console and login as root.

11. Execute the following commands,

[box]

cd /etc/power
./SetupRA

[/box]

12. Press the Space Bar (A LOT) to get to the end of the EULA.

13. Type yes to accept.

14. Type in the IP address of the server running HP Power Manager (or simply type an asterisk for all IP addresses).

15. The service should start.

WARNING: By Default it WON’T work, the ESX firewall will block the traffic so you need to run the following two commands,

[box]

esxcfg-firewall –openPort 3573,tcp,in,HPPMAgent
service DevMan restart

[/box]

16. Now add the ESX Server into to HP Power Manager Console.

17. Attached Devices > Add New Device >Add in the IP of the ESX server and the load bank it’s plugged into on the UPS.

18. Save changes > you will need to press “Refresh Page” a few times, before it will go green.

Related Articles, References, Credits, or External Links

NA