Thursday, May 7, 2015

virtual machines - How to add a serial port to a Windows 7 guest VM using Xen server 6.5?




We wonder how to add a SERIAL PORT (COM2) into a guest HPVM Windows 7 64 bits in a xen server 6.5 bare metal hypervisor.



We have some clients connecting through RDP v8.1 (from Win7-64 to Win7-64) with two ore more physical SERIAL PORT.



We want to bypass the physical Port Splitter based solution because of our virtual server environment could not receive any physical peripheral.



Note that our host have NO physical serial port and we ask how/if XenServer 6.5 is able to add some kind of serial device to attache with any of ready-to-run virtual serial port driver.



Note that commercial tools do the magic.




We have found a quick-n-dirty solution based on a port multiplier software wich is creating a virtual port, map it to a ip:port. Killing the process just after the port creation let us call Terminal Server and connect remote and local SERIAL PORT.



Guess that if we reboot the VM, SERIAL PORT is away.



How to declare a new SERIAL PORT with no IRQ free ?



We do not agree about the focus. Is it a Hypervisor issue or a Windows VM issue ?


Answer



The host can link directly one VM COM Port to the physical HOST COM Port. It acts as a time spanned commutation hub, simulating continuous connexion (circuit commutation at Serial protocol).




Thus, the VM data on COM Port is stacked onto a buffer that the kernel CAN push into the physical COM Port of the host. In order to maintain equity between commuted circuits, VM can have as many COM port as the host has.



Yes, we can add many virtual COM Port onto the VM. When you attach many physical peripherals on RDP clients, they cannot link one-to-one virtual COM Port on VM.



They are kind of Virtual COM Port (Windows based) on top of Virtual Machine on top on real host. The kernel is not able to deal with this kind of virtuality in virtuality. So, we have to act as "man in the midle" rewriting of datas in order to bind VM COM Ports onto one single Virtual (Citrix domU level).



So the situation :
One real workstation, many physically linked peripherals via real COM Ports, through RDP on a virtualised RDS Host running on top of Xen, hosted by an host with only ONE Port COM.



So the result :

Only the last "commuted" and binded via RDP physical client peripheral can link the VM kernel. All ohters are dropped silently.



So the fact :
We cannot simualte a COM Port on host, and link it through intel VT. It's a kernel based limitation.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...