CN110413376A - A kind of method, equipment and the storage medium of Virtual Machine Manager USB device - Google Patents
A kind of method, equipment and the storage medium of Virtual Machine Manager USB device Download PDFInfo
- Publication number
- CN110413376A CN110413376A CN201910629724.5A CN201910629724A CN110413376A CN 110413376 A CN110413376 A CN 110413376A CN 201910629724 A CN201910629724 A CN 201910629724A CN 110413376 A CN110413376 A CN 110413376A
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- usb device
- information
- database
- corresponding usb
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000003860 storage Methods 0.000 title claims abstract description 32
- 230000004044 response Effects 0.000 claims abstract description 9
- 238000013507 mapping Methods 0.000 claims description 17
- 238000004590 computer program Methods 0.000 claims description 15
- 238000012217 deletion Methods 0.000 claims 1
- 230000037430 deletion Effects 0.000 claims 1
- 230000006870 function Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 239000011800 void material Substances 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000005611 electricity Effects 0.000 description 2
- 239000003550 marker Substances 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 230000004069 differentiation Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 238000010304 firing Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000004321 preservation Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/382—Information transfer, e.g. on bus using universal interface adapter
- G06F13/385—Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45575—Starting, stopping, suspending or resuming virtual machine instances
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45579—I/O management, e.g. providing access to device drivers or storage
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0042—Universal serial bus [USB]
Abstract
The invention discloses a kind of methods of Virtual Machine Manager USB device, comprising steps of obtaining the information and the information for the USB device being mounted on the virtual machine of virtual machine;The information of the virtual machine is associated in the database with the information of the corresponding USB device;The instruction that the virtual machine is restarted in response to receiving inquires the database to obtain the information of the corresponding USB device of the virtual machine;The USB device is mounted to the virtual machine after restarting again according to the information of the corresponding USB device.The invention also discloses a kind of computer equipment and readable storage medium storing program for executing.Method disclosed by the invention is by the way that the information for the USB device being mounted on virtual machine and corresponding virtual machine information to be recorded in database, when progress virtual machine is restarted, corresponding information can be inquired, to obtain the USB device of virtual machine carry, and then the USB device that front mount is restarted in virtual machine continuation is mounted on virtual machine again.
Description
Technical field
The present invention relates to virtual machine fields, and in particular to a kind of method, equipment and the storage of Virtual Machine Manager USB device
Medium.
Background technique
As intel Virtualization Technology application is more and more extensive, in every field, virtual machine also replaces physical machine to run one gradually
A little business, when the business run on virtual machine is more and more, people couple and the requirement of virtual machine are also higher and higher, on the one hand include
On the other hand configuration, performance of virtual machine etc. can desirably use some usb mobile device carries to virtual machine,
Many aspects will all become very convenient since in this way, if for example, people are intended to the file copy inside u disk to virtual machine
On, it is only necessary to USB flash disk is inserted on the host where virtual machine, it, thus can be in virtual machine then by USB flash disk carry to virtual machine
In the file in USB flash disk is written and read.Current openstack virtual machine carry usb equipment is mainly based upon libvirt offer
What api interface was realized, since openstack is after carrying out reboot operation to virtual machine, hung over before to the usb equipment of virtual machine
It can be unloaded by libvirt, after causing openstack to restart virtual machine, the usb equipment of carry does not come into force.And Current protocols without
Method inquires the USB device list of virtual machine carry, and the usb equipment of virtual machine carry can not be also discharged when deleting virtual machine.
Therefore, it is badly in need of a kind of method of management management USB device.
Summary of the invention
In view of this, at least one aspect in order to overcome the above problem, the embodiment of the present invention propose a kind of virtual machine
The method for managing USB device, comprising steps of
Obtain the information and the information for the USB device being mounted on the virtual machine of virtual machine;
The information of the virtual machine is associated in the database with the information of the corresponding USB device;
The instruction that the virtual machine is restarted in response to receiving, it is corresponding to obtain the virtual machine to inquire the database
The information of the USB device;
The USB device is mounted to the virtual machine after restarting again according to the information of the corresponding USB device.
In some embodiments, the information of the virtual machine and the USB device being mounted on the virtual machine are obtained
Information, further comprise:
Obtain the ID of the virtual machine and the product IDs of the USB device being mounted on the virtual machine and manufacturer
ID。
In some embodiments, in the database by the information of the virtual machine and the information of the corresponding USB device
Association further comprises:
Establish the mapping table of the virtual machine with the corresponding USB device;
The product IDs and vendor id of the ID of the virtual machine and the corresponding USB device are added to the mapping table
In.
In some embodiments, the instruction that the virtual machine is restarted in response to receiving inquires the database to obtain
The information of the corresponding USB device of the virtual machine further comprises:
The instruction that the virtual machine is restarted in response to receiving is inquired using the ID of the virtual machine and obtains the mapping
The product IDs and vendor id of the corresponding USB device in table.
In some embodiments, the USB device is mounted to according to the information of the corresponding USB device again and is restarted
The virtual machine afterwards further comprises:
The information of the corresponding USB device is added in the configuration file loaded when the virtual machine is restarted.
In some embodiments, further comprise:
XML file is generated according to the configuration file;
The XML file is sent to Virtual Machine Manager tool, to restart the virtual machine.
In some embodiments, further comprise:
The instruction for deleting the virtual machine is received, corresponding erasing time is recorded in the mapping table, and modify and delete
Except flag bit.
In some embodiments, further comprise: obtaining the corresponding institute of the virtual machine deleted according to the mapping table
The information for stating USB device discharges corresponding USB device.
Based on the same inventive concept, according to another aspect of the present invention, the embodiments of the present invention also provide a kind of meters
Calculate machine equipment, comprising:
At least one processor;And
Memory, the memory are stored with the computer program that can be run on the processor, which is characterized in that institute
State the step of executing the method for any Virtual Machine Manager USB device as described above when processor executes described program.
Based on the same inventive concept, according to another aspect of the present invention, the embodiments of the present invention also provide a kind of meters
Calculation machine readable storage medium storing program for executing, the computer-readable recording medium storage have computer program, and the computer program is processed
The step of method of any Virtual Machine Manager USB device as described above is executed when device executes.
The present invention has one of following advantageous effects: method disclosed by the invention will be by that will be mounted on virtual machine
The information of USB device and corresponding virtual machine information are recorded in database, when progress virtual machine is restarted, can inquire phase
The information answered, to obtain the USB device of virtual machine carry, and then the USB device that front mount will be restarted in virtual machine continues
Again it is mounted on virtual machine.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
Other embodiments are obtained according to these attached drawings.
Fig. 1 is a kind of flow diagram of the method for Virtual Machine Manager USB device that the embodiment of the present invention provides;
Fig. 2 is a kind of flow diagram of the method for Virtual Machine Manager USB device that the embodiment of the present invention provides;
Fig. 3 is the structural schematic diagram for the computer equipment that the embodiment of the present invention provides;
Fig. 4 is the structural schematic diagram for the computer readable storage medium that the embodiment of the present invention provides.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with specific embodiment, and reference
The embodiment of the present invention is further described in attached drawing.
It should be noted that all statements for using " first " and " second " are for differentiation two in the embodiment of the present invention
The non-equal entity of a same names or non-equal parameter, it is seen that " first " " second " only for the convenience of statement, does not answer
It is interpreted as the restriction to the embodiment of the present invention, subsequent embodiment no longer illustrates this one by one.
It should be noted that in an embodiment of the present invention, openstack is that a kind of cloud computing manages platform, libvirt
For a kind of Virtual Machine Manager tool.
According to an aspect of the present invention, a kind of method that the embodiment of the present invention proposes Virtual Machine Manager USB device, such as
May include step shown in Fig. 1: S1 obtains the information of virtual machine and the letter for the USB device being mounted on the virtual machine
Breath;The information of the virtual machine is associated with by S2 in the database with the information of the corresponding USB device;S3, in response to receiving
To the instruction for restarting the virtual machine, the database is inquired to obtain the information of the corresponding USB device of the virtual machine;
The USB device is mounted to the virtual machine after restarting according to the information of the corresponding USB device by S4 again.
Method disclosed by the invention passes through the information and corresponding virtual machine letter for the USB device that will be mounted on virtual machine
Breath is associated in the database, when carrying out virtual machine and restarting, corresponding information can be inquired, to obtain virtual machine carry
USB device, and then the USB device that front mount is restarted in virtual machine continuation is mounted on virtual machine again.
Below with reference to Fig. 2 shows the flow diagram of method of Virtual Machine Manager USB device be described in detail.
Firstly, it is necessary to obtain the information of the virtual machine and the information for the USB device being mounted on the virtual machine.
It should be noted that the information of the USB device being mounted on the virtual machine obtained is successfully to have hung
It is downloaded to the information of the USB device on virtual machine, for example, can pass through after user starts virtual machine by virtual machine management platform
USB list selects to give the virtual machine carry which USB device, and by these USB device carries on a virtual machine after, obtain these
The information of USB device.Or it can also be that user reselects the information for needing to be mounted to the USB device on virtual machine.
In some embodiments, the information of virtual machine can be the ID of virtual machine, and the information of USB device can be USB and set
Standby product IDs and vendor id.
Then, by the information of the virtual machine and the information preservation of the corresponding USB device to database and in data
It is associated in library.
In some embodiments, the mapping table of virtual machine with corresponding USB device can be established in the database, then will
The product IDs and vendor id of the ID of the virtual machine and the corresponding USB device are added in the mapping table, and record more
The new time.
Specifically, can create the table of a virtual machine carry USB device in nova_api database, essential record is empty
The map information of quasi- machine and USB device, and a series of interfaces such as increase, modification, inquiry are provided to nova to operate the table, such as
Say carry USB success after, create interface can be called to create a record in the table, can also by query interface according to
Virtual machine ID inquires the USB device list of carry on virtual machine.The interaction of nova and libvirt is mainly libvirt externally sudden and violent
The api of dew is realized.
Through the above steps, the mapping relations between virtual machine and corresponding USB device are had recorded, if subsequent to void
Quasi- machine carries out reboot operation, can by inquiring the virtual machine which USB device of carry before restarting can be obtained in mapping table,
And these USB devices of carry again.
Then, the instruction that the virtual machine is restarted in response to receiving inquires the database to obtain the virtual machine
The information of the corresponding USB device.
In some embodiments, it can be inquired according to the ID of virtual machine and obtain the corresponding USB in the mapping table
The product IDs and vendor id of equipment.
Finally, the USB device to be mounted to the void after restarting again according to the information of the corresponding USB device
Quasi- machine.
In some embodiments, the information for the corresponding USB device that will acquire is added to the virtual machine and restarts
When the configuration file that loads in.Then XML file is generated according to the configuration file, the XML file is finally sent to void
Quasi- machine management tool, to restart the virtual machine.
Specifically, OpenStack has a loaded virtual machine to configure before calling libvirt driver to restart virtual machine
The operation of information inquires database by virtual machine ID when loaded virtual machine configuration, finds the USB of carry on virtual machine
Then the USB device information of virtual machine is added in virtual machine configuration, is then generated according to configuration file by facility information
Xml document is issued libvirt starting virtual machine by xml document.
In some embodiments, the instruction for deleting the virtual machine is received, corresponding delete is recorded in the mapping table
Except the time, and modify deleted marker position.
It should be noted that virtual machine is even deleted, the record of corresponding virtual machine and USB device in mapping table
It not will be deleted, it is deleted simply by modification deleted marker position surface virtual machine, at this moment, it can reflected according to described
Firing table obtains the information for the corresponding USB device of the virtual machine deleted, and discharges corresponding USB device.
Method disclosed by the invention passes through the information and corresponding virtual machine letter for the USB device that will be mounted on virtual machine
Breath is recorded in database, when carrying out virtual machine and restarting, corresponding information can be inquired, to obtain virtual machine carry
USB device, and then the USB device that front mount is restarted in virtual machine continuation is mounted on virtual machine again.And it can also delete
Corresponding USB device is discharged when except virtual machine.
Based on the same inventive concept, according to another aspect of the present invention, as shown in figure 3, the embodiment of the present invention also mentions
Supply a kind of computer equipment 501, comprising:
At least one processor 520;And
Memory 510, memory 510 are stored with the computer program 511 that can be run on a processor, and processor 520 is held
The step of method of any Virtual Machine Manager USB device as above is executed when line program.
Based on the same inventive concept, according to another aspect of the present invention, as shown in figure 4, the embodiment of the present invention also mentions
A kind of computer readable storage medium 601 is supplied, computer readable storage medium 601 is stored with computer program instructions 610, meter
The step of method of any Virtual Machine Manager USB device as above is executed when calculation machine program instruction 610 is executed by processor.
Finally, it should be noted that those of ordinary skill in the art will appreciate that realizing the whole in above-described embodiment method
Or part process, related hardware can be instructed to complete by computer program, program to can be stored in one computer-readable
It takes in storage medium, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, storage medium
It can be magnetic disk, CD, read-only memory (ROM) or random access memory (RAM) etc..The implementation of above-mentioned computer program
Example, can achieve the identical or similar effect of corresponding aforementioned any means embodiment.
In addition, typically, device disclosed by the embodiments of the present invention, equipment etc. can be various electric terminal equipments, such as hand
Machine, personal digital assistant (PDA), tablet computer (PAD), smart television etc., are also possible to large-scale terminal device, such as server
Deng, therefore protection scope disclosed by the embodiments of the present invention should not limit as certain certain types of device, equipment.The present invention is implemented
Client disclosed in example, which can be, is applied to any one of the above electricity with the combining form of electronic hardware, computer software or both
In sub- terminal device.
In addition, disclosed method is also implemented as the computer program executed by CPU according to embodiments of the present invention, it should
Computer program may be stored in a computer readable storage medium.When the computer program is executed by CPU, the present invention is executed
The above-mentioned function of being limited in method disclosed in embodiment.
In addition, above method step and system unit also can use controller and for storing so that controller is real
The computer readable storage medium of the computer program of existing above-mentioned steps or Elementary Function is realized.
In addition, it should be appreciated that the computer readable storage medium (for example, memory) of this paper can be volatibility and deposit
Reservoir or nonvolatile memory, or may include both volatile memory and nonvolatile memory.As an example and
Unrestricted, nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM
(EPROM), electrically erasable programmable ROM (EEPROM) or flash memory.Volatile memory may include that arbitrary access is deposited
Reservoir (RAM), the RAM can serve as external cache.As an example and not restrictive, RAM can be with a variety of
Form obtains, such as synchronous random access memory (DRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate SDRAM (DDR
SDRAM), enhance SDRAM (ESDRAM), synchronization link DRAM (SLDRAM) and directly Rambus RAM (DRRAM).Institute is public
The storage equipment for the aspect opened is intended to the memory of including but not limited to these and other suitable type.
Those skilled in the art will also understand is that, various illustrative logical blocks, mould in conjunction with described in disclosure herein
Block, circuit and algorithm steps may be implemented as the combination of electronic hardware, computer software or both.It is hard in order to clearly demonstrate
This interchangeability of part and software, with regard to various exemplary components, square, module, circuit and step function to its into
General description is gone.This function is implemented as software and is also implemented as hardware depending on concrete application and application
To the design constraint of whole system.The function that those skilled in the art can realize in various ways for every kind of concrete application
Can, but this realization decision should not be interpreted as causing a departure from range disclosed by the embodiments of the present invention.
Various illustrative logical blocks, module and circuit, which can use, in conjunction with described in disclosure herein is designed to
The following component of function here is executed to realize or execute: general processor, digital signal processor (DSP), dedicated integrated electricity
It is road (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete
Any combination of hardware component or these components.General processor can be microprocessor, but alternatively, processor can
To be any conventional processors, controller, microcontroller or state machine.Processor also may be implemented as calculating the group of equipment
Close, for example, the combination of DSP and microprocessor, multi-microprocessor, one or more microprocessors combination DSP and/or it is any its
Its this configuration.
The step of method in conjunction with described in disclosure herein or algorithm, can be directly contained in hardware, be held by processor
In capable software module or in combination of the two.Software module may reside within RAM memory, flash memory, ROM storage
Device, eprom memory, eeprom memory, register, hard disk, removable disk, CD-ROM or known in the art it is any its
In the storage medium of its form.Illustrative storage medium is coupled to processor, enables a processor to from the storage medium
Information is written to the storage medium in middle reading information.In an alternative, storage medium can be integral to the processor
Together.Pocessor and storage media may reside in ASIC.ASIC may reside in user terminal.In an alternative
In, it is resident in the user terminal that pocessor and storage media can be used as discrete assembly.
In one or more exemplary designs, function can be realized in hardware, software, firmware or any combination thereof.
If realized in software, can using function as one or more instruction or code may be stored on the computer-readable medium or
It is transmitted by computer-readable medium.Computer-readable medium includes computer storage media and communication media, which is situated between
Matter includes any medium for helping for computer program to be transmitted to another position from a position.Storage medium can be energy
Any usable medium being enough accessed by a general purpose or special purpose computer.As an example and not restrictive, the computer-readable medium
It may include that RAM, ROM, EEPROM, CD-ROM or other optical disc memory apparatus, disk storage equipment or other magnetic storages are set
It is standby, or can be used for carrying or storage form be instruct or the required program code of data structure and can by general or
Special purpose computer or any other medium of general or specialized processor access.In addition, any connection can suitably claim
For computer-readable medium.For example, if using coaxial cable, optical fiber cable, twisted pair, digital subscriber line (DSL) or all
It is if the wireless technology of infrared ray, radio and microwave to send software from website, server or other remote sources, then above-mentioned coaxial
Cable, fiber optic cable, twisted pair, DSL or such as wireless technology of infrared ray, radio and microwave are included in determining for medium
Justice.As used herein, disk and CD include compact disk (CD), it is laser disk, CD, digital versatile disc (DVD), soft
Disk, Blu-ray disc, wherein disk usually magnetically reproduce data, and CD using laser optics reproduce data.Above content
Combination should also be as being included in the range of computer-readable medium.
It is exemplary embodiment disclosed by the invention above, it should be noted that in the sheet limited without departing substantially from claim
Under the premise of inventive embodiments scope of disclosure, it may be many modifications and modify.According to open embodiment described herein
The function of claim to a method, step and/or movement be not required to the execution of any particular order.In addition, although the present invention is implemented
Element disclosed in example can be described or be required in the form of individual, but be unless explicitly limited odd number, it is understood that be multiple.
It should be understood that it is used in the present context, unless the context clearly supports exceptions, singular " one
It is a " it is intended to also include plural form.It is to be further understood that "and/or" used herein refers to including one or one
Any and all possible combinations of a above project listed in association.
It is for illustration only that the embodiments of the present invention disclose embodiment sequence number, does not represent the advantages or disadvantages of the embodiments.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware
Complete, relevant hardware can also be instructed to complete by program, program can store in a kind of computer-readable storage
In medium, storage medium mentioned above can be read-only memory, disk or CD etc..
It should be understood by those ordinary skilled in the art that: the discussion of any of the above embodiment is exemplary only, not
It is intended to imply that range disclosed by the embodiments of the present invention (including claim) is limited to these examples;In the think of of the embodiment of the present invention
Under road, it can also be combined between the technical characteristic in above embodiments or different embodiments, and there is this hair as above
Many other variations of the different aspect of bright embodiment, for simplicity, they are not provided in details.Therefore, all in the present invention
Within the spirit and principle of embodiment, any omission, modification, equivalent replacement, improvement for being made etc. be should be included in of the invention real
It applies within the protection scope of example.
Claims (10)
1. a kind of method of Virtual Machine Manager USB device, comprising steps of
Obtain the information and the information for the USB device being mounted on the virtual machine of virtual machine;
The information of the virtual machine is associated in the database with the information of the corresponding USB device;
The instruction that the virtual machine is restarted in response to receiving, it is corresponding described to obtain the virtual machine to inquire the database
The information of USB device;
The USB device is mounted to the virtual machine after restarting again according to the information of the corresponding USB device.
2. the method as described in claim 1, which is characterized in that obtain the information of the virtual machine and be mounted to the virtual machine
On the USB device information, further comprise:
The product IDs and vendor id of the USB device for obtaining the ID of the virtual machine and being mounted on the virtual machine.
3. method according to claim 2, which is characterized in that by the information of the virtual machine and the corresponding USB device
Information be associated in the database, further comprise:
Establish the mapping table of the virtual machine with the corresponding USB device;
The product IDs and vendor id of the ID of the virtual machine and the corresponding USB device are added in the mapping table.
4. method as claimed in claim 3, which is characterized in that restart the instruction of the virtual machine in response to receiving, inquire
The database further comprises to obtain the information of the corresponding USB device of the virtual machine:
The instruction that the virtual machine is restarted in response to receiving is inquired using the ID of the virtual machine and is obtained in the mapping table
The product IDs and vendor id of the corresponding USB device.
5. method as claimed in claim 4, which is characterized in that set the USB according to the information of the corresponding USB device
It is standby to be mounted to the virtual machine after restarting again, further comprise:
The information of the corresponding USB device is added in the configuration file loaded when the virtual machine is restarted.
6. method as claimed in claim 5, which is characterized in that further comprise:
XML file is generated according to the configuration file;
The XML file is sent to Virtual Machine Manager tool, to restart the virtual machine.
7. method as claimed in claim 3, which is characterized in that further comprise:
The instruction for deleting the virtual machine is received, corresponding erasing time is recorded in the mapping table, and modifies deletion mark
Will position.
8. the method for claim 7, which is characterized in that further comprise: obtaining the institute deleted according to the mapping table
The information for stating the corresponding USB device of virtual machine, discharges corresponding USB device.
9. a kind of computer equipment, comprising:
At least one processor;And
Memory, the memory are stored with the computer program that can be run on the processor, which is characterized in that the place
Manage the method executed as described in claim 1-8 any one when device executes described program.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists
In perform claim requires method described in 1-8 any one when the computer program is executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910629724.5A CN110413376A (en) | 2019-07-12 | 2019-07-12 | A kind of method, equipment and the storage medium of Virtual Machine Manager USB device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910629724.5A CN110413376A (en) | 2019-07-12 | 2019-07-12 | A kind of method, equipment and the storage medium of Virtual Machine Manager USB device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110413376A true CN110413376A (en) | 2019-11-05 |
Family
ID=68361298
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910629724.5A Pending CN110413376A (en) | 2019-07-12 | 2019-07-12 | A kind of method, equipment and the storage medium of Virtual Machine Manager USB device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110413376A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110928644A (en) * | 2019-11-15 | 2020-03-27 | 北京浪潮数据技术有限公司 | USB management method, device, equipment and medium based on cloud platform |
CN111143265A (en) * | 2019-12-30 | 2020-05-12 | 锐捷网络股份有限公司 | Data transmission method and device based on virtual machine |
CN113282527A (en) * | 2021-05-08 | 2021-08-20 | 珠海金智维信息科技有限公司 | Method, device and host for realizing USB equipment switching management |
CN113791874A (en) * | 2021-11-16 | 2021-12-14 | 苏州浪潮智能科技有限公司 | Configuration method and device for virtual machine boot, computer equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090204965A1 (en) * | 2008-02-07 | 2009-08-13 | Youji Tanaka | Usb port shared control method |
US20120110574A1 (en) * | 2010-11-03 | 2012-05-03 | Agarwal Sumit Kumar | Methods and systems to clone a virtual machine instance |
CN105511936A (en) * | 2014-09-22 | 2016-04-20 | 北京奇虎科技有限公司 | Test system, method and device |
CN106168903A (en) * | 2016-06-30 | 2016-11-30 | 国云科技股份有限公司 | A kind of USB of management and the method being automatically mounted to virtual machine |
CN107341039A (en) * | 2016-04-28 | 2017-11-10 | 中兴通讯股份有限公司 | Method, main frame and the system being managed under a kind of virtual environment to USB device |
-
2019
- 2019-07-12 CN CN201910629724.5A patent/CN110413376A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090204965A1 (en) * | 2008-02-07 | 2009-08-13 | Youji Tanaka | Usb port shared control method |
US20120110574A1 (en) * | 2010-11-03 | 2012-05-03 | Agarwal Sumit Kumar | Methods and systems to clone a virtual machine instance |
CN105511936A (en) * | 2014-09-22 | 2016-04-20 | 北京奇虎科技有限公司 | Test system, method and device |
CN107341039A (en) * | 2016-04-28 | 2017-11-10 | 中兴通讯股份有限公司 | Method, main frame and the system being managed under a kind of virtual environment to USB device |
CN106168903A (en) * | 2016-06-30 | 2016-11-30 | 国云科技股份有限公司 | A kind of USB of management and the method being automatically mounted to virtual machine |
Non-Patent Citations (1)
Title |
---|
无: "Automatically connecting USB devices at virtual machine power on(1648)", 《HTTPS://KB.VMWARE.COM/S/ARTICLE/1648》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110928644A (en) * | 2019-11-15 | 2020-03-27 | 北京浪潮数据技术有限公司 | USB management method, device, equipment and medium based on cloud platform |
CN111143265A (en) * | 2019-12-30 | 2020-05-12 | 锐捷网络股份有限公司 | Data transmission method and device based on virtual machine |
CN111143265B (en) * | 2019-12-30 | 2022-09-20 | 锐捷网络股份有限公司 | Data transmission method and device based on virtual machine |
CN113282527A (en) * | 2021-05-08 | 2021-08-20 | 珠海金智维信息科技有限公司 | Method, device and host for realizing USB equipment switching management |
CN113791874A (en) * | 2021-11-16 | 2021-12-14 | 苏州浪潮智能科技有限公司 | Configuration method and device for virtual machine boot, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110413376A (en) | A kind of method, equipment and the storage medium of Virtual Machine Manager USB device | |
CN107870968B (en) | Performing real-time updates to a file system volume | |
US9870367B2 (en) | System and method of using data blocks to optimize file storage | |
US10120795B2 (en) | Wear-leveling nandflash memory reading/writing method | |
US10210191B2 (en) | Accelerated access to objects in an object store implemented utilizing a file storage system | |
WO2019166940A2 (en) | Transactional operations in multi-master distributed data management systems | |
JP4807683B2 (en) | Data storage | |
CN104020961A (en) | Distributed data storage method, device and system | |
EP1837783A1 (en) | Managing data in a file system | |
CN110245304B (en) | Data sharing method, device and computer readable medium | |
US10126969B1 (en) | Mechanism for non-disruptive virtual tape libraries removal and reconfiguration | |
EP3364303B1 (en) | Data arrangement method, storage apparatus, storage controller and storage array | |
US20180364915A1 (en) | Method and system for distributed storage using client-side global persistent cache | |
CN110442307A (en) | Binding method, equipment and the storage medium of disk in a kind of linux system | |
CN102272751A (en) | Data integrity in a database environment through background synchronization | |
CN105227672A (en) | The method and system that data store and access | |
CN110445841A (en) | A kind of method, equipment and the storage medium of cloud physics machine carry cloud disk | |
WO2023160289A1 (en) | Mini-program storage call | |
US20190087131A1 (en) | Mechanism for multiple coexisting configurations support in virtual tape applications | |
CN113806300A (en) | Data storage method, system, device, equipment and storage medium | |
US11157456B2 (en) | Replication of data in a distributed file system using an arbiter | |
CN115114232A (en) | Method, device and medium for enumerating historical version objects | |
US8595426B2 (en) | Handling commands within a write-once read-many storage device configuration | |
US11176089B2 (en) | Systems and methods for implementing dynamic file systems | |
JP2016515258A (en) | File aggregation for optimized file operation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20191105 |