CN110245000A - A kind of is the method and apparatus of KVM virtual machine configuration USB device in OpenStack - Google Patents

A kind of is the method and apparatus of KVM virtual machine configuration USB device in OpenStack Download PDF

Info

Publication number
CN110245000A
CN110245000A CN201910281658.7A CN201910281658A CN110245000A CN 110245000 A CN110245000 A CN 110245000A CN 201910281658 A CN201910281658 A CN 201910281658A CN 110245000 A CN110245000 A CN 110245000A
Authority
CN
China
Prior art keywords
virtual machine
usb device
configuration
openstack
kvm
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
Application number
CN201910281658.7A
Other languages
Chinese (zh)
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.)
Yangtze Optical Fibre and Cable Co Ltd
Original Assignee
Yangtze Optical Fibre and Cable Co Ltd
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 Yangtze Optical Fibre and Cable Co Ltd filed Critical Yangtze Optical Fibre and Cable Co Ltd
Priority to CN201910281658.7A priority Critical patent/CN110245000A/en
Publication of CN110245000A publication Critical patent/CN110245000A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45579I/O management, e.g. providing access to device drivers or storage

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

It is the method and apparatus of KVM virtual machine configuration USB device that the invention discloses a kind of in OpenStack, the following steps are included: 1) according to the operation flow of the starting virtual machine of OpenStack, during configuring KVM virtual machine facility, increase the method for configuration USB device;And model, startport, index parameter of USB device are configured in the method;2) method for calling configuration USB device, configuration USB device mode model are nec-xhci;3) KVM virtual machine facility is configured, the method for PCI allocation equipment is increased;And the model and index parameter of PCI allocation equipment in the method;4) step 1) is completed to 3) with postponing, and the xml document of configuration KVM virtual machine is generated by the follow-up process of OpenStack, which is exported and generate KVM virtual machine according to configuration information to libvirt, libvirt by OpenStack;5) according to the operating system of virtual machine, the drive software of USB3.0 is supported in installation in virtual machine.It is the feasible method of KVM virtual machine configuration USB device that the present invention provides a kind of in OpenStack.

Description

