CN102523264A - USB (Universal Serial Bus) equipment remote sharing method and system for virtual machine - Google Patents

USB (Universal Serial Bus) equipment remote sharing method and system for virtual machine Download PDF

Info

Publication number
CN102523264A
CN102523264A CN2011104021126A CN201110402112A CN102523264A CN 102523264 A CN102523264 A CN 102523264A CN 2011104021126 A CN2011104021126 A CN 2011104021126A CN 201110402112 A CN201110402112 A CN 201110402112A CN 102523264 A CN102523264 A CN 102523264A
Authority
CN
China
Prior art keywords
usb device
host
client
usb
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2011104021126A
Other languages
Chinese (zh)
Other versions
CN102523264B (en
Inventor
沃天宇
焦烨
李建欣
李博
怀进鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihang University
Original Assignee
Beihang University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beihang University filed Critical Beihang University
Priority to CN201110402112.6A priority Critical patent/CN102523264B/en
Publication of CN102523264A publication Critical patent/CN102523264A/en
Application granted granted Critical
Publication of CN102523264B publication Critical patent/CN102523264B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention provides a USB (Universal Serial Bus) equipment remote sharing method and a system for a virtual machine. The method comprises the following steps: a client host machine sends an IP message carrying a USB equipment remote sharing request message to a server host machine, the server host machine generates a virtual USB equipment allowing remote sharing, a USB equipment driving module of the server host machine converts a USB equipment remote access request sent by a server virtual machine into a URB (Universal Request Block) and transmits the URB to a virtual host controller of the server host machine, the virtual host controller of the server host machine packages the URB into an IP (internet protocol) message to be transmitted to a virtual USB equipment driving module of a client, and the virtual USB equipment driving module of the client host machine establishes a URB according to the content of the IP message and sends the URB to a host controller of the client for driving. The USB equipment remote sharing method and the system for the virtual machine are adopted to be capable of improving the flexibility of the USB equipment remote sharing for the virtual machine.

Description

Towards the long-range shared method and system of the USB device of virtual machine
Technical field
The present invention relates to field of computer technology, relate in particular to a kind of USB (Universal Serial Bus is called for short USB) apparatus remote and share method and system towards virtual machine.
Background technology
Along with Internet technology and application and development; With cloud computing, virtual machine etc. is the execution environment that the data represented center has become following running software and data management; For example: company of Google (Google) has released cloud printing (Cloud Printer), and Amazon (Amazon) company has released based on network user's environment of virtual machine etc.
Virtual machine (Virtual Machine is called for short VM) is a kind of complete computer in the complete isolation environment that operates in complete hardware system function through software simulation.Virtual machine has characteristics such as good isolation, subregion property, encapsulation property, self-management, can good support be provided to network virtualization.
Cloud computing is the product that traditional calculations machine technology such as grid computing, Distributed Calculation, parallel computation, effectiveness calculating, the network storage, virtual, load balancing and network technical development merge.Cloud computing is integrated into a perfect system with powerful calculating ability to the relatively low computational entity of a plurality of costs through network.Characteristics such as that cloud computing has is ultra-large, virtual, high reliability, enhanced scalability, on-demand service provide the most reliable, safest data storage center.
Above-mentioned with the execution environment of data center as running software and data management in, need in virtual machine, use long-distance user's usb terminal equipment such as USB flash drive (abbreviation USB flash disk), USB camera, USB printer, usb key.
Occur some long-range technology of sharing at present, but all had weak point.For example, can adopt form computer operating system (Windows) to carry out file-sharing, this sharing mode just the sharing of file system hierarchy, can not be realized sharing of equipment, therefore can't share and control long-range USB device.For example; Can also adopt virtual USB technology (USB anyware) to realize sharing, USB anyware is a hub with USB commentaries on classics Ethernet of Ethernet interface, has broken the restriction that traditional usb protocol transmission range has only 5 meters; Make the USB ancillary equipment that main frame in local area network (LAN) can access remote; But each access point all needs the user to buy a USB anyware hardware device, thereby the long-range sharing flexibility of USB device is poor, and has increased cost.For example, can also adopt USB to share based on RDP (Remote Desktop Protocol is called for short RDP); The function class of its realization is similar to the disc driver mapping function of windows remote desktop, and system comprises a server (Server) and a work station (Workstation), and work station is installed on the actual main frame that is inserted with USB device; Server is installed on the distance host of being logined, in case land distance host, local USB device will show; Employing is shared based on the USB of RDP; The USB device linking number is limited, and needs remote desktop to connect, and can't be suitable for for some application that cannot login distance host; Thereby the long-range sharing flexibility of USB device is poor, and fail safe is relatively poor.
In a word, existing long-range shared method, poor towards the long-range sharing flexibility of the USB device of virtual machine.
Summary of the invention
First aspect of the present invention provides the long-range shared method of a kind of USB device towards virtual machine, in order to solve defective of the prior art, improves towards the long-range sharing flexibility of the USB device of virtual machine.
Another aspect of the present invention provides the long-range shared system of a kind of USB device towards virtual machine, in order to solve defective of the prior art, improves towards the long-range sharing flexibility of the USB device of virtual machine.
First aspect of the present invention provides a kind of general-purpose serial bus USB apparatus remote towards virtual machine and shares method, comprising:
The application module of client host carries the first Internet protocol IP message of the long-range sharing request message of USB device to the application module transmission of server host, and the long-range sharing request message of said USB device comprises: the bus sign ID, vendor id, device id and the activation bit that allow shared USB device;
The fictitious host computer controller of said server host inserts the Root Hub port status equipment that changes to, and generates the virtual long-range shared USB device of said permission at said server host;
Said server virtual machine is through the long-range shared USB device of the said virtual permission of device virtualization accessible, to the USB device driver module transmission USB device remote access request of said server host;
The USB device driver module of said server host is converted into a USB request block URB with said USB device remote access request and is delivered to the fictitious host computer controller of server host;
The fictitious host computer controller of said server host is encapsulated into a said URB virtual USB device driver module that sends client in the 2nd IP message to;
The virtual USB device driver module of client host is set up a said URB according to said the 2nd IP content of message and is passed to the console controller of client;
The console controller of said client host drives and transmits the data that a said URB describes.
Aforesaid method, wherein, the console controller of said client host also comprises after driving the data of transmitting said URB description:
After a said URB accomplished, the console controller of said client host called URB with interrupt mode and accomplishes call back function;
The virtual USB device driver module of said client host returns the IP message that carries USB device request completion message to the fictitious host computer controller of the host of said server;
The fictitious host computer controller of said server host returns USB device request completion message to the USB device driver module of said server host.
Aforesaid method, wherein, the application module of said client host also comprised before the application module of server host sends an IP message that carries the long-range sharing request message of USB device:
The long-range shared USB device of said permission inserts said client host;
The USB device driver module of client host obtains the USB device access request, and said USB device access request is converted into the 2nd URB and is sent to the console controller of said client host;
The console controller of said client host drives and transmits the data that said the 2nd URB describes;
After said the 2nd URB accomplished, the console controller of said client called URB with interrupt mode and accomplishes call back function;
The USB device driver module of said client host returns the USB device access request and accomplishes message.
Aforesaid method; Wherein, The USB device driver module of said client host returns the USB device access request and accomplishes after the message; The application module of said client host also comprised before an IP message of the long-range sharing request message of USB device is carried in the application module transmission of server host:
The device file of whole USB devices that the editing equipment management device circulation viewing client-side main frame of client host inserts;
The editing equipment management device of client host obtains bus ID, vendor id, device id and the activation bit of whole USB devices of said access;
The editing equipment management device of client host is provided with the long-range shared USB device of said permission in whole USB devices of said access.
Aforesaid method; Wherein, The USB device driver module of said client host returns the USB device access request and accomplishes after the message; The application module of said client host also comprised before an IP message of the long-range sharing request message of USB device is carried in the application module transmission of server host:
The editing equipment management device of said client host is inquired about the virtual machine sign UUID of the whole virtual machines that move in the said server host;
The UUID of editing equipment management device select target virtual machine from the UUID of said whole virtual machines of said client host;
Also comprise in the long-range sharing request message of said USB device: the UUID of said target virtual machine.
Aforesaid method, wherein, the editing equipment management device of said client host is provided with in whole USB devices of said access after the long-range shared USB device of said permission, also comprises:
The long-range shared USB device of the said permission of editing equipment management device of said client host is set to not allow long-range shared USB device.
Another aspect of the present invention provides a kind of general-purpose serial bus USB apparatus remote shared system towards virtual machine, comprising: client host, server host and be arranged on the server virtual machine on the said server host;
Said client host comprises: application module, virtual USB device driver module and console controller;
Said server host comprises: application module, USB device driver module and fictitious host computer controller;
The application module of said client host is used for carrying the first Internet protocol IP message of the long-range sharing request message of USB device to the application module transmission of said server host, and the long-range sharing request message of said USB device comprises: the bus sign ID, vendor id, device id and the activation bit that allow shared USB device;
The virtual USB device driver module of said client host is used for setting up a URB and passing to the console controller of client according to the 2nd IP content of message;
The console controller of said client host is used to drive the data of transmitting URB description;
The fictitious host computer controller of said server host is used for the Root Hub port status equipment that changes to is inserted, and generates the virtual long-range shared USB device of said permission at said server host; And a URB is encapsulated into the virtual USB device driver module that sends said client in the 2nd IP message to;
The USB device driver module of said server host is used for said USB device remote access request is converted into a USB request block URB and is delivered to the fictitious host computer controller of server host;
Said server virtual machine is used for through the long-range shared USB device of the said virtual permission of device virtualization accessible, to the USB device driver module transmission USB device remote access request of said server host.
Aforesaid system, wherein, said client host also comprises:
The editing equipment management device; The device file of whole USB devices that the viewing client-side main frame that is used to circulate inserts; Obtain bus ID, vendor id, device id and the activation bit of whole USB devices of said access, the long-range shared USB device of said permission is set in whole USB devices of said access.
Aforesaid system, wherein, the editing equipment management device of said client host also is used for inquiring about the virtual machine sign UUID of whole virtual machines that said server host moves, the UUID of select target virtual machine from the UUID of said whole virtual machines; Also comprise in the long-range sharing request message of said USB device: the UUID of said target virtual machine.
Aforesaid system, wherein, the editing equipment management device of said client host also is used for the long-range shared USB device of said permission and is set to not allow long-range shared USB device.
The technique effect of one aspect of the invention is: adopt the IP message communication between server and the client; User end to server reports the information that allows shared USB device; Server self is being set up this virtual USB device according to this information, will send to client through the IP message to the corresponding URB of the accessing operation of this USB device, and client converts this IP message to URB and carries out; Thereby realize the server remote access USB device; And need in the main frame of client and server, not increase new hardware device, not limit the linking number of USB device, improve towards the long-range sharing flexibility of the USB device of virtual machine.
The technique effect of another aspect of the present invention is: adopt the IP message communication between server host and the client host; Client host reports the information that allows shared USB device to the server host; The server host self is being set up this virtual USB device according to this information; The server virtual machine is sent to client host to the corresponding URB of the accessing operation of this USB device through the IP message; Client host converts this IP message to URB and carries out, thereby realizes the server remote access USB device, and need in the main frame of client and server, not increase new hardware device; Do not limit the linking number of USB device, improved towards the long-range sharing flexibility of the USB device of virtual machine.
Description of drawings
Fig. 1 is the flow chart towards the long-range shared method of USB device of virtual machine of the embodiment of the invention one;
Fig. 2 is the flow chart towards the long-range shared method of USB device of virtual machine of the embodiment of the invention two;
Fig. 3 is the structural representation towards the long-range shared system of USB device of virtual machine of the embodiment of the invention three.
Embodiment
In following embodiment of the present invention, the client host in the long-range shared system of the USB device of virtual machine and the Drive Layer of server host are improved.Existing client host and server host, include separately with lower module: application module, USB device driver module and console controller.In following each embodiment of the present invention,, the application module of client host and server host is improved in application layer; In Drive Layer; The prior USB device driver module of client is improved to the virtual USB device driver module; This virtual USB device driver module is on the basis of the repertoire that comprises the prior USB device driver module; Also have the long-range shared function of the USB device of realization, specifically see the description among following each embodiment for details; In Drive Layer; Also the existing console controller with server is improved to the fictitious host computer controller; This fictitious host computer controller also has the long-range shared function of the USB device of realization on the basis of the repertoire that comprises existing console controller, specifically see the description among following each embodiment for details.In various embodiments of the present invention; The repertoire of prior USB device driver module is integrated in the virtual USB device driver module with realizing the long-range shared function of USB device, in practical application, can also above-mentioned two kinds of functions be provided with respectively; Promptly; Keep the prior USB device driver module in the client host, this USB device driver module is used to realize driving and the visit of client host for the USB device that inserts this main frame self, and; In client host, set up a virtual USB device driver module, this virtual USB device driver module is used to realize the long-range shared function of USB device.Correspondingly, in various embodiments of the present invention, the repertoire of existing console controller is integrated in the fictitious host computer controller with realizing the long-range shared function of USB device; In practical application; Can also above-mentioned two kinds of functions be provided with respectively, that is, keep existing console controller in the server host; This console controller is used to realize driving and the visit of server host for the USB device that inserts this main frame self; And, in the server host, set up a fictitious host computer controller, this fictitious host computer controller is used to realize the long-range shared function of USB device.
Fig. 1 is the flow chart towards the long-range shared method of USB device of virtual machine of the embodiment of the invention one.In the embodiment of the invention one, will insert the USB device of client host with client and share, thereby make that server can this USB device of Long-distance Control be an example to long-range server.As shown in Figure 1, this method comprises following process at least.
Step 101: the application module of client host carries an IP message of the long-range sharing request message of USB device to the application module transmission of server host.
In this step, comprise in the long-range sharing request message of this USB device: the bus sign ID, vendor id, device id and the activation bit that allow shared USB device.
Step 102: the fictitious host computer controller of server host inserts the Root Hub port status equipment that changes to.
In this step, the fictitious host computer controller of server host inserts the Root Hub port status equipment that changes to, and generates the virtual long-range shared USB device of permission at the server host.
Step 103: the server virtual machine is through the long-range shared USB device of the said virtual permission of device virtualization accessible.
In this step; The server virtual machine is through the long-range shared USB device of the said virtual permission of device virtualization accessible; Particularly, in this process, the server virtual machine sends the USB device remote access request to the USB device driver module of server host.
Step 104: the USB device driver module of server host is converted into a USB request block (USB Request Block is called for short URB) with the USB device remote access request and is delivered to the fictitious host computer controller of server host.
Step 105: the fictitious host computer controller of server host is encapsulated into a URB virtual USB device driver module that sends client in the 2nd IP message to.
Step 106: the virtual USB device driver module of client host is set up a URB according to the 2nd IP content of message and is passed to the console controller of client.
Step 107: the console controller of client host drives and transmits the data that a URB describes.
In the embodiment of the invention one; Adopt the IP message communication between server and the client; User end to server reports the information that allows shared USB device, and server self is being set up this virtual USB device according to this information, will send to client through the IP message to the corresponding URB of the accessing operation of this USB device; Client converts this IP message to URB and carries out, thereby realizes the server remote access USB device.This method is not simply file to be shared; But realized sharing of equipment aspect; And need in the main frame of client and server, not increase new hardware device; The linking number of USB device is also unrestricted, has therefore improved towards the long-range sharing flexibility of the USB device of virtual machine.
Fig. 2 is the flow chart towards the long-range shared method of USB device of virtual machine of the embodiment of the invention two.As shown in Figure 2, this method comprises following process.
Step 201: allow long-range shared USB device to insert client host.
In this step, allow long-range shared USB device at first need insert client host in the subsequent process, the concrete grammar that this access procedure adopts can adopt existing any USB device to insert the method for main frame, repeats no more at this.
Step 202: the USB device driver module of client host obtains the USB device access request, and the USB device access request is converted into the 2nd URB and is sent to the console controller of client host.
After USB device inserted client host, this client host can be visited the USB device of access, specifically comprises step 202 to step 205.Particularly; In this step, at first, the application module of client host sends the USB device access request to the USB device driver module; Then, the USB device driver module is converted into the 2nd URB with the USB device access request and is sent to the console controller of client host.
Step 203: the console controller of client host drives and transmits the data that the 2nd URB describes.
Step 204: after the 2nd URB accomplished, the console controller of client called URB with interrupt mode and accomplishes call back function.
Step 205: the USB device driver module of client host returns the USB device access request and accomplishes message.
Step 206: the device file of whole USB devices that the editing equipment management device circulation viewing client-side main frame of client host inserts.
Step 207: the editing equipment management device of client host obtains bus ID, vendor id, device id and the activation bit of whole USB devices of access; And the editing equipment management device of client host is provided with in the whole USB devices that insert and allows long-range shared USB device.
Further, in execution in step 207, perhaps after execution in step 207, can also carry out following step 208.
Step 208: virtual machine sign (the Universally Unique Identifier of the whole virtual machines that move in the editing equipment management device querying server host of client host; Be called for short UUID); And, the UUID of editing equipment management device select target virtual machine from the UUID of whole virtual machines of client host.
In this step, on the server host, might move one or more virtual machine simultaneously.Client host is from wherein selecting a virtual machine as the target virtual machine, this target virtual machine be the client permission can this client USB device of remote access in follow-up long-range shared procedure virtual machine.
After above-mentioned steps 207, any moment in carrying out subsequent process, can also change at any time and allow long-range shared USB device, specifically he can carry out following step 209.
Step 209: the editing equipment management device of client host allows long-range shared USB device to be set to not allow long-range shared USB device.
After step 208, client is with the long-range server that shares to of USB device.Particularly, get into following step 210.
Step 210: the application module of client host carries an IP message of the long-range sharing request message of USB device to the application module transmission of server host.
In this step, comprise in the long-range sharing request message of this USB device: the UUID that allows bus sign ID, vendor id, device id, activation bit and the target virtual machine of shared USB device.
Step 211: the fictitious host computer controller of server host inserts the Root Hub port status equipment that changes to.
In this step, the fictitious host computer controller of server host inserts the Root Hub port status equipment that changes to, and generates the virtual long-range shared USB device of permission at the server host.
Step 212: the server virtual machine is through the long-range shared USB device of the said virtual permission of device virtualization accessible.
In this step; The server virtual machine is through the long-range shared USB device of the said virtual permission of device virtualization accessible; Particularly, in this process, the server virtual machine sends the USB device remote access request to the USB device driver module of server host.
Step 213: the USB device driver module of server host is converted into a USB request block (USB Request Block is called for short URB) with the USB device remote access request and is delivered to the fictitious host computer controller of server host.
Step 214: the fictitious host computer controller of server host is encapsulated into a URB virtual USB device driver module that sends client in the 2nd IP message to.
Step 215: the virtual USB device driver module of client host is set up a URB according to the 2nd IP content of message and is passed to the console controller of client.
Step 216: the console controller of client host drives and transmits the data that a URB describes.
Step 217: after a URB accomplished, the console controller of client host called URB with interrupt mode and accomplishes call back function.
Step 218: the virtual USB device driver module of client host returns the IP message that carries USB device request completion message to the fictitious host computer controller of the host of server.
Step 219: the fictitious host computer controller of server host returns USB device request completion message to the USB device driver module of server host.
In the embodiment of the invention two; Client host is provided with the USB device that inserts this main frame self; The therefrom long-range shared USB device of selection permission, and client can be specified the virtual machine of the server that allows shared this USB device, and this virtual machine sends to client to the corresponding URB of the accessing operation of this USB device through the IP message; Client converts this IP message to URB and carries out; Thereby realized the virtual machine remote visit USB device of server, and can select, further improved towards the long-range sharing flexibility of the USB device of virtual machine to this virtual machine.
Fig. 3 is the structural representation towards the long-range shared system of USB device of virtual machine of the embodiment of the invention three.As shown in Figure 3, this system comprises: client host 31, server host 32 and be arranged on the server virtual machine 33 on the server host 32.
Wherein, client host 31 comprises: application module 311, virtual USB device driver module 312 and console controller 313.Server host 32 comprises: application module 321, USB device driver module 322 and fictitious host computer controller 323.
Particularly, the application module 311 of client host 31 is used for carrying an IP message of the long-range sharing request message of USB device to application module 321 transmissions of server host 32.The long-range sharing request message of this USB device comprises: the bus sign ID, vendor id, device id and the activation bit that allow shared USB device.
The virtual USB device driver module 312 of client host 31 is used for setting up a URB and passing to the console controller 313 of client host 31 according to the 2nd IP content of message.
The console controller 313 of client host 31 is used to drive the data of transmitting URB description.
Server host 32 comprises: application module 321, USB device driver module 322 and fictitious host computer controller 323.
The fictitious host computer controller 323 of server host 32 is used for the Root Hub port status equipment that changes to is inserted, and generates the virtual long-range shared USB device of permission at server host 32; And a URB is encapsulated into the virtual USB device driver module 312 that sends client host 31 in the 2nd IP message to.
The USB device driver module 322 of server host 32 is used for the USB device remote access request is converted into a USB request block URB and is delivered to the fictitious host computer controller 323 of server host 32.
Server virtual machine 33 is used for through the long-range shared USB device of the virtual permission of device virtualization accessible, to the USB device driver module 322 transmission USB device remote access request of said server host 32.
On the basis of technique scheme, further, client host 31 can also comprise: editing equipment management device 314.Editing equipment management device 314 be used to the to circulate device file of whole USB devices that viewing client-side main frame 31 inserts; Obtain bus ID, vendor id, device id and the activation bit of whole USB devices of access, in the whole USB devices that insert, be provided with and allow long-range shared USB device.
Further, the editing equipment management device 314 of client host 31 also is used for the virtual machine sign UUID of whole virtual machines of querying server host 32 operations, the UUID of select target virtual machine from the UUID of whole virtual machines.Also comprise in the long-range sharing request message of above-mentioned USB device: the UUID of target virtual machine.
Further, the editing equipment management device 314 of client host 31 also is used for allowing long-range shared USB device to be set to not allow long-range shared USB device.
On the basis of technique scheme, particularly, server host 32 and the information interactive process that is arranged between the server virtual machine 33 on the server host 32 can adopt existing virtual machine technique arbitrarily to realize.Below only a kind of specific embodiment is wherein briefly introduced.Particularly, between server virtual machine 33 and server host 32 hardware, there is a layer, is used for the decision visit, be called monitor of virtual machine.Comprise device driver module in the operating system of virtual machine; Virtual machine sends behind the visit order that allows long-range shared USB; Monitor of virtual machine is intercepted and captured this visit order; Monitor of virtual machine converts this visit order into to the operating system of host 32 system call command; This system call command is transmitted to the device driver module of the operating system of host 32, the physical hardware device of the device driver module visit host 32 of the operating system through host 32 with allow long-range shared USB device.
In the embodiment of the invention three; The application module of client reports the information that allows shared USB device to the application module of server; The fictitious host computer controller of server is set up this virtual USB device and will be sent to client through the IP message to the corresponding URB of the accessing operation of this USB device at server according to this information; The virtual USB device driver module of client converts this IP message to URB and carries out, thereby realizes the server remote access USB device.The long-range shared system of this USB device is not simply file to be shared; But realized sharing of equipment aspect; And need in the main frame of client and server, not increase new hardware device; The linking number of USB device is also unrestricted, has therefore improved towards the long-range sharing flexibility of the USB device of virtual machine.
Need to prove: for aforesaid each method embodiment; For simple description; So it all is expressed as a series of combination of actions, but those skilled in the art should know that the present invention does not receive the restriction of described sequence of movement; Because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in the specification all belongs to preferred embodiment, and related action and module might not be that the present invention is necessary.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, do not have the part that details among certain embodiment, can be referring to the associated description of other embodiment.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be accomplished through the relevant hardware of program command; Aforesaid program can be stored in the computer read/write memory medium; This program the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
What should explain at last is: above embodiment is only in order to explaining technical scheme of the present invention, but not to its restriction; Although with reference to previous embodiment the present invention has been carried out detailed explanation, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these are revised or replacement, do not make the scope of the essence disengaging various embodiments of the present invention technical scheme of relevant art scheme.

Claims (10)

1. the general-purpose serial bus USB apparatus remote towards virtual machine is shared method, it is characterized in that, comprising:
The application module of client host carries the first Internet protocol IP message of the long-range sharing request message of USB device to the application module transmission of server host, and the long-range sharing request message of said USB device comprises: the bus sign ID, vendor id, device id and the activation bit that allow shared USB device;
The fictitious host computer controller of said server host inserts the Root Hub port status equipment that changes to, and generates the virtual long-range shared USB device of said permission at said server host;
Said server virtual machine is through the long-range shared USB device of the said virtual permission of device virtualization accessible, to the USB device driver module transmission USB device remote access request of said server host;
The USB device driver module of said server host is converted into a USB request block URB with said USB device remote access request and is delivered to the fictitious host computer controller of server host;
The fictitious host computer controller of said server host is encapsulated into a said URB virtual USB device driver module that sends client in the 2nd IP message to;
The virtual USB device driver module of client host is set up a said URB according to said the 2nd IP content of message and is passed to the console controller of client;
The console controller of said client host drives and transmits the data that a said URB describes.
2. method according to claim 1 is characterized in that, the console controller of said client host also comprises after driving the data of transmitting said URB description:
After a said URB accomplished, the console controller of said client host called URB with interrupt mode and accomplishes call back function;
The virtual USB device driver module of said client host returns the IP message that carries USB device request completion message to the fictitious host computer controller of the host of said server;
The fictitious host computer controller of said server host returns USB device request completion message to the USB device driver module of said server host.
3. method according to claim 1 and 2 is characterized in that, the application module of said client host also comprised before the application module of server host sends an IP message that carries the long-range sharing request message of USB device:
The long-range shared USB device of said permission inserts said client host;
The USB device driver module of client host obtains the USB device access request, and said USB device access request is converted into the 2nd URB and is sent to the console controller of said client host;
The console controller of said client host drives and transmits the data that said the 2nd URB describes;
After said the 2nd URB accomplished, the console controller of said client called URB with interrupt mode and accomplishes call back function;
The USB device driver module of said client host returns the USB device access request and accomplishes message.
4. method according to claim 3; It is characterized in that; The USB device driver module of said client host returns the USB device access request and accomplishes after the message; The application module of said client host also comprised before an IP message of the long-range sharing request message of USB device is carried in the application module transmission of server host:
The device file of whole USB devices that the editing equipment management device circulation viewing client-side main frame of client host inserts;
The editing equipment management device of client host obtains bus ID, vendor id, device id and the activation bit of whole USB devices of said access;
The editing equipment management device of client host is provided with the long-range shared USB device of said permission in whole USB devices of said access.
5. method according to claim 3; It is characterized in that; The USB device driver module of said client host returns the USB device access request and accomplishes after the message; The application module of said client host also comprised before an IP message of the long-range sharing request message of USB device is carried in the application module transmission of server host:
The editing equipment management device of said client host is inquired about the virtual machine sign UUID of the whole virtual machines that move in the said server host;
The UUID of editing equipment management device select target virtual machine from the UUID of said whole virtual machines of said client host;
Also comprise in the long-range sharing request message of said USB device: the UUID of said target virtual machine.
6. method according to claim 4 is characterized in that, the editing equipment management device of said client host is provided with in whole USB devices of said access after the long-range shared USB device of said permission, also comprises:
The long-range shared USB device of the said permission of editing equipment management device of said client host is set to not allow long-range shared USB device.
7. the general-purpose serial bus USB apparatus remote shared system towards virtual machine is characterized in that, comprising: client host, server host and be arranged on the server virtual machine on the said server host;
Said client host comprises: application module, virtual USB device driver module and console controller;
Said server host comprises: application module, USB device driver module and fictitious host computer controller;
The application module of said client host is used for carrying the first Internet protocol IP message of the long-range sharing request message of USB device to the application module transmission of said server host, and the long-range sharing request message of said USB device comprises: the bus sign ID, vendor id, device id and the activation bit that allow shared USB device;
The virtual USB device driver module of said client host is used for setting up a URB and passing to the console controller of client according to the 2nd IP content of message;
The console controller of said client host is used to drive the data of transmitting URB description;
The fictitious host computer controller of said server host is used for the Root Hub port status equipment that changes to is inserted, and generates the virtual long-range shared USB device of said permission at said server host; And a URB is encapsulated into the virtual USB device driver module that sends said client in the 2nd IP message to;
The USB device driver module of said server host is used for said USB device remote access request is converted into a USB request block URB and is delivered to the fictitious host computer controller of server host;
Said server virtual machine is used for through the long-range shared USB device of the said virtual permission of device virtualization accessible, to the USB device driver module transmission USB device remote access request of said server host.
8. system according to claim 7 is characterized in that, said client host also comprises:
The editing equipment management device; The device file of whole USB devices that the viewing client-side main frame that is used to circulate inserts; Obtain bus ID, vendor id, device id and the activation bit of whole USB devices of said access, the long-range shared USB device of said permission is set in whole USB devices of said access.
9. system according to claim 8 is characterized in that,
The editing equipment management device of said client host also is used for inquiring about the virtual machine sign UUID of whole virtual machines that said server host moves, the UUID of select target virtual machine from the UUID of said whole virtual machines; Also comprise in the long-range sharing request message of said USB device: the UUID of said target virtual machine.
10. according to Claim 8 or 9 described systems, it is characterized in that,
The editing equipment management device of said client host also is used for the long-range shared USB device of said permission and is set to not allow long-range shared USB device.
CN201110402112.6A 2011-12-06 2011-12-06 USB (Universal Serial Bus) equipment remote sharing method and system for virtual machine Expired - Fee Related CN102523264B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110402112.6A CN102523264B (en) 2011-12-06 2011-12-06 USB (Universal Serial Bus) equipment remote sharing method and system for virtual machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110402112.6A CN102523264B (en) 2011-12-06 2011-12-06 USB (Universal Serial Bus) equipment remote sharing method and system for virtual machine

Publications (2)

Publication Number Publication Date
CN102523264A true CN102523264A (en) 2012-06-27
CN102523264B CN102523264B (en) 2014-07-02

Family

ID=46294053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110402112.6A Expired - Fee Related CN102523264B (en) 2011-12-06 2011-12-06 USB (Universal Serial Bus) equipment remote sharing method and system for virtual machine

Country Status (1)

Country Link
CN (1) CN102523264B (en)

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102882871A (en) * 2012-09-28 2013-01-16 深圳市赛蓝科技有限公司 Mobile terminal USB (universal serial bus) virtualized mapping method
CN103312781A (en) * 2013-05-15 2013-09-18 山东超越数控电子有限公司 Implementation method of virtual USB (Universal Serial Bus)
CN103475650A (en) * 2013-08-30 2013-12-25 深圳Tcl新技术有限公司 Data processing method and device based on wireless communication protocol
CN103618752A (en) * 2013-12-18 2014-03-05 广东中科遥感技术有限公司 Virtual machine remote desktop safety access system and method
CN103618780A (en) * 2013-11-22 2014-03-05 华为技术有限公司 Method and device for realizing multiple virtual machine mounted externally-arranged components
CN103873537A (en) * 2012-12-18 2014-06-18 无锡中科物联网基础软件研发中心有限公司 Remote sharing method and system for USB (Universal Serial Bus) device
CN104317759A (en) * 2014-10-15 2015-01-28 国云科技股份有限公司 Method for supporting hot plugging of virtual machine USB (universal serial bus) storage equipment
CN105100006A (en) * 2014-05-07 2015-11-25 杭州迪普科技有限公司 Proxy service device and remote control device and method
CN105376228A (en) * 2015-11-11 2016-03-02 北京市国路安信息技术股份有限公司 Network based USBKey reusing method and client
CN105391652A (en) * 2015-12-03 2016-03-09 武汉噢易云计算有限公司 USB equipment network sharing system and method based on USB redirection
CN105426732A (en) * 2015-11-11 2016-03-23 北京市国路安信息技术股份有限公司 Network based USBKey multiplexing method and network remote end
CN105426733A (en) * 2015-11-11 2016-03-23 北京市国路安信息技术股份有限公司 Network based USBKey multiplexing method and system
CN105872096A (en) * 2016-06-02 2016-08-17 江苏辰云信息科技有限公司 Far-end sharing system for external equipment
CN106101548A (en) * 2016-07-08 2016-11-09 北京国电通网络技术有限公司 A kind of method and apparatus of cloud terminal processes camera video data
CN107203409A (en) * 2017-04-10 2017-09-26 成都长天信息技术有限公司 A kind of USB re-orientation processes method and system
CN108205504A (en) * 2016-12-16 2018-06-26 广州杰赛科技股份有限公司 Terminal USB mapping methods, virtual machine USB mapping methods and system
CN108491347A (en) * 2018-04-02 2018-09-04 联想(北京)有限公司 Communication means and electronic equipment
CN109284170A (en) * 2018-09-11 2019-01-29 山东观海数据技术有限公司 USB shared system and sharing method in a kind of local area network
CN109597775A (en) * 2018-12-11 2019-04-09 郑州云海信息技术有限公司 A kind of method and device using USB device
CN109634668A (en) * 2018-10-30 2019-04-16 山东超越数控电子股份有限公司 A method of USB device is shared under acceptance of the bid kylin operating system
CN112506818A (en) * 2020-12-08 2021-03-16 中国电子科技集团公司第三十研究所 USB hardware virtualization method based on software simulation
CN113687910A (en) * 2021-07-29 2021-11-23 广东浪潮智慧计算技术有限公司 Method, device, equipment and storage medium for managing USB (universal serial bus) equipment in cluster
US11477304B2 (en) 2018-01-30 2022-10-18 Hewlett-Packard Development Company, L.P. Conversion to an internet protocol stream
CN115391255A (en) * 2022-10-27 2022-11-25 北京恩威特科技有限公司 High-availability USB equipment sharing server
CN116955236A (en) * 2023-09-20 2023-10-27 元内核(北京)科技有限公司 USB device sharing method and system based on virtualization

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101035039A (en) * 2007-04-20 2007-09-12 福建升腾资讯有限公司 USB mapping method
CN101059791A (en) * 2006-04-21 2007-10-24 英业达股份有限公司 Dummy general serial bus apparatus system and its data transmission method
CN101488941A (en) * 2008-01-18 2009-07-22 中兴通讯股份有限公司 Method and system for implementing USB equipment shared using
US20110202625A1 (en) * 2010-02-18 2011-08-18 Walton Advanced Engineering Inc. Storage device, system and method for data share

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101059791A (en) * 2006-04-21 2007-10-24 英业达股份有限公司 Dummy general serial bus apparatus system and its data transmission method
CN101035039A (en) * 2007-04-20 2007-09-12 福建升腾资讯有限公司 USB mapping method
CN101488941A (en) * 2008-01-18 2009-07-22 中兴通讯股份有限公司 Method and system for implementing USB equipment shared using
US20110202625A1 (en) * 2010-02-18 2011-08-18 Walton Advanced Engineering Inc. Storage device, system and method for data share

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
余圣永: "基于远程控制的虚拟USB设备的设计与实现", 《万方学术期刊数据库》 *

Cited By (33)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102882871A (en) * 2012-09-28 2013-01-16 深圳市赛蓝科技有限公司 Mobile terminal USB (universal serial bus) virtualized mapping method
CN103873537A (en) * 2012-12-18 2014-06-18 无锡中科物联网基础软件研发中心有限公司 Remote sharing method and system for USB (Universal Serial Bus) device
CN103312781A (en) * 2013-05-15 2013-09-18 山东超越数控电子有限公司 Implementation method of virtual USB (Universal Serial Bus)
CN103475650A (en) * 2013-08-30 2013-12-25 深圳Tcl新技术有限公司 Data processing method and device based on wireless communication protocol
CN103618780B (en) * 2013-11-22 2017-10-10 华为技术有限公司 A kind of method and device for realizing multi-dummy machine carry external components
CN103618780A (en) * 2013-11-22 2014-03-05 华为技术有限公司 Method and device for realizing multiple virtual machine mounted externally-arranged components
CN103618752A (en) * 2013-12-18 2014-03-05 广东中科遥感技术有限公司 Virtual machine remote desktop safety access system and method
CN103618752B (en) * 2013-12-18 2017-10-10 广东中科遥感技术有限公司 A kind of virtual machine remote desktop safety accesses system and method
CN105100006A (en) * 2014-05-07 2015-11-25 杭州迪普科技有限公司 Proxy service device and remote control device and method
CN104317759A (en) * 2014-10-15 2015-01-28 国云科技股份有限公司 Method for supporting hot plugging of virtual machine USB (universal serial bus) storage equipment
CN105376228A (en) * 2015-11-11 2016-03-02 北京市国路安信息技术股份有限公司 Network based USBKey reusing method and client
CN105426733A (en) * 2015-11-11 2016-03-23 北京市国路安信息技术股份有限公司 Network based USBKey multiplexing method and system
CN105426732A (en) * 2015-11-11 2016-03-23 北京市国路安信息技术股份有限公司 Network based USBKey multiplexing method and network remote end
CN105391652A (en) * 2015-12-03 2016-03-09 武汉噢易云计算有限公司 USB equipment network sharing system and method based on USB redirection
CN105872096B (en) * 2016-06-02 2019-03-05 无锡辰云科技股份有限公司 A kind of distal end shared system of external equipment
CN105872096A (en) * 2016-06-02 2016-08-17 江苏辰云信息科技有限公司 Far-end sharing system for external equipment
CN106101548A (en) * 2016-07-08 2016-11-09 北京国电通网络技术有限公司 A kind of method and apparatus of cloud terminal processes camera video data
CN108205504A (en) * 2016-12-16 2018-06-26 广州杰赛科技股份有限公司 Terminal USB mapping methods, virtual machine USB mapping methods and system
CN107203409A (en) * 2017-04-10 2017-09-26 成都长天信息技术有限公司 A kind of USB re-orientation processes method and system
CN107203409B (en) * 2017-04-10 2020-10-30 成都长天信息技术有限公司 USB redirection processing method and system
US11477304B2 (en) 2018-01-30 2022-10-18 Hewlett-Packard Development Company, L.P. Conversion to an internet protocol stream
CN108491347A (en) * 2018-04-02 2018-09-04 联想(北京)有限公司 Communication means and electronic equipment
CN109284170A (en) * 2018-09-11 2019-01-29 山东观海数据技术有限公司 USB shared system and sharing method in a kind of local area network
CN109284170B (en) * 2018-09-11 2021-10-26 山东观海数据技术有限公司 USB sharing system and sharing method in local area network
CN109634668A (en) * 2018-10-30 2019-04-16 山东超越数控电子股份有限公司 A method of USB device is shared under acceptance of the bid kylin operating system
CN109597775A (en) * 2018-12-11 2019-04-09 郑州云海信息技术有限公司 A kind of method and device using USB device
CN112506818B (en) * 2020-12-08 2022-05-31 中国电子科技集团公司第三十研究所 USB hardware virtualization method based on software simulation
CN112506818A (en) * 2020-12-08 2021-03-16 中国电子科技集团公司第三十研究所 USB hardware virtualization method based on software simulation
CN113687910A (en) * 2021-07-29 2021-11-23 广东浪潮智慧计算技术有限公司 Method, device, equipment and storage medium for managing USB (universal serial bus) equipment in cluster
CN115391255A (en) * 2022-10-27 2022-11-25 北京恩威特科技有限公司 High-availability USB equipment sharing server
CN115391255B (en) * 2022-10-27 2023-01-31 北京恩威特科技有限公司 High-availability USB equipment sharing server
CN116955236A (en) * 2023-09-20 2023-10-27 元内核(北京)科技有限公司 USB device sharing method and system based on virtualization
CN116955236B (en) * 2023-09-20 2023-12-12 元内核(北京)科技有限公司 USB device sharing method and system based on virtualization

Also Published As

Publication number Publication date
CN102523264B (en) 2014-07-02

Similar Documents

Publication Publication Date Title
CN102523264B (en) USB (Universal Serial Bus) equipment remote sharing method and system for virtual machine
US10698717B2 (en) Accelerator virtualization method and apparatus, and centralized resource manager
US9882985B1 (en) Data storage path optimization for internet of things computing system
CN103999031B (en) The virtual privately owned storage array service of Cloud Server
CN106301859B (en) Method, device and system for managing network card
CN103530167A (en) Virtual machine memory data migration method and relevant device and cluster system
CN103677858A (en) Method, system and device for managing virtual machine software in cloud environment
US20090307330A1 (en) Method for Moving Operating Systems Between Computer Electronic Complexes Without Loss of Service
KR20200078382A (en) Solid-state drive with initiator mode
CN104603739A (en) Block-level access to parallel storage
CN111049686B (en) Safety protection virtual laboratory of power monitoring system and construction method thereof
CN102316043B (en) Port virtualization method, switch and communication system
CN105391652A (en) USB equipment network sharing system and method based on USB redirection
CN103942087A (en) Virtual machine thermal migration method, related device and cluster computing system
US9336032B2 (en) Zoning data to a virtual machine
US8849905B2 (en) Centralized computing
CN104901923A (en) Virtual machine access device and method
CN104486234A (en) Method and server for uninstalling service exchanger to physical network card
CN105446813A (en) Resource distribution method and device
CN104283959A (en) Performance-grading-based storage mechanism suitable for cloud platform
CN111026510A (en) Cross-storage thermal migration method for virtual machine in cloud environment
CN104731635A (en) Virtual machine access control method and virtual machine access control system
CN103823638A (en) Virtual equipment access method and device
CN108540408B (en) Openstack-based distributed virtual switch management method and system
CN114510321A (en) Resource scheduling method, related device and medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140702

Termination date: 20171206

CF01 Termination of patent right due to non-payment of annual fee