VMware Cloud Community
Compboy
Enthusiast
Enthusiast
Jump to solution

Auto reconnect USB device to virtual machine

Hi,

I have two USB printers connected to my ESXi host, but when the esxi host reboots and the usb devices are turned off the are not reconnected when the USB is turned back on.

Is there a solution for this ?

With kind regards,

Bas van den Dikkenberg.

1 Solution

Accepted Solutions
William22
Enthusiast
Enthusiast
Jump to solution

3 Replies
William22
Enthusiast
Enthusiast
Jump to solution

Hi

Welcome to communities.

Did you installed vmware tools and followed below kb

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1648

Compboy
Enthusiast
Enthusiast
Jump to solution

Thanks william,

of course i have installed the vmware tools.

The guide you send is for vmware workstation i will have look if this works also for esxi 5.5 update 1.

You wil heare soon of this

0 Kudos
Compboy
Enthusiast
Enthusiast
Jump to solution

Oke this sollution works, what i don't like i have to do manual editing of VMX

This  what is this:

Only by default esxi 5.5  uses :


usb.autoConnect.device0 = "path:1/2/1  autoclean:1"

If you change this to :

usb.autoConnect.device0 = "path:1/2/1  autoclean:0"

Now every device that is connected to that USB port is automaticly reconnected to the VM .

But when for some kind reason you connect your device to another port its not auto reconnected.

Therefor i used to vid an the pid, you can find the values by doing lsusb from commandline on the esxi host

You get then something like this :

/ # lsusb

Bus 02 Device 08: ID 0922:001a Dymo-CoStar Corp. LabelWriter 400 Turbo

Bus 02 Device 07: ID 04e8:329f Samsung Electronics Co., Ltd

Bus 02 Device 02: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub

Bus 02 Device 01: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 01 Device 02: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub

Bus 01 Device 01: ID 1d6b:0002 Linux Foundation 2.0 root hub

so i put this in my vmx file :

usb.autoConnect.device0 = "vid:04e8 pid:329f autoclean:0"

usb.autoConnect.device1 = "vid:0922 pid:001a autoclean:0"

So no mater what port is used if these to printers are connected the automaticly reconnected to the VM.

And i survives a reboot of the ESX host