A kind of is the method and apparatus of KVM virtual machine configuration USB device in OpenStack
Technical field
The present invention relates to cloud computing technologies, more particularly to one kind is KVM virtual machine configuration USB device in OpenStack Method and apparatus.
Background technique
OpenStack is the open source cloud computing framework being most widely used at present, and still in continuous development and perfect Among.Cloud desktop is a kind of application mode of cloud computing, it is convenient for safeguarding, and Information Security is higher, is a kind of very popular Application mode.Not perfect to the support of cloud desktop application scene at present in OpenStack, the virtual machine of cloud desktop can not The USB device of client is penetrated into cloud desktop, or allow cloud desktop virtual machine operations USB device in data.
Summary of the invention
The technical problem to be solved in the present invention is that for the defects in the prior art, providing one kind in OpenStack For the method and apparatus of KVM virtual machine configuration USB device.
The technical solution adopted by the present invention to solve the technical problems is: one kind is matched in OpenStack for KVM virtual machine The method for setting USB device, comprising the following steps:
1) increased during configuring KVM virtual machine facility according to the operation flow of the starting virtual machine of OpenStack Add the method for configuration USB device;And model, startport, index parameter of USB device are configured in the method;
2) method for calling configuration USB device, configuration USB device mode model are nec-xhci;
3) KVM virtual machine facility is configured, the method for PCI allocation equipment is increased;And PCI allocation equipment in the method Model and index parameter;
4) step 1) is completed to 3) with postponing, and the xml of configuration KVM virtual machine is generated by the follow-up process of OpenStack The xml document is exported and generates KVM virtual machine according to configuration information to libvirt, libvirt by file, OpenStack;
5) according to the operating system of virtual machine, the drive software of USB3.0 is supported in installation in virtual machine.
A kind of is the device of KVM virtual machine configuration USB device in OpenStack, comprising:
USB device increases module, virtual in configuration KVM for the operation flow for starting virtual machine according to OpenStack During machine equipment, increase the method for configuration USB device;And in the method configure USB device model, Startport, index parameter;
USB device configuration module, the method for calling configuration USB device, configuration USB device mode model are nec- xhci;
Device PCI increases module, for configuring KVM virtual machine facility, increases the method for PCI allocation equipment;And in the party Model the and index parameter of PCI allocation equipment in method;
KVM virtual machine module, for generating the xml document of configuration KVM virtual machine, OpenStack exports the xml document KVM virtual machine is generated according to configuration information to libvirt, libvirt;
Drive module, for the operating system according to virtual machine, the drive software of USB3.0 is supported in installation in virtual machine.
The beneficial effect comprise that: the present invention provides a kind of methods, so that the virtual machine of cloud desktop is starting In the process, the equipment for having automatically configured USB, when user uses spice agreement or windows Remote Desktop Protocol, USB2.0 USB3.0 equipment in client can be penetrated on the desktop in cloud.
Detailed description of the invention
Present invention will be further explained below with reference to the attached drawings and examples, in attached drawing:
Fig. 1 is the method flow diagram of the embodiment of the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to embodiments, to the present invention It is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, is not used to limit The fixed present invention.
As shown in Figure 1, a kind of is the method for KVM virtual machine configuration USB device in OpenStack,
By the analysis to source code, it is known that in the operation flow of OpenStack ,/nova/virt/libvirt/ The attribute that the required all virtual units and these equipment of config.py document definition have;/nova/virt/ Libvirt/driver.py document definition, it should those categories should be used using which kind of equipment and equipment to virtual machine Property.OpenStack is equipment needed for configuring virtual machine by xml document.In order to give virtual machine configuration USB device, it is also necessary to Increase device PCI in virtual machine.For USB device, needing to be arranged its model is " nec-xhci ", can be supported USB3.0 equipment.Finally complete xml document is exported, virtual machine is generated according to configuration file to libvirt, libvirt.For The windows virtual machine is enabled to drive USB3.0 equipment, it is also necessary to which the drive of USB3.0 is installed in Windows operating system Dynamic program.It checks the virtual machine generated, has USB3.0 and device PCI in discovering device list;It is inserted on a client The equipment of USB3.0 or USB2.0, cloud desktop client can identify the equipment, and operate to the equipment.
Specific step is as follows for this method:
1) increase add_usb_driver method in/nova/virt/libvirt/driver.py file, in this method The model of middle configuration USB device, startport, index parameter.
2) increase LibvirtConfigGuestUSB class in/nova/virt/libvirt/config.py file, The attribute that USB device is defined in such includes: type=usb, index, model, startport.
3) add_usb_driver method is called in _ get_guest_config method, and model=" nec- is set Xhci ", startport=None, index=0.
4) increase add_pci_driver method in/nova/virt/libvirt/driver.py file, in this method Type, index, model parameter of middle PCI allocation equipment.
5) increase confGuestPCI class in/nova/virt/libvirt/config.py file, defined in such Type, index, model attribute.
6) add_pci_driver method is called in _ get_guest_config method, and type=pci, index are set =0, model=' pci-root '.
7) follow-up process of OpenStack will generate the xml document of configuration KVM virtual machine, and OpenStack is by the xml File, which is exported, generates KVM virtual machine according to configuration file to libvirt, libvirt.
8) driver of USB3.0 is installed in an operating system, the hardware for enabling operating system to drive USB3.0 is set It is standby.
According to above method, it is the dress of KVM virtual machine configuration USB device in OpenStack that we, which are easy to get a kind of, It sets, comprising:
USB device increases module, virtual in configuration KVM for the operation flow for starting virtual machine according to OpenStack During machine equipment, increase the method for configuration USB device;And in the method configure USB device model, Startport, index parameter;
USB device configuration module, the method for calling configuration USB device, configuration USB device mode model are nec- xhci;
Device PCI increases module, for configuring KVM virtual machine facility, increases the method for PCI allocation equipment;And in the party Model the and index parameter of PCI allocation equipment in method;
KVM virtual machine module, for generating the xml document of configuration KVM virtual machine, OpenStack exports the xml document KVM virtual machine is generated according to configuration information to libvirt, libvirt;
Drive module, for the operating system according to virtual machine, the drive software of USB3.0 is supported in installation in virtual machine.
It should be understood that for those of ordinary skills, it can be modified or changed according to the above description, And all these modifications and variations should all belong to the protection domain of appended claims of the present invention.

Claims (2)

1. a kind of is the method for KVM virtual machine configuration USB device in OpenStack, which comprises the following steps:
1) according to the operation flow of the starting virtual machine of OpenStack, during configuring KVM virtual machine facility, increase is matched The method for setting USB device;And model, startport, index parameter of USB device are configured in the method;
2) method for calling configuration USB device, configuration USB device mode model are nec-xhci;
3) KVM virtual machine facility is configured, the method for PCI allocation equipment is increased;And the model of PCI allocation equipment in the method With index parameter;
4) step 1) is completed to 3) with postponing, and the xml document of configuration KVM virtual machine is generated by the follow-up process of OpenStack, The xml document is exported and generates KVM virtual machine according to configuration information to libvirt, libvirt by OpenStack;
5) according to the operating system of virtual machine, the drive software of USB3.0 is supported in installation in virtual machine.
2. a kind of is the device of KVM virtual machine configuration USB device in OpenStack characterized by comprising
USB device increases module, for the operation flow for starting virtual machine according to OpenStack, sets in configuration KVM virtual machine In standby process, increase the method for configuration USB device;And in the method configure USB device model, startport, Index parameter;
USB device configuration module, the method for calling configuration USB device, configuration USB device mode model are nec-xhci;
Device PCI increases module, for configuring KVM virtual machine facility, increases the method for PCI allocation equipment;And in the method Model the and index parameter of PCI allocation equipment;
KVM virtual machine module, for generate configuration KVM virtual machine xml document, OpenStack by the xml document export to Libvirt, libvirt generate KVM virtual machine according to configuration information;
Drive module, for the operating system according to virtual machine, the drive software of USB3.0 is supported in installation in virtual machine.
CN201910281658.7A 2019-04-09 2019-04-09 A kind of is the method and apparatus of KVM virtual machine configuration USB device in OpenStack Pending CN110245000A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910281658.7A CN110245000A (en) 2019-04-09 2019-04-09 A kind of is the method and apparatus of KVM virtual machine configuration USB device in OpenStack

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910281658.7A CN110245000A (en) 2019-04-09 2019-04-09 A kind of is the method and apparatus of KVM virtual machine configuration USB device in OpenStack

