Product:
Search Type:

[How To] How to add external hardware devices (i.e. USB,COM ports) to a VE.

Article ID: 1667 
Last Review: May,27 2008
APPLIES TO:
  • Virtuozzo for Windows 3.5.1 SP1

RESOLUTION

To be able to add external devices inside VE please use vzdevctl command and do the following actions:

1. Make sure the device on port is working on Hardware node itslef.

2. Create legacy symbolic link, the most of software need this link to open and communicate with device on port (skip this step fro USB devices and go to point 3):


For serial ports

vzdevctl linkadd veid --object \Device\Serial0 --symlink \DosDevices\COM1

vzdevctl linkadd veid --object \Device\Serial0 --symlink \Device\Serial0


To obtain port name ( \DosDevices\COM1, \Device\Serial0) please run the following command:

change port /query


replace indexes with correct ones (usually there is a simple mapping like Serial0->COM1, Serial1->COM2, etc).


For parallel ports


vzdevctl linkadd veid --object \Device\Parallel0 --symlink \DosDevices\LPT1

vzdevctl linkadd veid --object \Device\Parallel0 --symlink \Devices\Parallel0

 
with same mapping rules.



3. In case of mapping of USB devices start from this step skipping step 2.

Create pnp shared device as described below, because some new soft requires interface instead of legacy link:


vzdevctl add VEID --deviceid "ACPI\PNP0501\1" --alias com1 --connect --onboot


where : 

--deviceid – device system identification, which can be retrieved from Device Manager (Device Properties->Details->Device Instance Id) or by using of devtree command :

vzdevctl devtree


--alias – device alias (can be omitted, however it’s better to use one to avoid quite complicated deviceid usage ).

Other parameters

--connect – connect device to running VE right after adding this device to sytem (it’s impossible to connect device to stopped VE). If this parameter omitted , device won’t be connected, but can be connected later. If external device isn’t connected to HN it can be added and connected anyway , however it will be inactive while this device is physically connected to HN.

--onboot – device will be connected to VE automatically after VE start up , otherwise it will be necessary to use command connect manually. 

The command connect is used for connecting device to certain VE :

vzdevctl connect 101 --alias “dev1”


Please use the command dconnect for disconnection and remove for device removing as well. See more detailed description in utility help.
Keywords: vzdevctl devices USB COM LPT

Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
*Please type the code you can see.
* - required fields