Publications (1)

Publication Number Publication Date
CN110245000A true CN110245000A (en) 2019-09-17

Family

ID=67883068

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910281658.7A Pending CN110245000A (en) 2019-04-09 2019-04-09 A kind of is the method and apparatus of KVM virtual machine configuration USB device in OpenStack

Country Status (1)

Country Link
CN (1) CN110245000A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112596859A (en) * 2020-12-25 2021-04-02 创新科技术有限公司 USB transparent transmission method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106250203A (en) * 2016-07-19 2016-12-21 浪潮(北京)电子信息产业有限公司 A kind of method and device of KVM virtual machine identification USB flash disk
CN107317847A (en) * 2017-06-13 2017-11-03 广东瑞恩科技有限公司 Based on the method that local client hardware resource is utilized in cloud desktop KVM virtualization
US20180173516A1 (en) * 2016-12-21 2018-06-21 Quanta Computer Inc. System and method for remotely updating firmware

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106250203A (en) * 2016-07-19 2016-12-21 浪潮(北京)电子信息产业有限公司 A kind of method and device of KVM virtual machine identification USB flash disk
US20180173516A1 (en) * 2016-12-21 2018-06-21 Quanta Computer Inc. System and method for remotely updating firmware
CN107317847A (en) * 2017-06-13 2017-11-03 广东瑞恩科技有限公司 Based on the method that local client hardware resource is utilized in cloud desktop KVM virtualization

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WEIXIN_33756418: "Openstack云计算(一):kvm虚拟机配置", 《CSDN》 *
张义和: "《数字跟踪技术》", 31 January 2012, 北京航空航天大学出版社 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112596859A (en) * 2020-12-25 2021-04-02 创新科技术有限公司 USB transparent transmission method and device

Similar Documents

Publication Publication Date Title
CN109670297B (en) Method and device for opening service permission, storage medium and electronic equipment
US10768827B2 (en) Performance throttling of virtual drives
US20180315024A1 (en) Systems and Methods Enabling Secure Transactions from Terminal Window
US9712605B2 (en) Method and system for providing server virtual machine for real-time virtual desktop service, and server device supporting the same
CN107844243A (en) Cloud tabletop touch implementation method and device
US11669377B2 (en) Providing application programming interface endpoints for machine learning models
CN113811856B (en) Application with self-configuring accessibility settings
US10908970B1 (en) Data interface for secure analytic data system integration
US20230120160A1 (en) Authentication aggregator
CN104572227A (en) Method for refreshing CPLD FW through BMC based on Itanium platform
US20100077090A1 (en) Fast switching between multiple user sessions
CN105099997A (en) Virtual infrastructure-based multimedia desktop delivery method and system
US10318343B2 (en) Migration methods and apparatuses for migrating virtual machine including locally stored and shared data
CN108875011B (en) Method, device, equipment and medium for acquiring page state information of third-party application
CN111158857B (en) Data encryption method, device, equipment and storage medium
JP7393468B2 (en) Data synchronization methods, devices, electronic devices, storage media and computer programs
US11734032B1 (en) Virtual desktop switching and communications
CN110245000A (en) A kind of is the method and apparatus of KVM virtual machine configuration USB device in OpenStack
CN114995888A (en) Intelligent network card deployment method, device and medium
CN111078424A (en) Information interaction method and device, computer equipment and storage medium
CN103399788A (en) Cross-application control method and system for intelligent terminal
WO2018112772A1 (en) Method and apparatus for operating another operating system and electronic device
CN109583182B (en) Method and device for starting remote desktop, electronic equipment and computer storage medium
CN104219097A (en) Rapid configuration method of distributed system
CN116149639A (en) Method and device for developing components, electronic equipment and storage medium

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: 20190917