WO2020057437A1 - 云平台的虚拟机管理方法及装置 - Google Patents

云平台的虚拟机管理方法及装置 Download PDF

Info

Publication number
WO2020057437A1
WO2020057437A1 PCT/CN2019/105681 CN2019105681W WO2020057437A1 WO 2020057437 A1 WO2020057437 A1 WO 2020057437A1 CN 2019105681 W CN2019105681 W CN 2019105681W WO 2020057437 A1 WO2020057437 A1 WO 2020057437A1
Authority
WO
WIPO (PCT)
Prior art keywords
license
virtual machine
software
operating system
image file
Prior art date
Application number
PCT/CN2019/105681
Other languages
English (en)
French (fr)
Inventor
罗思标
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP19863204.4A priority Critical patent/EP3846024B1/en
Priority to JP2021538884A priority patent/JP7137711B2/ja
Priority to SG11202102657VA priority patent/SG11202102657VA/en
Publication of WO2020057437A1 publication Critical patent/WO2020057437A1/zh
Priority to US17/202,806 priority patent/US20210224099A1/en
Priority to JP2022140158A priority patent/JP2022188026A/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • 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
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/105Arrangements for software license management or administration, e.g. for managing licenses at corporate level
    • 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/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • 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/45562Creating, deleting, cloning virtual machine instances
    • 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/45595Network integration; Enabling network access in virtual machine instances

Definitions

  • the present application relates to the field of cloud processing, and in particular, to a virtual machine management method and device for a cloud platform.
  • a cloud platform is a platform that can provide computing and storage services.
  • a cloud platform usually consists of a cluster of cloud servers.
  • a cloud server refers to a physical server that can provide Elastic Computing Service (ECS).
  • Current cloud platforms include public cloud platforms. , Private cloud platforms, and hybrid cloud platforms.
  • Data migration to the cloud refers to sending the data of the local virtual machine, the data of the source cloud platform, or the data of the Internet Data Center (IDC) machine room to the destination cloud platform, and the destination cloud platform stores the corresponding data.
  • the data of the virtual machine includes at least one of disk data, memory data, and device status data.
  • the data migrated to the destination cloud platform is charge data
  • the data can only be used after the relevant license is activated.
  • the operating system Oleting System
  • the operating system can be used only after the operating system provides an OS license to activate and authorize the operating system.
  • the application software needs to be activated and authorized with a software license provided by an independent software developer (ISV), before the application software can be used.
  • ISV independent software developer
  • the cloud platform supports the migration business with its own license (Bring, Your Owner, License, BYOL) or the platform's purchase license (Buy License, From Platform) migration business.
  • the embodiments of the present application provide a method and device for managing a virtual machine of a cloud platform, which can solve the problem of complicated and low-convenience operations of data migration to the cloud in related technologies.
  • the technical solution is as follows:
  • a method for managing a virtual machine of a cloud platform includes:
  • a license fee for software in the first software running environment in the first virtual machine is waived.
  • the cloud platform provided in the embodiment of the present application is compatible with the migration service with its own license mode and the migration service with the platform purchasing license.
  • the cloud platform can execute the corresponding virtual machine management method process according to the mode selected by the client, improving The flexibility of data migration to the cloud.
  • the cloud platform automatically creates a virtual machine and completes the activation of the software in the virtual machine according to the first license, that is, the fully automatic processing of the first client image file is realized, which improves the The convenience of enterprises' business switching to the cloud further improves the user experience.
  • the migration of cloud services provided with its own license enables smooth switching of enterprise services to the cloud.
  • the virtual machines created under the built-in license model carry a no-charge logo, and the cloud platform does not charge extra during the software running process.
  • the license fee for the software that comes with the license reduces the maintenance and operating costs of the enterprise.
  • the software in the first software operating environment is an operating system
  • configuring the first client image file according to the first license to generate a first cloud platform image file includes:
  • the first script is used to detect whether a second license is set in an operating system of the first virtual machine when the first virtual machine is started; The second license is set, the second license is cleared, and the first license is set in the operating system; if the second virtual machine is not set in the operating system of the first virtual machine A license, and the first license is set in the operating system.
  • the first virtual machine when the first virtual machine is started, it is detected whether the operating system of the first virtual machine is provided with a license provided by the cloud platform. If the operating system of the first virtual machine is provided with a license provided by the cloud platform, Clearing the license can prevent the client from stealing the license provided by the cloud platform after exporting the operating system from the virtual machine of the cloud platform.
  • the operating system is a windows operating system
  • the first script is used to:
  • the operating system is a Linux operating system
  • the first script is used to:
  • the client image file is cleaned up to prevent the client from stealing the license provided by the cloud platform, and the license fee for activation and operation of the Windows operating system is waived;
  • the Linux operating system with its own license cleans up the software package source address and license in the software warehouse configuration file of the client image file to prevent clients from stealing the software package source service provided by the cloud platform and exempts the Linux operating system from running. License fee.
  • the method further includes:
  • the second client image file is configured according to a third license provided by the cloud platform to generate a second cloud platform image file.
  • the second cloud platform image file carries a charging identifier, and the third license is used for Authenticating software in the second software operating environment;
  • Charging a license fee for software in the second software running environment in the second virtual machine according to the charging identifier Charging a license fee for software in the second software running environment in the second virtual machine according to the charging identifier.
  • a virtual machine management method for a cloud platform includes:
  • the second client image file is configured according to a third license provided by the cloud platform to generate a second cloud platform image file.
  • the second cloud platform image file carries a charging identifier, and the third license is used for Authenticating software in the second software operating environment;
  • Charging a license fee for software in the second software running environment in the second virtual machine according to the charging identifier Charging a license fee for software in the second software running environment in the second virtual machine according to the charging identifier.
  • the cloud platform provided in the embodiment of the present application is compatible with the migration service with its own license mode and the migration service with the platform purchasing license.
  • the cloud platform can execute the corresponding virtual machine management method process according to the mode selected by the client, improving The flexibility of data migration to the cloud.
  • the cloud platform automatically creates the virtual machine and completes the activation of the software in the virtual machine according to the third license provided by the cloud platform, that is, the second client image file is fully automated. Processing improves the convenience of the business switching of the enterprise to the cloud, thereby improving the user experience.
  • the software in the second software operating environment is an operating system
  • the second client image file is configured according to a third license provided by the cloud platform to generate a second cloud platform image file, include:
  • the second script is used to detect whether a fourth license is set in the operating system of the second virtual machine when the second virtual machine is started; The fourth license is set, the fourth license is cleared, and the third license is set in the operating system; if the fourth license is not set in the second virtual machine operating system The third license in the operating system.
  • the operating system is a windows operating system
  • the second script is used to:
  • the operating system is a linux operating system
  • the second script is used to:
  • the third license is set in the software warehouse configuration file.
  • the virtual machine management method for the cloud platform provided in the embodiment of the present application, for the windows operating system for which the platform purchases a license, the client license image file is implanted with the platform license, and when the created virtual machine is subsequently started, Automatically perform KMS to activate the operating system, and deduct the corresponding license fee according to the charge identifier; for the Linux operating system where the platform purchases the license, the platform image source file and the platform license are implanted into the client image file, which will be created later
  • the operating system running in the virtual machine can directly use the software package source service, and the cloud platform deducts the corresponding license fee according to the charge identifier.
  • a virtual machine management device for a cloud platform includes:
  • a first obtaining module configured to obtain a first client image file and a first license, where the first client image file carries a first software operating environment, and the first license is used for the first software Certification of software in the operating environment;
  • a first generating module configured to configure the first client image file according to the first license to generate a first cloud platform image file, where the first cloud platform image file carries a no-charge identifier
  • a first creating module configured to create a first virtual machine based on the first cloud platform image file, the first virtual machine is provided with the first software operating environment, and the first virtual machine carries the first virtual machine No charge sign
  • the fee exemption module is configured to exempt a license fee for software in the first software running environment in the first virtual machine according to the non-charge identification.
  • the software in the first software operating environment is an operating system
  • the first generating module is configured to:
  • the first script is used to:
  • the first license is set in the operating system.
  • the operating system is a windows operating system
  • the first script is used to:
  • the operating system is a Linux operating system
  • the first script is used to:
  • the first license is set in the software warehouse configuration file.
  • the device further includes:
  • a second obtaining module configured to obtain a second client image file, where the second client image file carries a second software operating environment
  • a second generating module configured to configure the second client image file according to a third license provided by the cloud platform to generate a second cloud platform image file, where the second cloud platform image file carries a charging identifier,
  • the third license is used to authenticate software in the second software operating environment
  • a second creation module configured to create a second virtual machine based on the second cloud platform image file, where the second software running environment is set in the second virtual machine, and the second virtual machine carries the second virtual machine Charge identification
  • a charging module configured to charge a license fee for software in the second software running environment in the second virtual machine according to the charging identifier.
  • a virtual machine management device for a cloud platform includes:
  • An obtaining module configured to obtain a second client image file, where the second client image file carries a second software operating environment
  • a generating module configured to configure the second client image file according to a third license provided by the cloud platform to generate a second cloud platform image file, where the second cloud platform image file carries a charging identifier, and A third license for authenticating software in the second software operating environment;
  • a creating module configured to create a second virtual machine based on the second cloud platform image file, where the second software operating environment is set in the second virtual machine, and the second virtual machine carries the charging identifier ;
  • a charging module configured to charge a license fee for software in the second software running environment in the second virtual machine according to the charging identifier.
  • the software in the second software operating environment is an operating system
  • the generating module is configured to:
  • the second script is used for:
  • the third license is set in the operating system.
  • the operating system is a windows operating system
  • the second script is used for:
  • the operating system is a Linux operating system
  • the second script is used for:
  • the third license is set in the software warehouse configuration file.
  • a virtual machine management device for a cloud platform including:
  • a storage unit for storing instructions
  • At least one processor coupled to the storage unit;
  • the at least one processor executes the instructions, the virtual machine management method for a cloud platform according to any one of the first aspects is implemented, or the virtual platform management method for any one of the second aspects Machine management method.
  • a computer-readable storage medium has instructions stored thereon, and when the instructions are executed by a processor, virtualization of the cloud platform according to any one of the first aspects Or a virtual machine management method for implementing a cloud platform according to any one of the second aspects.
  • a cloud platform virtual machine management system including: a cloud platform and at least one client, the cloud platform including the virtual machine management of the cloud platform according to any of the third aspect or the fourth aspect Device.
  • the cloud platform can execute the corresponding virtual machine management method process according to the mode selected by the client, improving the flexibility of data migration to the cloud Sex.
  • the cloud platform automatically creates a virtual machine and completes the activation of the software in the virtual machine according to the license, that is, the fully automatic processing of the client image file is realized, which improves the business switching of the enterprise.
  • the convenience of the cloud improves the user experience.
  • the client image file is cleaned up to prevent the client from stealing the license provided by the cloud platform, and the license fee for activation and operation of the Windows operating system is waived; Certificated linux operating system, cleaning the software package source address and license in the software warehouse configuration file of the client image file, preventing clients from stealing the software package source service provided by the cloud platform, and exempting the linux operating system license cost.
  • the cloud platform provided in the embodiment of the present application provides an enterprise with a service for smoothly switching to the cloud through the migration of the cloud service with its own license, and does not charge additional license fees for software with its own license, which reduces the maintenance of the enterprise. And operating costs.
  • the platform license is implanted on the client image file.
  • KMS is automatically activated to activate the operating system, and the corresponding license fee is deducted according to the charge identifier;
  • the platform package source address and platform license implantation are performed on the client image file.
  • the cloud platform deducts the license fee for the license according to the charge identifier.
  • FIG. 1 is a schematic structural diagram of a virtual machine management system for a cloud platform according to an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of a physical server constituting a cloud platform according to an embodiment of the present application
  • FIG. 3 is a schematic structural diagram of another physical server that forms a cloud platform according to an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a cloud platform according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of displaying a mirroring service control interface on a client according to an embodiment of the present application
  • FIG. 6 is a flowchart of a virtual machine management method for a cloud platform according to an embodiment of the present application.
  • FIG. 7 is a flowchart of another method for managing a virtual machine on a cloud platform according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a virtual machine management device for a cloud platform according to an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a virtual machine management apparatus for another cloud platform according to an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a virtual machine management apparatus for a cloud platform according to another embodiment of the present application.
  • FIG. 1 is a schematic structural diagram of a cloud platform virtual machine management system according to an embodiment of the present application. As shown in FIG. 1, the system includes: a cloud platform 00 and at least one client 01.
  • the cloud platform 00 may be a cloud server or a cloud server cluster composed of several cloud servers; the client 01 may be installed in a terminal device such as a computer, a tablet computer, and a smart phone. A connection is established between each client 01 and the cloud platform 00 through a wireless network or a wired network.
  • a cloud server refers to a physical server capable of providing elastic computing services.
  • the schematic diagram of the composition of the physical server is shown in FIG. 2 and FIG. 3.
  • FIG. 2 illustrates the software and hardware deployment in the physical server
  • FIG. 3 illustrates the hardware composition of the physical server.
  • the physical server includes a hardware platform 110, and the hardware platform 110 may include a hard disk, a central processing unit, a network interface, and a memory in the physical structure of the server.
  • a software platform 112 may be run on the hardware platform 110, and the software platform 112 may include software such as virtualization software, an operating system of the virtual machine, communication software of the virtual machine, and application software of the virtual machine.
  • Virtualization software (for example, Hypervisor) is an intermediate layer between physical hardware and virtual machines, and is responsible for coordinating the access of each virtual machine to the hardware platform.
  • Hypervisor is also called Virtual Machine Monitor (VMM).
  • the VMM can include a virtual hardware platform that implements a virtual machine.
  • the virtual hardware platform contains virtual memory, a central processing unit, a hard disk, a graphics card, and a network interface. Multiple virtual machines VM1 to VMn are run on the VMM, and the software system of the virtual machine runs on the virtual hardware platform of the virtual machine monitor. Communication between virtual machines requires a virtual switch, and the software platform 112 also includes communication software for the virtual machines, such as a virtual switch.
  • the physical server may include a processing unit 101 and a communication interface 102.
  • the processing unit 101 is configured to execute functions defined by an operating system and various software programs running on the physical server, for example, the software shown in FIG. 2 described above.
  • the functions of various software components on the platform 112, for example, the processing unit is used to implement the functions of the VMM, or is used to implement the functions of a virtual switch, or is used to implement the functions of a virtual machine.
  • the communication interface 102 is used for communication and interaction with other devices.
  • the other devices may be other physical servers.
  • the communication interface 102 may be a network adapter card.
  • the physical server may further include an input / output interface 103.
  • the input / output interface 103 is connected to an input / output device for receiving input information and outputting operation results.
  • the input / output interface 103 may be a mouse, a keyboard, a display, or an optical drive.
  • the physical server may further include auxiliary storage 104, which is also generally called external storage.
  • the storage medium of the auxiliary storage 104 may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, an optical disk), or a semiconductor. Media (such as solid-state drives).
  • the processing unit 101 may have various specific implementation forms.
  • the processing unit 101 may include a processor 1011 and a memory 1012.
  • the processor 1011 performs related operations according to a program unit stored in the memory 1012.
  • the processor 1011 may be a central processing unit (Central Processing unit (CPU) or graphics processing unit (Graphics processing unit, GPU), and the processor 1011 may be a single-core processor or a multi-core processor.
  • the processing unit 101 may also be implemented by using a logic device with built-in processing logic alone, such as a field programmable gate array (full name in English: Field Programmable Gate Array, abbreviation: FPGA) or digital signal processor (English: digital signal processor, DSP), etc.
  • FIG. 2 is only an example of a physical server.
  • the physical server may include more or fewer components than that shown in FIG. 2, or may have different component configuration methods.
  • FIG. 4 is a schematic structural diagram of a cloud platform provided by an embodiment of the present application.
  • cloud platform 00 includes multiple computing nodes, and the multiple computing nodes include a mirror file storage node 001 and a mirror service.
  • Each computing node can be a cloud server, and communication between computing nodes can be connected by an interconnect bus or a network; or multiple computing nodes are integrated in the same cloud server, which is not done in the embodiment of this application. limited.
  • the client 01 obtains data of the software in the software operating environment and generates a client image file, and then uploads the client image file to the image file storage node 001.
  • the image format of the client image file may be a community format such as vhd, qcow2, zvhd, or vmdk.
  • the embodiment of this application does not limit the image format of the client image file.
  • the software in the software operating environment includes an operating system and application software.
  • the software operating environment may be a software operating environment of a data center such as a local virtual machine, a public cloud platform, a private cloud platform, a hybrid cloud platform, or an IDC computer room.
  • the hardware carrier of the software operating environment is not limited.
  • the image file storage node 001 is used to store the client image file uploaded by the client 01, and the image file storage node 001 may be an Object Storage Service (OBS) user bucket.
  • OBS Object Storage Service
  • the image service node 002 is used to provide a combined application program interface (API) service.
  • the combination API downloads a client image file from the image file storage node 001, and transmits the client image file to the image file conversion node 003.
  • the image file conversion node 003 is used to convert the image format of the client image file to a specified image format.
  • the image file under the specified image format can support large-scale mounting.
  • the specified image format can be qcow2 format.
  • mount usually refers to assigning a drive letter to a disk partition (including a virtual disk partition).
  • Third-party software, such as disk partition management software and virtual disk software usually also comes with a mount function.
  • mounting refers to mounting a device (usually a storage device) to an existing directory.
  • the image file conversion node 003 is also used to perform background license processing on the client image file of the specified image format after mounting processing, and convert the image file's image format to a target format supported by the cloud platform, such as the The target format can be zvhd format to get the cloud platform image file.
  • the background permission processing includes clearing license processing and implanting license processing, or the background permission processing includes implanting license processing. For the implementation process of the background permission processing, see the method embodiment for details.
  • the virtual machine creation node 004 is used to create a virtual machine based on a cloud platform image file.
  • the virtual machine storage node 005 is used to store a virtual machine created by the virtual machine creation node 004.
  • FIG. 5 is a schematic diagram of displaying a mirroring service control interface on a client according to an embodiment of the present application.
  • the mirroring service control interface includes a license type option, and the license type option includes BYOL.
  • the image service control interface further includes an image file upload box, a name text box, and an OS version selection box.
  • the image file upload box is used to select a client image file to be uploaded from the client, and the name text box is used to Fill in the name of the client image file.
  • the OS version selection box is used to select the OS version of the uploaded client image file.
  • the following embodiments of the present application respectively describe the implementation processes of the virtual machine management method corresponding to the BYOL mode and the virtual machine management method corresponding to the BLOP mode.
  • FIG. 6 is a flowchart of a virtual machine management method for a cloud platform corresponding to the BYOL mode provided by an embodiment of the present application, and can be applied to the cloud platform 00 in the system shown in FIG. 1. As shown in FIG. 6, the method includes :
  • step 201 a first client image file and a first license are obtained, where the first client image file carries a first software operating environment, and the first license is used to execute software for the software in the first software operating environment. Certified.
  • the first client image file is sent by the first client to the cloud platform.
  • the image format of the first client image file may be a community format such as vhd, qcow2, zvhd, or vmdk.
  • the embodiment of the present application does not limit the image format of the first client image file.
  • the software in the first software operating environment may be an operating system or application software.
  • the first license is an OS license, which is used to activate and authenticate the operating system;
  • the software in the first software operating environment is application software, the first license is Software license for activation certification for this application.
  • the following embodiments of the present application use software in the first software operating environment as an example for description. For a case where the software in the first software operating environment is an application software, refer to a case where the software in the first software operating environment is an operating system. It will not be described in detail in the embodiments of the present application.
  • the first client image file is configured according to the first license to generate a first cloud platform image file, where the first cloud platform image file carries a no-charge identifier.
  • step 202 the implementation process of the virtual machine management method of the cloud platform further includes:
  • the cloud platform After the cloud platform obtains the first client image file, it detects whether the image format of the first client image file supports large-scale mounting; if the image format of the first client image file does not support large-scale mounting, the first client The end image file performs image format conversion processing, so that the first client image file after conversion processing supports large-scale mounting; and the first client image file that supports large-scale mounting performs mounting processing.
  • the image file conversion node in the cloud platform performs background permission processing on the first client image file, that is, step 202 is performed.
  • step 202 when the software in the first software operating environment is an operating system, the implementation process of step 202 includes:
  • the first script is used to detect whether a second license is set in the operating system of the first virtual machine when the first virtual machine is started; if the second license is set in the operating system of the first virtual machine, clearing A second license, and a first license is set in the operating system; if a second license is not set in the operating system of the first virtual machine, a first license is set in the operating system.
  • the second license is a license provided by the cloud platform.
  • the first virtual machine when the first virtual machine is started, it is detected whether the operating system of the first virtual machine is provided with a license provided by the cloud platform. If the operating system of the first virtual machine is provided with a license provided by the cloud platform, Clearing the license can prevent the client from stealing the license provided by the cloud platform after exporting the operating system from the virtual machine of the cloud platform.
  • the first script is used to:
  • the first script is a script for clearing the license provided by the cloud platform.
  • the first script is delactivesys.bat, and delactivesys.bat is converted from the image file node to the client
  • delactivesys.reg registry When the image file is processed in the background, it is injected into the registry offline to obtain the delactivesys.reg registry.
  • the first virtual machine When the first virtual machine starts, it will trigger the execution of the C: ⁇ Windows ⁇ System32 ⁇ delactivesys.bat script.
  • delactivesystem "C: ⁇ Windows ⁇ System32 ⁇ delactivesys.bat”
  • the cloud platform After the first virtual machine is started, the cloud platform first calls up C: ⁇ windows ⁇ system32 ⁇ x64 ⁇ delactivesys.bat to pull up the C: ⁇ Windows ⁇ System32 ⁇ DelActiveSystem.cmd script to clean up the license provided by the cloud platform, and then restores the relevant registry. And clean up the injected script files (delactivesys.bat and DelActiveSystem.cmd). Among them, the delactivesys.bat script and the DelActiveSystem.cmd script are injected into the C: ⁇ Windows ⁇ System32 directory offline by the image file conversion node during background license processing.
  • the image file conversion node offline injection delactivesys.bat script content is as follows:
  • the image file conversion node offline injection DelActiveSystem.cmd script content is as follows:
  • the first script is used to:
  • the operating system when the operating system is a linux operating system, read the software warehouse configuration file under the yum or zypper configuration directory in the operating system to see if the software package source address and license provided by the cloud platform exist. , Then clean it up.
  • a first virtual machine is created based on the first cloud platform image file.
  • the first virtual machine is provided with a first software operating environment, and the first virtual machine carries a no-charge identifier.
  • the first virtual machine is used to provide a software running environment in the first cloud platform image file.
  • the toll-free sign may be represented by a letter, a number, or a character string.
  • the toll-free sign may be recorded as "byol".
  • the embodiment of the present application does not limit the expression form of the toll-free sign.
  • step 204 the license fee of the software in the first software running environment in the first virtual machine is exempted according to the non-charge identification.
  • the virtual machine management method for the cloud platform provided in the embodiment of the present application is to clean up the client image file for the windows operating system with a license, to prevent the client from misappropriating the license provided by the cloud platform, and to exempt the windows operating system. License fee for activation and operation; for the Linux operating system with its own license, the software package source address and license in the software warehouse configuration file of the client image file are cleaned up to prevent the client from stealing the software package provided by the cloud platform Source service, and waive license fees for running the Linux operating system.
  • the cloud platform automatically creates a virtual machine and completes the activation of software in the virtual machine according to the first license, that is, the first client image is implemented.
  • the fully automated processing of documents improves the convenience of enterprises' business switching to the cloud, thereby improving the user experience.
  • the migration of the cloud service provided by the license provides enterprises with services for smoothly switching services to the cloud, and does not charge additional license fees for software with its own license, which reduces the company's maintenance and operating costs.
  • FIG. 7 is a flowchart of a virtual machine management method for a cloud platform corresponding to the BLEP mode provided in an embodiment of the present application, and can be applied to the cloud platform 00 in the system shown in FIG. 1. As shown in FIG. 6, the method includes :
  • step 301 a second client image file is obtained, and the second client image file carries a second software operating environment.
  • the second client image file is sent by the second client to the cloud platform.
  • the image format of the second client image file may be a community format such as vhd, qcow2, zvhd, or vmdk.
  • the embodiment of the present application does not limit the image format of the second client image file.
  • the software in the second software operating environment may be an operating system or application software.
  • a second client image file is configured according to a third license provided by the cloud platform to generate a second cloud platform image file, where the second cloud platform image file carries a charging identifier, and the third license is used for Authenticate software in a second software operating environment.
  • the software in the second software operating environment is an operating system
  • the second license is an OS license, which is used to perform activation certification for the operating system
  • the first The second license is a software license, which is used to activate and authenticate the application software.
  • the implementation process of the virtual machine management method of the cloud platform further includes:
  • the cloud platform After the cloud platform obtains the second client image file, it detects whether the image format of the second client image file supports large-scale mounting; if the image format of the second client image file does not support large-scale mounting, the second client The end image file performs image format conversion processing, so that the second client image file after conversion processing supports large-scale mounting; and the second client image file that supports large-scale mounting performs mounting processing.
  • step 302 when the software in the second software operating environment is an operating system, the implementation process of step 302 includes:
  • the second script is used to: when the second virtual machine is started, detect whether a fourth license is set in the operating system of the second virtual machine; if a fourth license is set in the operating system of the second virtual machine, clear A fourth license, and a third license is set in the operating system; if a fourth license is not set in the second virtual machine operating system, a third license is set in the operating system.
  • the fourth license may be a license provided by the second client or another cloud platform, that is, the fourth license is a license provided by any platform other than the cloud platform provided in the embodiment of the present application. If a fourth license is set in the operating system of the second virtual machine, the cloud platform clears the fourth license and sets a third license in the operating system. Alternatively, the cloud platform may use the third license to cover the fourth license. certificate.
  • the second script is used to:
  • the second script when the operating system is a windows operating system, the second script is a script for activating a license, the second script is an activesys.bat script, and the activesys.bat script is an image file conversion node to a client image file During background permission processing, it is injected offline into the registry to get the activesys.reg registry. When the first virtual machine starts, it will trigger the execution of the C: ⁇ Windows ⁇ System32 ⁇ activesys.bat script.
  • activesystem "C: ⁇ Windows ⁇ System32 ⁇ activesys.bat”
  • the cloud platform After the first virtual machine is started, the cloud platform first invokes C: ⁇ windows ⁇ system32 ⁇ x64 ⁇ activesys.bat to pull up the C: ⁇ Windows ⁇ System32 ⁇ ActiveSystem.cmd script to activate the license, and then restores the relevant registry and cleans up the injection.
  • Script files activesys.bat and ActiveSystem.cmd.
  • the activesys.bat script and ActiveSystem.cmd script are injected into the C: ⁇ Windows ⁇ System32 directory offline by the image file conversion node during background license processing.
  • the image file conversion node offline injection activesys.bat script content is as follows:
  • the image file conversion node offline injection ActiveSystem.cmd script content is as follows:
  • strKMSSrv refers to the intranet key management service (KMS) server address or domain name.
  • strKEY refers to the KMS activation serial number corresponding to the client version of each Windows operating system.
  • the second script is used to:
  • the operating system is a linux operating system
  • the / etc / redhat-release, / etc / SuSE-release, and / etc / oracle-release configuration files are read to identify the operating system version, and each will correspond to
  • the package source configuration (including the package source address and license) provided by your platform is implanted into the corresponding yum or zypper configuration directory.
  • a second virtual machine is created based on the second cloud platform image file.
  • a second software operating environment is set in the second virtual machine, and the second virtual machine carries a charging identifier.
  • the second virtual machine is used to provide an operating environment of the software in the second cloud platform image file.
  • the non-charged sign may be represented by letters, numbers, or character strings, and the embodiment of the present application does not limit the expression form of the charged sign.
  • the OS platform of the windows operating system is a windows platform, and the OS platform of the linux operating system can be divided into platforms such as SUSE, RedHat, and Oracle.
  • the charging identifier may be set according to the OS platform type. For example, the charging logo of the Windows platform can be recorded as "win”, the charging logo of the SUSE platform can be recorded as "suse”, the charging logo of the RedHat platform can be recorded as "redhat”, and the charging logo of the Oracle Linux platform can be recorded as "oracle” .
  • the granularity of the charging identifier is not limited in the embodiment of the present application, and the granularity may be divided according to the bill requirements.
  • each OS platform has multiple OS versions.
  • the Windows platform includes server 2016 / standard / datacenter 64bit and other versions. You can also set the charging identifier according to the OS version.
  • step 304 a license fee for software in the second software running environment in the second virtual machine is charged according to the charging identifier.
  • the virtual machine management method for the cloud platform provided in the embodiment of the present application, for the windows operating system for which the platform purchases a license, the client license image file is implanted with the platform license, and when the created virtual machine is subsequently started, Automatically perform KMS to activate the operating system, and deduct the corresponding license fee according to the charge identifier; for the Linux operating system where the platform purchases the license, the platform image source file and the platform license are implanted into the client image file, which will be created later
  • the operating system running in the virtual machine can directly use the software package source service, and the cloud platform deducts the corresponding license fee according to the charge identifier.
  • the cloud platform automatically creates the virtual machine and completes the activation of the software in the virtual machine according to the third license provided by the cloud platform, that is, the fully automated processing of the second client image file is realized , which improves the convenience of the business switching of enterprises to the cloud, thereby improving the user experience.
  • the first client and the second client may be the same client or different clients, which is not limited in this embodiment of the present application. Since the cloud platform provided by the embodiment of the present application is compatible with the built-in license mode and the platform purchase license mode, the above steps 201 to 204 and the above steps 301 to 304 may be performed separately or in combination. When the above steps 201 to 204 are performed in combination with the above steps 301 to 304, the above steps 201 to 204 may be performed before the above steps 301 to 304, or may be performed after the above steps 301 to 304.
  • the virtual machine management method of the cloud platform provided in the embodiments of the present application is compatible with the migration service with its own license mode and the migration service with the platform purchase license.
  • the cloud platform can perform the corresponding operation according to the mode selected by the client.
  • the virtual machine management method process improves the flexibility of data migration to the cloud.
  • the cloud platform automatically creates a virtual machine and completes the activation of the software in the virtual machine according to the license. The convenience of the cloud improves the user experience.
  • the client image file is cleaned up to prevent the client from stealing the license provided by the cloud platform, and the license fee for activation and operation of the Windows operating system is waived; Certificated linux operating system, cleaning the software package source address and license in the software warehouse configuration file of the client image file, preventing clients from stealing the software package source service provided by the cloud platform, and exempting the linux operating system license cost.
  • the cloud platform provided in the embodiment of the present application provides an enterprise with a service for smoothly switching to the cloud through the migration of the cloud service with its own license, and does not charge additional license fees for software with its own license, which reduces the maintenance of the enterprise. And operating costs.
  • the platform license is implanted on the client image file.
  • KMS is automatically activated to activate the operating system, and the corresponding license fee is deducted according to the charge identifier;
  • the platform package source address and platform license implantation are performed on the client image file.
  • the cloud platform deducts the license fee for the license according to the charge identifier.
  • FIG. 8 is a schematic structural diagram of a cloud platform virtual machine management apparatus according to an embodiment of the present application. As shown in FIG. 8, the apparatus 40 includes:
  • a first obtaining module 401 is configured to obtain a first client image file and a first license.
  • the first client image file carries a first software operating environment, and the first license is used for software in the first software operating environment. Carry out certification
  • a first generating module 402 configured to configure a first client image file according to a first license to generate a first cloud platform image file, where the first cloud platform image file carries a no-charge identifier;
  • a first creating module 403 configured to create a first virtual machine based on a first cloud platform image file, where a first software running environment is set in the first virtual machine, and the first virtual machine carries a no-charge identifier;
  • the fee exemption module 404 is configured to exempt a license fee for software in the first software running environment in the first virtual machine according to the non-charge identification.
  • the software in the first software operating environment is an operating system
  • the first generating module is configured to:
  • the first script is used:
  • a second license is not set in the operating system of the first virtual machine, a first license is set in the operating system.
  • the operating system is a windows operating system
  • the first script is used to:
  • the operating system is a Linux operating system
  • the first script is used to:
  • the first license is set in the software warehouse configuration file.
  • the device 40 further includes:
  • a second obtaining module 405, configured to obtain a second client image file, where the second client image file carries a second software operating environment
  • a second generating module 406 is configured to configure a second client image file according to a third license provided by the cloud platform to generate a second cloud platform image file.
  • the second cloud platform image file carries a charging identifier, and the third license is used for Verifying the software in the second software operating environment;
  • a second creating module 407 configured to create a second virtual machine based on the second cloud platform image file, where a second software operating environment is set in the second virtual machine, and the second virtual machine carries a charging identifier;
  • the charging module 408 is configured to charge a license fee for software in the second software running environment in the second virtual machine according to the charging identifier.
  • the virtual machine management device for the cloud platform provided in the embodiment of the present application is compatible with the migration service with its own license mode and the migration service with the platform purchasing license, and can execute the corresponding virtual based on the mode selected by the client.
  • Machine management methods and processes improving the flexibility of data migration to the cloud.
  • the cloud platform automatically creates a virtual machine and completes the activation of the software in the virtual machine according to the license, that is, the fully automatic processing of the client image file is realized, which improves the business switching of the enterprise.
  • the convenience of the cloud improves the user experience.
  • the client image file is cleaned up to prevent the client from stealing the license provided by the cloud platform, and the license fee for activation and operation of the Windows operating system is waived; Certificated linux operating system, cleaning the software package source address and license in the software warehouse configuration file of the client image file, preventing clients from stealing the software package source service provided by the cloud platform, and exempting the linux operating system license cost.
  • the cloud platform provided in the embodiment of the present application provides an enterprise with a service for smoothly switching to the cloud through the migration of the cloud service with its own license, and does not charge additional license fees for software with its own license, which reduces the maintenance of the enterprise. And operating costs.
  • the platform license is implanted on the client image file.
  • KMS is automatically activated to activate the operating system, and the corresponding license fee is deducted according to the charge identifier;
  • the platform package source address and platform license implantation are performed on the client image file.
  • the cloud platform deducts the license fee for the license according to the charge identifier.
  • FIG. 10 is a schematic structural diagram of a cloud platform virtual machine management apparatus according to another embodiment of the present application. As shown in FIG. 10, the apparatus 50 includes:
  • An obtaining module 501 configured to obtain a second client image file, where the second client image file carries a second software operating environment
  • the generating module 502 is configured to configure a second client image file according to a third license provided by the cloud platform to generate a second cloud platform image file.
  • the second cloud platform image file carries a charging identifier, and the third license is used for Certify software in the second software operating environment;
  • a creating module 503 configured to create a second virtual machine based on the second cloud platform image file, where a second software operating environment is set in the second virtual machine, and the second virtual machine carries a charging identifier;
  • the charging module 504 is configured to charge a license fee for software in the second software running environment in the second virtual machine according to the charging identifier.
  • the software in the second software operating environment is an operating system, and a generating module is used for:
  • the second script is used to:
  • the operating system is a windows operating system
  • the second script is used to:
  • a fourth license is set in the registry, clear the fourth license in the registry, set a third license in the registry, and activate the third license in the registry;
  • the operating system is a Linux operating system
  • the second script is used for:
  • the virtual machine management device for the cloud platform provided in the embodiment of the present application is compatible with the migration service with its own license mode and the migration service with the platform purchasing license, and can execute the corresponding virtual based on the mode selected by the client.
  • Machine management methods and processes improving the flexibility of data migration to the cloud.
  • the cloud platform automatically creates a virtual machine and completes the activation of the software in the virtual machine according to the license, that is, the fully automatic processing of the client image file is realized, which improves the business switching of the enterprise.
  • the convenience of the cloud improves the user experience.
  • the platform license is implanted on the client image file.
  • KMS is automatically activated to activate the operating system, and the corresponding license is deducted according to the charge identifier Expenses: For the Linux operating system purchased by the platform, the client package image is loaded with the platform package source address and the platform license. When the created virtual machine is started, the operating system running in the virtual machine can directly use the software. For the package source service, the cloud platform deducts the corresponding license fee according to the charge identifier.
  • An embodiment of the present application provides a virtual machine management device for a cloud platform, including:
  • a storage unit for storing instructions
  • At least one processor coupled to the storage unit;
  • a virtual machine management method of the cloud platform shown in FIG. 6 is implemented, or a virtual machine management method of the cloud platform shown in FIG. 7 is implemented.
  • the device may be a physical server.
  • FIG. 2 For the hardware and software deployment of the device, see FIG. 2, and for the hardware composition of the device, see FIG. 3, which is not described in detail in this application.
  • An embodiment of the present application provides a computer-readable storage medium.
  • the computer-readable storage medium stores instructions.
  • the instructions are executed by a processor, a method for managing a virtual machine of a cloud platform shown in FIG. 6 is implemented. Or, to implement a virtual machine management method for a cloud platform as shown in FIG. 7.
  • the program may be stored in a computer-readable storage medium.
  • the storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)

Abstract

一种云平台的虚拟机管理方法及装置,属于云处理领域。当客户端选择自带许可证模式,该方法包括:获取第一客户端镜像文件和第一许可证,第一客户端镜像文件携带有第一软件运行环境,第一许可证用于为第一软件运行环境中的软件进行认证(201);根据第一许可证配置第一客户端镜像文件,以生成第一云平台镜像文件,第一云平台镜像文件携带有不收费标识(202);基于第一云平台镜像文件创建第一虚拟机,第一虚拟机中设置有第一软件运行环境,且第一虚拟机携带有不收费标识(203);根据不收费标识,免除第一虚拟机内第一软件运行环境中的软件的许可证费用(204)。所述云平台实现了对客户端镜像文件的全自动化处理,提高了企业的业务切换上云的便捷性。

Description

云平台的虚拟机管理方法及装置 技术领域
本申请涉及云处理领域,特别涉及一种云平台的虚拟机管理方法及装置。
背景技术
云平台是一种能够提供计算和存储服务的平台,云平台通常由云服务器集群组成,云服务器指能够提供弹性计算服务(Elastic Compute Service,ECS)的物理服务器,目前的云平台包括公有云平台、私有云平台和混合云平台等多种。数据迁移上云是指将本地虚拟机的数据、源端云平台的数据或互联网数据中心(Internet Data Center,IDC)机房的数据发送至目的端云平台,并由该目的端云平台存储对应的数据。虚拟机的数据包括磁盘数据、内存数据以及设备状态数据中的至少一种。
其中,当迁移至目的端云平台的数据为收费数据时,该数据需要相关许可证激活后才可使用。例如,将收费版的操作系统(Operating System,OS)的数据迁移至目的端云平台后,需要采用OS厂商提供的OS许可证对该操作系统进行激活授权后,该操作系统才能使用;又例如,将收费版的应用软件的数据迁移至目的端云平台后,需要采用独立软件开发商(Independent Software Vendor,ISV)提供的软件许可证对该应用软件进行激活授权后,该应用软件才能使用。
相关技术中,用户将数据的镜像文件上传至目的端云平台后,需要根据目的端云平台所支持的迁移业务手动激活操作系统或应用软件,以完成数据的迁移,操作复杂,便捷性较低。其中,云平台支持自带许可证(Bring Your Owner License,BYOL)的迁移业务或支持平台购买许可证(Buy License From Platform)的迁移业务。
发明内容
本申请实施例提供了一种云平台的虚拟机管理方法及装置,可以解决相关技术中数据迁移上云的操作复杂且便捷性较低的问题。所述技术方案如下:
第一方面,提供了一种云平台的虚拟机管理方法,所述方法包括:
获取第一客户端镜像文件和第一许可证,所述第一客户端镜像文件携带有第一软件运行环境,所述第一许可证用于为所述第一软件运行环境中的软件进行认证;
根据所述第一许可证配置所述第一客户端镜像文件,以生成第一云平台镜像文件,所述第一云平台镜像文件携带有不收费标识;
基于所述第一云平台镜像文件创建第一虚拟机,所述第一虚拟机中设置有所述第一软件运行环境,且所述第一虚拟机携带有所述不收费标识;
根据所述不收费标识,免除所述第一虚拟机内所述第一软件运行环境中的软件的许可证费用。
需要说明的是,本申请实施例提供的云平台兼容自带许可证模式的迁移业务和平台购 买许可证的迁移业务,云平台可根据客户端选择的模式执行对应的虚拟机管理方法流程,提高了数据迁移上云的灵活性。在该虚拟机管理方法流程的执行过程中,云平台自动创建虚拟机并根据第一许可证完成对虚拟机中软件的激活,即实现了对第一客户端镜像文件的全自动化处理,提高了企业的业务切换上云的便捷性,进而提高了用户体验。另外,通过提供自带许可证的迁移上云业务实现了企业业务平滑切换上云,在自带许可证模式下创建的虚拟机携带有不收费标识,云平台在软件的运行过程中不额外收取自带许可证的软件的许可证费用,降低了企业的维护和运营成本。
可选的,所述第一软件运行环境中的软件为操作系统,所述根据所述第一许可证配置所述第一客户端镜像文件,以生成第一云平台镜像文件,包括:
根据所述第一许可证获取第一脚本;在所述第一客户端镜像文件中设置所述第一脚本,以得到所述第一云平台镜像文件;
其中,所述第一脚本用于:在所述第一虚拟机启动时,检测所述第一虚拟机的操作系统中是否设置有第二许可证;若所述第一虚拟机的操作系统中设置有所述第二许可证,清除所述第二许可证,并在所述操作系统中设置所述第一许可证;若所述第一虚拟机的操作系统中未设置有所述第二许可证,在所述操作系统中设置所述第一许可证。
需要说明的是,在第一虚拟机启动时,检测第一虚拟机的操作系统中是否设置有云平台提供的许可证,若第一虚拟机的操作系统中设置有云平台提供的许可证,则清除该许可证,可以防止客户端从云平台的虚拟机中导出操作系统后盗用云平台提供的许可证。
在一种可能的实现方式中,所述操作系统为windows操作系统,所述第一脚本用于:
在所述第一虚拟机启动时,检测所述第一虚拟机的windows操作系统的注册表中是否设置有第二许可证;若所述注册表中设置有所述第二许可证,清除所述注册表中的第二许可证,在所述注册表中设置所述第一许可证,并激活所述注册表中的第一许可证;若所述注册表中未设置有所述第二许可证,在所述注册表中设置所述第一许可证,并激活所述注册表中的第一许可证。
在另一种可能的实现方式中,所述操作系统为linux操作系统,所述第一脚本用于:
在所述第一虚拟机启动时,检测所述第一虚拟机的linux操作系统的软件仓库配置文件中是否设置有第二许可证;若所述软件仓库配置文件中设置有所述第二许可证,清除所述软件仓库配置文件中的第二许可证,并在所述软件仓库配置文件中设置所述第一许可证;若所述软件仓库配置文件中未设置有所述第二许可证,在所述软件仓库配置文件中设置所述第一许可证。
需要说明的是,对于自带许可证的windows操作系统,对客户端镜像文件进行许可证清理,防止客户端盗用云平台提供的许可证,并免除windows操作系统激活和运行的许可证费用;对于自带许可证的linux操作系统,对客户端镜像文件的软件仓库配置文件中的软件包源地址和许可证进行清理,防止客户端盗用云平台提供的软件包源服务,并免除linux操作系统运行的许可证费用。
可选的,所述方法还包括:
获取第二客户端镜像文件,所述第二客户端镜像文件携带有第二软件运行环境;
根据所述云平台提供的第三许可证配置所述第二客户端镜像文件,以生成第二云平台 镜像文件,所述第二云平台镜像文件携带有收费标识,所述第三许可证用于为所述第二软件运行环境中的软件进行认证;
基于所述第二云平台镜像文件创建第二虚拟机,所述第二虚拟机中设置有所述第二软件运行环境,且所述第二虚拟机携带有所述收费标识;
根据所述收费标识,收取所述第二虚拟机内所述第二软件运行环境中的软件的许可证费用。
第二方面,提供了一种云平台的虚拟机管理方法,所述方法包括:
获取第二客户端镜像文件,所述第二客户端镜像文件携带有第二软件运行环境;
根据所述云平台提供的第三许可证配置所述第二客户端镜像文件,以生成第二云平台镜像文件,所述第二云平台镜像文件携带有收费标识,所述第三许可证用于为所述第二软件运行环境中的软件进行认证;
基于所述第二云平台镜像文件创建第二虚拟机,所述第二虚拟机中设置有所述第二软件运行环境,且所述第二虚拟机携带有所述收费标识;
根据所述收费标识,收取所述第二虚拟机内所述第二软件运行环境中的软件的许可证费用。
需要说明的是,本申请实施例提供的云平台兼容自带许可证模式的迁移业务和平台购买许可证的迁移业务,云平台可根据客户端选择的模式执行对应的虚拟机管理方法流程,提高了数据迁移上云的灵活性。在该虚拟机管理方法流程的执行过程中,云平台自动创建虚拟机并根据云平台提供的第三许可证完成对虚拟机中软件的激活,即实现了对第二客户端镜像文件的全自动化处理,提高了企业的业务切换上云的便捷性,进而提高了用户体验。
可选的,所述第二软件运行环境中的软件为操作系统,所述根据所述云平台提供的第三许可证配置所述第二客户端镜像文件,以生成第二云平台镜像文件,包括:
根据所述第三许可证获取第二脚本;在所述第二客户端镜像文件中设置所述第二脚本,以得到所述第二云平台镜像文件;
其中,所述第二脚本用于:在所述第二虚拟机启动时,检测所述第二虚拟机的操作系统中是否设置有第四许可证;若所述第二虚拟机的操作系统中设置有所述第四许可证,清除所述第四许可证,并在所述操作系统中设置所述第三许可证;若所述第二虚拟机操作系统中未设置有所述第四许可证,在所述操作系统中设置所述第三许可证。
在一种可能的实现方式中,所述操作系统为windows操作系统,所述第二脚本用于:
在所述第二虚拟机启动时,检测所述第二虚拟机的windows操作系统的注册表中是否设置有第四许可证;
若所述注册表中设置有所述第四许可证,清除所述注册表中的第四许可证,在所述注册表中设置所述第三许可证,并激活所述注册表中的第三许可证;
若所述注册表中未设置有所述第四许可证,在所述注册表中设置所述第三许可证,并激活所述注册表中的第三许可证。
在另一种可能的实现方式中,所述操作系统为linux操作系统,所述第二脚本用于:
在所述第二虚拟机启动时,检测所述第二虚拟机的linux操作系统的软件仓库配置文件中是否设置有第四许可证;
若所述软件仓库配置文件中设置有所述第四许可证,清除所述软件仓库配置文件中的第四许可证,并在所述软件仓库配置文件中设置所述第三许可证;
若所述软件仓库配置文件中未设置有所述第四许可证,在所述软件仓库配置文件中设置所述第三许可证。
需要说明的是,本申请实施例提供的云平台的虚拟机管理方法,对于平台购买许可证的windows操作系统,对客户端镜像文件进行平台许可证植入,后续在创建的虚拟机启动时,自动进行KMS以激活操作系统,并根据收费标识扣除对应的许可证费用;对于平台购买许可证的linux操作系统,对客户端镜像文件进行平台软件包源地址和平台许可证植入,后续在创建的虚拟机启动时,虚拟机中运行的操作系统可直接使用软件包源服务,云平台根据收费标识扣除对于的许可证费用。
第三方面,提供了一种云平台的虚拟机管理装置,所述装置包括:
第一获取模块,用于获取第一客户端镜像文件和第一许可证,所述第一客户端镜像文件携带有第一软件运行环境,所述第一许可证用于为所述第一软件运行环境中的软件进行认证;
第一生成模块,用于根据所述第一许可证配置所述第一客户端镜像文件,以生成第一云平台镜像文件,所述第一云平台镜像文件携带有不收费标识;
第一创建模块,用于基于所述第一云平台镜像文件创建第一虚拟机,所述第一虚拟机中设置有所述第一软件运行环境,且所述第一虚拟机携带有所述不收费标识;
免除费用模块,用于根据所述不收费标识,免除所述第一虚拟机内所述第一软件运行环境中的软件的许可证费用。
可选的,所述第一软件运行环境中的软件为操作系统,所述第一生成模块,用于:
根据所述第一许可证获取第一脚本;
在所述第一客户端镜像文件中设置所述第一脚本,以得到所述第一云平台镜像文件;
其中,所述第一脚本用于:
在所述第一虚拟机启动时,检测所述第一虚拟机的操作系统中是否设置有第二许可证;
若所述第一虚拟机的操作系统中设置有所述第二许可证,清除所述第二许可证,并在所述操作系统中设置所述第一许可证;
若所述第一虚拟机的操作系统中未设置有所述第二许可证,在所述操作系统中设置所述第一许可证。
可选的,所述操作系统为windows操作系统,所述第一脚本用于:
在所述第一虚拟机启动时,检测所述第一虚拟机的windows操作系统的注册表中是否设置有第二许可证;
若所述注册表中设置有所述第二许可证,清除所述注册表中的第二许可证,在所述注册表中设置所述第一许可证,并激活所述注册表中的第一许可证;
若所述注册表中未设置有所述第二许可证,在所述注册表中设置所述第一许可证,并激活所述注册表中的第一许可证。
可选的,所述操作系统为linux操作系统,所述第一脚本用于:
在所述第一虚拟机启动时,检测所述第一虚拟机的linux操作系统的软件仓库配置文件 中是否设置有第二许可证;
若所述软件仓库配置文件中设置有所述第二许可证,清除所述软件仓库配置文件中的第二许可证,并在所述软件仓库配置文件中设置所述第一许可证;
若所述软件仓库配置文件中未设置有所述第二许可证,在所述软件仓库配置文件中设置所述第一许可证。
可选的,所述装置还包括:
第二获取模块,用于获取第二客户端镜像文件,所述第二客户端镜像文件携带有第二软件运行环境;
第二生成模块,用于根据所述云平台提供的第三许可证配置所述第二客户端镜像文件,以生成第二云平台镜像文件,所述第二云平台镜像文件携带有收费标识,所述第三许可证用于为所述第二软件运行环境中的软件进行认证;
第二创建模块,用于基于所述第二云平台镜像文件创建第二虚拟机,所述第二虚拟机中设置有所述第二软件运行环境,且所述第二虚拟机携带有所述收费标识;
收费模块,用于根据所述收费标识,收取所述第二虚拟机内所述第二软件运行环境中的软件的许可证费用。
第四方面,提供了一种云平台的虚拟机管理装置,所述装置包括:
获取模块,用于获取第二客户端镜像文件,所述第二客户端镜像文件携带有第二软件运行环境;
生成模块,用于根据所述云平台提供的第三许可证配置所述第二客户端镜像文件,以生成第二云平台镜像文件,所述第二云平台镜像文件携带有收费标识,所述第三许可证用于为所述第二软件运行环境中的软件进行认证;
创建模块,用于基于所述第二云平台镜像文件创建第二虚拟机,所述第二虚拟机中设置有所述第二软件运行环境,且所述第二虚拟机携带有所述收费标识;
收费模块,用于根据所述收费标识,收取所述第二虚拟机内所述第二软件运行环境中的软件的许可证费用。
可选的,所述第二软件运行环境中的软件为操作系统,所述生成模块,用于:
根据所述第三许可证获取第二脚本;
在所述第二客户端镜像文件中设置所述第二脚本,以得到所述第二云平台镜像文件;
其中,所述第二脚本用于:
在所述第二虚拟机启动时,检测所述第二虚拟机的操作系统中是否设置有第四许可证;
若所述第二虚拟机的操作系统中设置有所述第四许可证,清除所述第四许可证,并在所述操作系统中设置所述第三许可证;
若所述第二虚拟机操作系统中未设置有所述第四许可证,在所述操作系统中设置所述第三许可证。
可选的,所述操作系统为windows操作系统,所述第二脚本用于:
在所述第二虚拟机启动时,检测所述第二虚拟机的windows操作系统的注册表中是否设置有第四许可证;
若所述注册表中设置有所述第四许可证,清除所述注册表中的第四许可证,在所述注 册表中设置所述第三许可证,并激活所述注册表中的第三许可证;
若所述注册表中未设置有所述第四许可证,在所述注册表中设置所述第三许可证,并激活所述注册表中的第三许可证。
可选的,所述操作系统为linux操作系统,所述第二脚本用于:
在所述第二虚拟机启动时,检测所述第二虚拟机的linux操作系统的软件仓库配置文件中是否设置有第四许可证;
若所述软件仓库配置文件中设置有所述第四许可证,清除所述软件仓库配置文件中的第四许可证,并在所述软件仓库配置文件中设置所述第三许可证;
若所述软件仓库配置文件中未设置有所述第四许可证,在所述软件仓库配置文件中设置所述第三许可证。
第五方面,提供了一种云平台的虚拟机管理装置,包括:
存储单元,用于存储指令;以及
至少一台处理器,与所述存储单元耦合;
其中,当所述至少一台处理器执行所述指令时,实现如第一方面任一所述的云平台的虚拟机管理方法,或者,实现如第二方面任一所述的云平台的虚拟机管理方法。
第六方面,提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有指令,当所述指令被处理器执行时,实现如第一方面任一所述的云平台的虚拟机管理方法,或者,实现如第二方面任一所述的云平台的虚拟机管理方法。
第七方面,提供了一种云平台的虚拟机管理系统,包括:云平台和至少一个客户端,所述云平台包括如第三方面或第四方面任一所述的云平台的虚拟机管理装置。
本申请实施例提供的技术方案带来的有益效果包括:
通过提供兼容自带许可证模式的迁移业务和平台购买许可证的迁移业务的云平台,该云平台可根据客户端选择的模式执行对应的虚拟机管理方法流程,提高了数据迁移上云的灵活性。在虚拟机管理方法流程的执行过程中,云平台自动创建虚拟机并根据许可证完成对虚拟机中软件的激活,即实现了对客户端镜像文件的全自动化处理,提高了企业的业务切换上云的便捷性,进而提高了用户体验。其中,对于自带许可证的windows操作系统,对客户端镜像文件进行许可证清理,防止客户端盗用云平台提供的许可证,并免除windows操作系统激活和运行的许可证费用;对于自带许可证的linux操作系统,对客户端镜像文件的软件仓库配置文件中的软件包源地址和许可证进行清理,防止客户端盗用云平台提供的软件包源服务,并免除linux操作系统运行的许可证费用。本申请实施例提供的云平台,通过自带许可证的迁移上云业务为企业提供了业务平滑切换上云的服务,不额外收取自带许可证的软件的许可证费用,降低了企业的维护和运营成本。对于平台购买许可证的windows操作系统,对客户端镜像文件进行平台许可证植入,后续在创建的虚拟机启动时,自动进行KMS以激活操作系统,并根据收费标识扣除对应的许可证费用;对于平台购买许可证的linux操作系统,对客户端镜像文件进行平台软件包源地址和平台许可证植入,后续在创建的虚拟机启动时,虚拟机中运行的操作系统可直接使用软件包源服务,云平台根据收费标识扣除对于的许可证费用。
附图说明
图1是本申请实施例提供的一种云平台的虚拟机管理系统的结构示意图;
图2是本申请实施例提供的一种构成云平台的物理服务器的组成结构示意图;
图3是本申请实施例提供的另一种构成云平台的物理服务器的组成结构示意图;
图4是本申请实施例提供的一种云平台的结构示意图;
图5是本申请实施例提供的一种在客户端上显示镜像服务控制界面的示意图;
图6是本申请实施例提供的一种云平台的虚拟机管理方法的流程图;
图7是本申请实施例提供的另一种云平台的虚拟机管理方法的流程图;
图8是本申请实施例提供的一种云平台的虚拟机管理装置的结构示意图;
图9是本申请实施例提供的另一种云平台的虚拟机管理装置的结构示意图;
图10是本申请另一实施例提供的一种云平台的虚拟机管理装置的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
图1是本申请实施例提供的一种云平台的虚拟机管理系统的结构示意图,如图1所示,该系统包括:云平台00和至少一个客户端01。
其中,云平台00可以是一台云服务器,或者由若干台云服务器组成的云服务器集群;客户端01可以安装于计算机、平板电脑和智能手机等终端设备中。每个客户端01与云平台00之间通过无线网络或有线网络建立连接。
云服务器指能够提供弹性计算服务的物理服务器。物理服务器的组成示意图如图2和图3所示,图2示出了物理服务器中的软硬件部署情况,图3示出了物理服务器的硬件组成情况。参见图2,物理服务器包含硬件平台110,硬件平台110中可以包括服务器物理结构中的硬盘、中央处理器、网络接口和存储器等。在硬件平台110上可运行软件平台112,软件平台112可包含虚拟化软件、虚拟机的操作系统、虚拟机的通信软件以及虚拟机的应用软件等软件。虚拟化软件(例如,Hypervisor)是物理硬件和虚拟机之间的中间层,负责协调各个虚拟机对硬件平台的访问。Hypervisor又称为虚拟机监视器VMM(Virtual Machine Monitor),VMM可包括实现虚拟机的虚拟硬件平台,虚拟硬件平台中包含了虚拟出来的存储器,中央处理器,硬盘,显卡和网络接口等。在VMM之上运行了多个虚拟机VM1至VMn,虚拟机的软件系统运行在虚拟机监视器的虚拟硬件平台上。虚拟机之间的通信需要虚拟交换机,软件平台112还包括虚拟机的通信软件,例如虚拟交换机。
参见图3,物理服务器可以包括处理单元101和通信接口102,处理单元101用于执行物理服务器上运行的操作系统以及各种软件程序所定义的功能,例如,上述图2中所示出的软件平台112上各种软件组件的功能,例如,处理单元用于实现VMM的功能,或者用于实现虚拟交换机的功能,或者用于实现虚拟机的功能。通信接口102用于与其他设备进行通信交互,其他设备可以是其它物理服务器,可选地,通信接口102可以是网络适配卡。可选地,该物理服务器还可以包括输入/输出接口103,输入/输出接口103连接有输入/输出设备,用于接收输入的信息,输出操作结果。输入/输出接口103可以为鼠标、键盘、显示 器、或者光驱等。可选地,该物理服务器还可以包括辅助存储器104,一般也称为外存,辅助存储器104的存储介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如光盘)、或者半导体介质(例如固态硬盘)等。处理单元101可以有多种具体实现形式,例如处理单元101可以包括处理器1011和内存1012,处理器1011根据内存1012中存储的程序单元执行相关的操作,处理器1011可以为中央处理器(Central Processing Unit,CPU)或图像处理器(Graphics Processing Unit,GPU),处理器1011可以是单核处理器或多核处理器。处理单元101也可以单独采用内置处理逻辑的逻辑器件来实现,例如现场可编程门阵列(英文全称:Field Programmable Gate Array,缩写:FPGA)或数字信号处理器(英文:digital signal processor,DSP)等。此外,图2仅仅是一个物理服务器的一个例子,物理服务器可能包含相比于图2展示的更多或者更少的组件,或者有不同的组件配置方式。
可选地,图4是本申请实施例提供的一种云平台的结构示意图,如图4所示,云平台00包括多个计算节点,该多个计算节点包括镜像文件存储节点001、镜像服务节点002、镜像文件转换节点003、虚拟机创建节点004和虚拟机存储节点005。每个计算节点均可以是一台云服务器,计算节点之间的通信可以采用互连总线相连或者网络相连的方式;或者多个计算节点集成在同一云服务器中,本申请实施例对此不做限定。
客户端01在获取软件运行环境中的软件的数据生成客户端镜像文件后,将客户端镜像文件上传至镜像文件存储节点001。可选的,客户端镜像文件的镜像格式可以为vhd、qcow2、zvhd或vmdk等社区格式,本申请实施例对客户端镜像文件的镜像格式不做限定。其中,软件运行环境中的软件包括操作系统和应用软件,该软件运行环境可以是本地虚拟机、公有云平台、私有云平台、混合云平台和IDC机房等数据中心的软件运行环境,本申请对软件运行环境的硬件载体不做限定。
镜像文件存储节点001用于存储客户端01上传的客户端镜像文件,镜像文件存储节点001可以是对象存储服务(Object Storage Service,OBS)用户桶。
镜像服务节点002用于提供组合应用程序接口(Application Program Interface,API)服务,组合API从镜像文件存储节点001中下载客户端镜像文件,并将客户端镜像文件传输至镜像文件转换节点003。
镜像文件转换节点003用于将客户端镜像文件的镜像格式转换为指定镜像格式,该指定镜像格式下的镜像文件可支持大规模挂载,例如该指定镜像格式可以为qcow2格式,其中,在windows操作系统中,挂载通常是指给磁盘分区(包括被虚拟出来的磁盘分区)分配一个盘符。第三方软件,如磁盘分区管理软件、虚拟磁盘软件等,通常也附带挂载功能。在linux操作系统中,挂载是指将一个设备(通常是存储设备)挂接到一个已存在的目录上。镜像文件转换节点003还用于在对指定镜像格式的客户端镜像文件进行挂载处理后,对其进行后台许可处理,并将镜像文件的镜像格式转换为云平台所支持的目标格式,例如该目标格式可以为zvhd格式,以得到云平台镜像文件。其中,后台许可处理包括清除许可证处理和植入许可证处理,或者,后台许可处理包括植入许可证处理,该后台许可处理的实现过程详见方法实施例。
虚拟机创建节点004用于基于云平台镜像文件创建虚拟机。
虚拟机存储节点005用于存储虚拟机创建节点004所创建的虚拟机。
需要说明的是,本申请实施例提供的云平台兼容BYOL模式的迁移业务和BLEP模式的迁移业务。云平台向客户端提供镜像文件迁移服务,客户端在显示页面上显示镜像服务控制界面。示例的,图5是本申请实施例提供的一种在客户端上显示镜像服务控制界面的示意图,如图5所示,该镜像服务控制界面上包括许可证类型选项,许可证类型选项包括BYOL选项和BLEP选项,当云平台接收到对镜像服务控制界面上的BYOL选项的触发指令后,执行BYOL模式所对应的虚拟机管理方法;当云平台接收到对镜像服务控制界面上的BLEP选项的触发指令后,执行BLEP模式所对应的虚拟机管理方法。参见图5,镜像服务控制界面上还包括镜像文件上传框、名称文本框和OS版本选择框,镜像文件上传框用于从客户端中选取所需上传的客户端镜像文件,名称文本框用于填写客户端镜像文件的名称,OS版本选择框用于选择上传的客户端镜像文件的OS版本,本申请实施例对镜像服务控制界面的界面元素的内容和类型均不做限定。
本申请以下实施例对BYOL模式所对应的虚拟机管理方法和BLEP模式所对应的虚拟机管理方法的实现过程分别进行说明。
图6是本申请实施例提供的BYOL模式所对应的云平台的虚拟机管理方法的流程图,可以应用于如图1所示的系统中的云平台00,如图6所示,该方法包括:
在步骤201中,获取第一客户端镜像文件和第一许可证,该第一客户端镜像文件携带有第一软件运行环境,该第一许可证用于为第一软件运行环境中的软件进行认证。
可选的,第一客户端镜像文件由第一客户端发送至云平台。第一客户端镜像文件的镜像格式可以为vhd、qcow2、zvhd或vmdk等社区格式,本申请实施例对第一客户端镜像文件的镜像格式不做限定。
可选的,第一软件运行环境中的软件可以是操作系统或应用软件。当第一软件运行环境中的软件为操作系统,第一许可证为OS许可证,用于为该操作系统进行激活认证;当第一软件运行环境中的软件为应用软件,第一许可证为软件许可证,用于为该应用软件进行激活认证。本申请以下实施例以第一软件运行环境中的软件为操作系统为例进行说明,第一软件运行环境中的软件为应用软件的情况可参考第一软件运行环境中的软件为操作系统的情况,本申请实施例中不做赘述。
在步骤202中,根据第一许可证配置第一客户端镜像文件,以生成第一云平台镜像文件,该第一云平台镜像文件携带有不收费标识。
可选的,在步骤202执行之前,云平台的虚拟机管理方法的实现过程还包括:
云平台获取第一客户端镜像文件后,检测第一客户端镜像文件的镜像格式是否支持大规模挂载;若第一客户端镜像文件的镜像格式不支持大规模挂载,则对第一客户端镜像文件进行镜像格式转换处理,使转换处理后的第一客户端镜像文件支持大规模挂载;对支持大规模挂载的第一客户端镜像文件进行挂载处理。
需要说明的是,在对第一客户端镜像文件进行挂载处理后,云平台中的镜像文件转换节点对第一客户端镜像文件进行后台许可处理,即执行步骤202。
可选的,当第一软件运行环境中的软件为操作系统,步骤202的实现过程,包括:
根据第一许可证获取第一脚本;在第一客户端镜像文件中设置第一脚本,以得到第一 云平台镜像文件。
其中,第一脚本用于:在第一虚拟机启动时,检测第一虚拟机的操作系统中是否设置有第二许可证;若第一虚拟机的操作系统中设置有第二许可证,清除第二许可证,并在操作系统中设置第一许可证;若第一虚拟机的操作系统中未设置有第二许可证,在操作系统中设置第一许可证。
可选的,第二许可证为云平台提供的许可证。
需要说明的是,在第一虚拟机启动时,检测第一虚拟机的操作系统中是否设置有云平台提供的许可证,若第一虚拟机的操作系统中设置有云平台提供的许可证,则清除该许可证,可以防止客户端从云平台的虚拟机中导出操作系统后盗用云平台提供的许可证。
可选的,当操作系统为windows操作系统,第一脚本用于:
在第一虚拟机启动时,检测第一虚拟机的windows操作系统的注册表中是否设置有第二许可证;若注册表中设置有第二许可证,清除注册表中的第二许可证,在注册表中设置第一许可证,并激活注册表中的第一许可证;若注册表中未设置有第二许可证,在注册表中设置第一许可证,并激活注册表中的第一许可证。
示例的,在BYOL模式下,当操作系统为windows操作系统,第一脚本为清理云平台提供的许可证的脚本,该第一脚本为delactivesys.bat,delactivesys.bat由镜像文件转换节点对客户端镜像文件进行后台许可处理时离线注入注册表中,得到delactivesys.reg注册表。第一虚拟机启动时,会触发C:\\Windows\\System32\\delactivesys.bat脚本执行。
离线刷入delactivesys.reg注册表内容如下:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"delactivesystem"="C:\\Windows\\System32\\delactivesys.bat"
第一虚拟机启动后,云平台先通过调用C:\windows\system32\x64\delactivesys.bat拉起C:\Windows\System32\DelActiveSystem.cmd脚本清理云平台提供的许可证,再恢复相关注册表和清理注入的脚本文件(delactivesys.bat和DelActiveSystem.cmd)。其中,delactivesys.bat脚本和DelActiveSystem.cmd脚本由镜像文件转换节点在进行后台许可处理时,离线注入到C:\Windows\System32目录下。
镜像文件转换节点离线注入delactivesys.bat脚本内容如下:
@echo off
rem调用清理激活脚本
call C:\Windows\System32\DelActiveSystem.cmd
rem设置要删除的文件的路径变量
Set DelSysFile="C:\windows\system32\DelActiveSystem.cmd"
Set DelActiveFile="c:\windows\system32\x64\delactivesys.bat"
rem还原注册表
reg delete"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"/v"delactivesystem"/f
rem清理残留文件
if exist%DelActiveFile%(del%DelActiveFile%)
if exist%DelSysFile%(del%DelSysFile%)
镜像文件转换节点离线注入DelActiveSystem.cmd脚本内容如下:
rem cmd
rem清理平台激活
cscript/nologo"C:\windows\system32\slmgr.vbs"/upk
cscript/nologo"C:\windows\system32\slmgr.vbs"/ckms
可选的,当操作系统为linux操作系统,第一脚本用于:
在第一虚拟机启动时,检测第一虚拟机的linux操作系统的软件仓库配置文件中是否设置有第二许可证;若软件仓库配置文件中设置有第二许可证,清除软件仓库配置文件中的第二许可证,并在软件仓库配置文件中设置第一许可证;若软件仓库配置文件中未设置有第二许可证,在软件仓库配置文件中设置第一许可证。
示例的,在BYOL模式下,当操作系统为linux操作系统,则读取操作系统中的yum或zypper配置目录下的软件仓库配置文件是否存在云平台提供的软件包源地址和许可证,若存在,则对其进行清理。
在步骤203中,基于第一云平台镜像文件创建第一虚拟机,该第一虚拟机中设置有第一软件运行环境,且第一虚拟机携带有不收费标识。
其中,第一虚拟机用于提供第一云平台镜像文件中的软件的运行环境。
可选的,不收费标识可以用字母、数字或字符串等表示,例如不收费标识均可以记为“byol”,本申请实施例对不收费标识的表现形式不做限定。
在步骤204中,根据不收费标识,免除第一虚拟机内第一软件运行环境中的软件的许可证费用。
本申请实施例提供的云平台的虚拟机管理方法,对于自带许可证的windows操作系统,对客户端镜像文件进行许可证清理,防止客户端盗用云平台提供的许可证,并免除windows操作系统激活和运行的许可证费用;对于自带许可证的linux操作系统,对客户端镜像文件的软件仓库配置文件中的软件包源地址和许可证进行清理,防止客户端盗用云平台提供的软件包源服务,并免除linux操作系统运行的许可证费用。本申请实施例提供的云平台,在虚拟机管理方法流程的执行过程中,云平台自动创建虚拟机并根据第一许可证完成对虚拟机中软件的激活,即实现了对第一客户端镜像文件的全自动化处理,提高了企业的业务切换上云的便捷性,进而提高了用户体验。另外,通过自带许可证的迁移上云业务为企业提供了业务平滑切换上云的服务,不额外收取自带许可证的软件的许可证费用,降低了企业的维护和运营成本。
图7是本申请实施例提供的BLEP模式所对应的云平台的虚拟机管理方法的流程图,可以应用于如图1所示的系统中的云平台00,如图6所示,该方法包括:
在步骤301中,获取第二客户端镜像文件,该第二客户端镜像文件携带有第二软件运行环境。
可选的,第二客户端镜像文件由第二客户端发送至云平台。第二客户端镜像文件的镜 像格式可以为vhd、qcow2、zvhd或vmdk等社区格式,本申请实施例对第二客户端镜像文件的镜像格式不做限定。
可选的,第二软件运行环境中的软件可以是操作系统或应用软件。
在步骤302中,根据云平台提供的第三许可证配置第二客户端镜像文件,以生成第二云平台镜像文件,该第二云平台镜像文件携带有收费标识,该第三许可证用于为第二软件运行环境中的软件进行认证。
可选的,当第二软件运行环境中的软件为操作系统,第二许可证为OS许可证,用于为该操作系统进行激活认证;当第二软件运行环境中的软件为应用软件,第二许可证为软件许可证,用于为该应用软件进行激活认证。本申请以下实施例以第二软件运行环境中的软件为操作系统为例进行说明,第二软件运行环境中的软件为应用软件的情况可参考第二软件运行环境中的软件为操作系统的情况,本申请实施例中不做赘述。
可选的,在步骤302执行之前,云平台的虚拟机管理方法的实现过程还包括:
云平台获取第二客户端镜像文件后,检测第二客户端镜像文件的镜像格式是否支持大规模挂载;若第二客户端镜像文件的镜像格式不支持大规模挂载,则对第二客户端镜像文件进行镜像格式转换处理,使转换处理后的第二客户端镜像文件支持大规模挂载;对支持大规模挂载的第二客户端镜像文件进行挂载处理。
可选的,当第二软件运行环境中的软件为操作系统,步骤302的实现过程,包括:
根据第三许可证获取第二脚本;在第二客户端镜像文件中设置第二脚本,以得到第二云平台镜像文件。
其中,第二脚本用于:在第二虚拟机启动时,检测第二虚拟机的操作系统中是否设置有第四许可证;若第二虚拟机的操作系统中设置有第四许可证,清除第四许可证,并在操作系统中设置第三许可证;若第二虚拟机操作系统中未设置有第四许可证,在操作系统中设置第三许可证。
可选的,第四许可证可以为第二客户端或其他云平台提供的许可证,也即是,第四许可证为除本申请实施例提供的云平台以外任意平台提供的许可证。若第二虚拟机的操作系统中设置有第四许可证,云平台清除第四许可证并在操作系统中设置第三许可证,也可以是,云平台采用第三许可证覆盖该第四许可证。
可选的,当操作系统为windows操作系统,第二脚本用于:
在第二虚拟机启动时,检测第二虚拟机的windows操作系统的注册表中是否设置有第四许可证;若注册表中设置有第四许可证,清除注册表中的第四许可证,在注册表中设置第三许可证,并激活注册表中的第三许可证;若注册表中未设置有第四许可证,在注册表中设置第三许可证,并激活注册表中的第三许可证。
示例的,在BLEP模式下,当操作系统为windows操作系统,第二脚本为激活许可证的脚本,该第二脚本为activesys.bat脚本,activesys.bat脚本由镜像文件转换节点对客户端镜像文件进行后台许可处理时离线注入注册表中,得到activesys.reg注册表。第一虚拟机启动时,会触发C:\\Windows\\System32\\activesys.bat脚本执行。
离线刷入activesys.reg注册表内容如下:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"activesystem"="C:\\Windows\\System32\\activesys.bat"
第一虚拟机启动后,云平台先通过调用C:\windows\system32\x64\activesys.bat拉起C:\Windows\System32\ActiveSystem.cmd脚本进行许可证激活,再恢复相关注册表和清理注入的脚本文件(activesys.bat和ActiveSystem.cmd)。其中,activesys.bat脚本和ActiveSystem.cmd脚本由镜像文件转换节点在进行后台许可处理时,离线注入到C:\Windows\System32目录下。
镜像文件转换节点离线注入activesys.bat脚本内容如下:
@echo off
rem调用激活脚本
call C:\Windows\System32\ActiveSystem.cmd
rem设置要删除的文件的路径变量
Set SysFile="C:\windows\system32\ActiveSystem.cmd"
Set ActiveFile="c:\windows\system32\x64\activesys.bat"
rem还原注册表
reg delete"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"/v"activesystem"/f
rem清理残留文件
if exist%ActiveFile%(del%ActiveFile%)
if exist%SysFile%(del%SysFile%)
镜像文件转换节点离线注入ActiveSystem.cmd脚本内容如下:
@echo off
echo"Activing the System Now"
$strKMSSrv="xx.xx.xx.xx"
$strKEY="48HP8-DN98B-MYWDG-T2DCC-8W83P"
$env:WINDIE="C:\windows"
rem平台KMS正版激活
csript/nologo"$env:WINDIE\system32\slmgr.vbs"/ipk$strKEY
csript/nologo"$env:WINDIE\system32\slmgr.vbs"/skms$strKMSSrv
csript/nologo"$env:WINDIE\system32\slmgr.vbs"/skms/ato
其中,strKMSSrv是指内网密钥管理服务(Key Management Service,KMS)服务器地址或域名。strKEY是指各个Windows操作系统对应客户端版本的KMS激活序列号。
可选的,当操作系统为linux操作系统,第二脚本用于:
在第二虚拟机启动时,检测第二虚拟机的linux操作系统的软件仓库配置文件中是否设置有第四许可证;若软件仓库配置文件中设置有第四许可证,清除软件仓库配置文件中的第四许可证,并在软件仓库配置文件中设置第三许可证;若软件仓库配置文件中未设置有第四许可证,在软件仓库配置文件中设置第三许可证。
示例的,在BLEP模式下,当操作系统为linux操作系统,则分别读取/etc/redhat-release,/etc/SuSE-release,/etc/oracle-release配置文件识别操作系统版本,分别将对应的平台提供的软件包源配置(包括软件包源地址和许可证)植入对应的yum或zypper配置目录下。
在步骤303中,基于第二云平台镜像文件创建第二虚拟机,该第二虚拟机中设置有第二软件运行环境,且第二虚拟机携带有收费标识。
其中,第二虚拟机用于提供第二云平台镜像文件中的软件的运行环境。
可选的,不收费标识可以用字母、数字或字符串等表示,本申请实施例对收费标识的表现形式不做限定。可选的,windows操作系统的OS平台为windows平台,linux操作系统的OS平台可划分为SUSE、RedHat和Oracle linux等平台。本申请实施例中,可根据OS平台类型设置收费标识。例如,windows平台的收费标识可记为“win”,SUSE平台的收费标识可记为“suse”,RedHat平台的收费标识可记为“redhat”,Oracle linux平台的收费标识可记为“oracle”。需要说明的是,本申请实施例对收费标识的划分粒度不做限定,可根据话单需求进行粒度划分。例如,每个OS平台有多个OS版本,比如,windows平台包括server 2016 standard/datacenter 64bit等版本,也可根据OS版本设置收费标识。
在步骤304中,根据收费标识,收取第二虚拟机内第二软件运行环境中的软件的许可证费用。
需要说明的是,本申请实施例提供的云平台的虚拟机管理方法,对于平台购买许可证的windows操作系统,对客户端镜像文件进行平台许可证植入,后续在创建的虚拟机启动时,自动进行KMS以激活操作系统,并根据收费标识扣除对应的许可证费用;对于平台购买许可证的linux操作系统,对客户端镜像文件进行平台软件包源地址和平台许可证植入,后续在创建的虚拟机启动时,虚拟机中运行的操作系统可直接使用软件包源服务,云平台根据收费标识扣除对于的许可证费用。在虚拟机管理方法流程的执行过程中,云平台自动创建虚拟机并根据云平台提供的第三许可证完成对虚拟机中软件的激活,即实现了对第二客户端镜像文件的全自动化处理,提高了企业的业务切换上云的便捷性,进而提高了用户体验。
上述第一客户端和第二客户端可以是同一客户端,也可以是不同客户端,本申请实施例对此不做限定。由于本申请实施例提供的云平台兼容自带许可证模式和平台购买许可证模式,上述步骤201至步骤204与上述步骤301至步骤304可以分别执行,也可以结合执行。当上述步骤201至步骤204与上述步骤301至步骤304结合执行时,上述步骤201至步骤204可以在上述步骤301至步骤304之前执行,也可以在上述步骤301至步骤304之后执行。
需要说明的是,本申请实施例提供的云平台的虚拟机管理方法的步骤先后顺序可以进行适当调整,步骤也可以根据情况进行相应增减。任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化的方法,都应涵盖在本申请的保护范围之内,因此不再赘述。
综上所述,本申请实施例提供的云平台的虚拟机管理方法,云平台兼容自带许可证模式的迁移业务和平台购买许可证的迁移业务,云平台可根据客户端选择的模式执行对应的虚拟机管理方法流程,提高了数据迁移上云的灵活性。在虚拟机管理方法流程的执行过程 中,云平台自动创建虚拟机并根据许可证完成对虚拟机中软件的激活,即实现了对客户端镜像文件的全自动化处理,提高了企业的业务切换上云的便捷性,进而提高了用户体验。其中,对于自带许可证的windows操作系统,对客户端镜像文件进行许可证清理,防止客户端盗用云平台提供的许可证,并免除windows操作系统激活和运行的许可证费用;对于自带许可证的linux操作系统,对客户端镜像文件的软件仓库配置文件中的软件包源地址和许可证进行清理,防止客户端盗用云平台提供的软件包源服务,并免除linux操作系统运行的许可证费用。本申请实施例提供的云平台,通过自带许可证的迁移上云业务为企业提供了业务平滑切换上云的服务,不额外收取自带许可证的软件的许可证费用,降低了企业的维护和运营成本。对于平台购买许可证的windows操作系统,对客户端镜像文件进行平台许可证植入,后续在创建的虚拟机启动时,自动进行KMS以激活操作系统,并根据收费标识扣除对应的许可证费用;对于平台购买许可证的linux操作系统,对客户端镜像文件进行平台软件包源地址和平台许可证植入,后续在创建的虚拟机启动时,虚拟机中运行的操作系统可直接使用软件包源服务,云平台根据收费标识扣除对于的许可证费用。
图8是本申请实施例提供的一种云平台的虚拟机管理装置的结构示意图,如图8所示,装置40包括:
第一获取模块401,用于获取第一客户端镜像文件和第一许可证,第一客户端镜像文件携带有第一软件运行环境,第一许可证用于为第一软件运行环境中的软件进行认证;
第一生成模块402,用于根据第一许可证配置第一客户端镜像文件,以生成第一云平台镜像文件,第一云平台镜像文件携带有不收费标识;
第一创建模块403,用于基于第一云平台镜像文件创建第一虚拟机,第一虚拟机中设置有第一软件运行环境,且第一虚拟机携带有不收费标识;
免除费用模块404,用于根据不收费标识,免除第一虚拟机内第一软件运行环境中的软件的许可证费用。
可选的,第一软件运行环境中的软件为操作系统,第一生成模块,用于:
根据第一许可证获取第一脚本;
在第一客户端镜像文件中设置第一脚本,以得到第一云平台镜像文件;
其中,第一脚本用于:
在第一虚拟机启动时,检测第一虚拟机的操作系统中是否设置有第二许可证;
若第一虚拟机的操作系统中设置有第二许可证,清除第二许可证,并在操作系统中设置第一许可证;
若第一虚拟机的操作系统中未设置有第二许可证,在操作系统中设置第一许可证。
可选的,操作系统为windows操作系统,第一脚本用于:
在第一虚拟机启动时,检测第一虚拟机的windows操作系统的注册表中是否设置有第二许可证;
若注册表中设置有第二许可证,清除注册表中的第二许可证,在注册表中设置第一许可证,并激活注册表中的第一许可证;
若注册表中未设置有第二许可证,在注册表中设置第一许可证,并激活注册表中的第 一许可证。
可选的,操作系统为linux操作系统,第一脚本用于:
在第一虚拟机启动时,检测第一虚拟机的linux操作系统的软件仓库配置文件中是否设置有第二许可证;
若软件仓库配置文件中设置有第二许可证,清除软件仓库配置文件中的第二许可证,并在软件仓库配置文件中设置第一许可证;
若软件仓库配置文件中未设置有第二许可证,在软件仓库配置文件中设置第一许可证。
可选的,如图9所示,装置40还包括:
第二获取模块405,用于获取第二客户端镜像文件,第二客户端镜像文件携带有第二软件运行环境;
第二生成模块406,用于根据云平台提供的第三许可证配置第二客户端镜像文件,以生成第二云平台镜像文件,第二云平台镜像文件携带有收费标识,第三许可证用于为第二软件运行环境中的软件进行认证;
第二创建模块407,用于基于第二云平台镜像文件创建第二虚拟机,第二虚拟机中设置有第二软件运行环境,且第二虚拟机携带有收费标识;
收费模块408,用于根据收费标识,收取第二虚拟机内第二软件运行环境中的软件的许可证费用。
综上所述,本申请实施例提供的云平台的虚拟机管理装置,云平台兼容自带许可证模式的迁移业务和平台购买许可证的迁移业务,可根据客户端选择的模式执行对应的虚拟机管理方法流程,提高了数据迁移上云的灵活性。在虚拟机管理方法流程的执行过程中,云平台自动创建虚拟机并根据许可证完成对虚拟机中软件的激活,即实现了对客户端镜像文件的全自动化处理,提高了企业的业务切换上云的便捷性,进而提高了用户体验。其中,对于自带许可证的windows操作系统,对客户端镜像文件进行许可证清理,防止客户端盗用云平台提供的许可证,并免除windows操作系统激活和运行的许可证费用;对于自带许可证的linux操作系统,对客户端镜像文件的软件仓库配置文件中的软件包源地址和许可证进行清理,防止客户端盗用云平台提供的软件包源服务,并免除linux操作系统运行的许可证费用。本申请实施例提供的云平台,通过自带许可证的迁移上云业务为企业提供了业务平滑切换上云的服务,不额外收取自带许可证的软件的许可证费用,降低了企业的维护和运营成本。对于平台购买许可证的windows操作系统,对客户端镜像文件进行平台许可证植入,后续在创建的虚拟机启动时,自动进行KMS以激活操作系统,并根据收费标识扣除对应的许可证费用;对于平台购买许可证的linux操作系统,对客户端镜像文件进行平台软件包源地址和平台许可证植入,后续在创建的虚拟机启动时,虚拟机中运行的操作系统可直接使用软件包源服务,云平台根据收费标识扣除对于的许可证费用。
图10是本申请另一实施例提供的一种云平台的虚拟机管理装置的结构示意图,如图10所示,装置50包括:
获取模块501,用于获取第二客户端镜像文件,第二客户端镜像文件携带有第二软件运行环境;
生成模块502,用于根据云平台提供的第三许可证配置第二客户端镜像文件,以生成第二云平台镜像文件,第二云平台镜像文件携带有收费标识,第三许可证用于为第二软件运行环境中的软件进行认证;
创建模块503,用于基于第二云平台镜像文件创建第二虚拟机,第二虚拟机中设置有第二软件运行环境,且第二虚拟机携带有收费标识;
收费模块504,用于根据收费标识,收取第二虚拟机内第二软件运行环境中的软件的许可证费用。
可选的,第二软件运行环境中的软件为操作系统,生成模块,用于:
根据第三许可证获取第二脚本;
在第二客户端镜像文件中设置第二脚本,以得到第二云平台镜像文件;
其中,第二脚本用于:
在第二虚拟机启动时,检测第二虚拟机的操作系统中是否设置有第四许可证;
若第二虚拟机的操作系统中设置有第四许可证,清除第四许可证,并在操作系统中设置第三许可证;
若第二虚拟机操作系统中未设置有第四许可证,在操作系统中设置第三许可证。
可选的,操作系统为windows操作系统,第二脚本用于:
在第二虚拟机启动时,检测第二虚拟机的windows操作系统的注册表中是否设置有第四许可证;
若注册表中设置有第四许可证,清除注册表中的第四许可证,在注册表中设置第三许可证,并激活注册表中的第三许可证;
若注册表中未设置有第四许可证,在注册表中设置第三许可证,并激活注册表中的第三许可证。
可选的,操作系统为linux操作系统,第二脚本用于:
在第二虚拟机启动时,检测第二虚拟机的linux操作系统的软件仓库配置文件中是否设置有第四许可证;
若软件仓库配置文件中设置有第四许可证,清除软件仓库配置文件中的第四许可证,并在软件仓库配置文件中设置第三许可证;
若软件仓库配置文件中未设置有第四许可证,在软件仓库配置文件中设置第三许可证。
综上所述,本申请实施例提供的云平台的虚拟机管理装置,云平台兼容自带许可证模式的迁移业务和平台购买许可证的迁移业务,可根据客户端选择的模式执行对应的虚拟机管理方法流程,提高了数据迁移上云的灵活性。在虚拟机管理方法流程的执行过程中,云平台自动创建虚拟机并根据许可证完成对虚拟机中软件的激活,即实现了对客户端镜像文件的全自动化处理,提高了企业的业务切换上云的便捷性,进而提高了用户体验。其中,对于平台购买许可证的windows操作系统,对客户端镜像文件进行平台许可证植入,后续在创建的虚拟机启动时,自动进行KMS以激活操作系统,并根据收费标识扣除对应的许可证费用;对于平台购买许可证的linux操作系统,对客户端镜像文件进行平台软件包源地址和平台许可证植入,后续在创建的虚拟机启动时,虚拟机中运行的操作系统可直接使用软件包源服务,云平台根据收费标识扣除对于的许可证费用。
本申请实施例提供了一种云平台的虚拟机管理装置,包括:
存储单元,用于存储指令;以及
至少一台处理器,与所述存储单元耦合;
其中,当所述至少一台处理器执行所述指令时,实现如图6所示的云平台的虚拟机管理方法,或者,实现如图7所示的云平台的虚拟机管理方法。
可选的,该装置可以是物理服务器,则该装置的软硬件部署情况可参见图2,该装置的硬件组成情况可参见图3,本申请在此不做赘述。
本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有指令,当所述指令被处理器执行时,实现如图6所示的云平台的虚拟机管理方法,或者,实现如图7所示的云平台的虚拟机管理方法。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种云平台的虚拟机管理方法,其特征在于,所述方法包括:
    获取第一客户端镜像文件和第一许可证,所述第一客户端镜像文件携带有第一软件运行环境,所述第一许可证用于为所述第一软件运行环境中的软件进行认证;
    根据所述第一许可证配置所述第一客户端镜像文件,以生成第一云平台镜像文件,所述第一云平台镜像文件携带有不收费标识;
    基于所述第一云平台镜像文件创建第一虚拟机,所述第一虚拟机中设置有所述第一软件运行环境,且所述第一虚拟机携带有所述不收费标识;
    根据所述不收费标识,免除所述第一虚拟机内所述第一软件运行环境中的软件的许可证费用。
  2. 根据权利要求1所述的方法,其特征在于,所述第一软件运行环境中的软件为操作系统,所述根据所述第一许可证配置所述第一客户端镜像文件,以生成第一云平台镜像文件,包括:
    根据所述第一许可证获取第一脚本;
    在所述第一客户端镜像文件中设置所述第一脚本,以得到所述第一云平台镜像文件;
    其中,所述第一脚本用于:
    在所述第一虚拟机启动时,检测所述第一虚拟机的操作系统中是否设置有第二许可证;
    若所述第一虚拟机的操作系统中设置有所述第二许可证,清除所述第二许可证,并在所述操作系统中设置所述第一许可证;
    若所述第一虚拟机的操作系统中未设置有所述第二许可证,在所述操作系统中设置所述第一许可证。
  3. 根据权利要求2所述的方法,其特征在于,所述操作系统为windows操作系统,所述第一脚本用于:
    在所述第一虚拟机启动时,检测所述第一虚拟机的windows操作系统的注册表中是否设置有第二许可证;
    若所述注册表中设置有所述第二许可证,清除所述注册表中的第二许可证,在所述注册表中设置所述第一许可证,并激活所述注册表中的第一许可证;
    若所述注册表中未设置有所述第二许可证,在所述注册表中设置所述第一许可证,并激活所述注册表中的第一许可证。
  4. 根据权利要求2所述的方法,其特征在于,所述操作系统为linux操作系统,所述第一脚本用于:
    在所述第一虚拟机启动时,检测所述第一虚拟机的linux操作系统的软件仓库配置文件中是否设置有第二许可证;
    若所述软件仓库配置文件中设置有所述第二许可证,清除所述软件仓库配置文件中的第二许可证,并在所述软件仓库配置文件中设置所述第一许可证;
    若所述软件仓库配置文件中未设置有所述第二许可证,在所述软件仓库配置文件中设置所述第一许可证。
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    获取第二客户端镜像文件,所述第二客户端镜像文件携带有第二软件运行环境;
    根据所述云平台提供的第三许可证配置所述第二客户端镜像文件,以生成第二云平台镜像文件,所述第二云平台镜像文件携带有收费标识,所述第三许可证用于为所述第二软件运行环境中的软件进行认证;
    基于所述第二云平台镜像文件创建第二虚拟机,所述第二虚拟机中设置有所述第二软件运行环境,且所述第二虚拟机携带有所述收费标识;
    根据所述收费标识,收取所述第二虚拟机内所述第二软件运行环境中的软件的许可证费用。
  6. 一种云平台的虚拟机管理方法,其特征在于,所述方法包括:
    获取第二客户端镜像文件,所述第二客户端镜像文件携带有第二软件运行环境;
    根据所述云平台提供的第三许可证配置所述第二客户端镜像文件,以生成第二云平台镜像文件,所述第二云平台镜像文件携带有收费标识,所述第三许可证用于为所述第二软件运行环境中的软件进行认证;
    基于所述第二云平台镜像文件创建第二虚拟机,所述第二虚拟机中设置有所述第二软件运行环境,且所述第二虚拟机携带有所述收费标识;
    根据所述收费标识,收取所述第二虚拟机内所述第二软件运行环境中的软件的许可证费用。
  7. 根据权利要求6所述的方法,其特征在于,所述第二软件运行环境中的软件为操作系统,所述根据所述云平台提供的第三许可证配置所述第二客户端镜像文件,以生成第二云平台镜像文件,包括:
    根据所述第三许可证获取第二脚本;
    在所述第二客户端镜像文件中设置所述第二脚本,以得到所述第二云平台镜像文件;
    其中,所述第二脚本用于:
    在所述第二虚拟机启动时,检测所述第二虚拟机的操作系统中是否设置有第四许可证;
    若所述第二虚拟机的操作系统中设置有所述第四许可证,清除所述第四许可证,并在所述操作系统中设置所述第三许可证;
    若所述第二虚拟机操作系统中未设置有所述第四许可证,在所述操作系统中设置所述第三许可证。
  8. 根据权利要求7所述的方法,其特征在于,所述操作系统为windows操作系统,所述第二脚本用于:
    在所述第二虚拟机启动时,检测所述第二虚拟机的windows操作系统的注册表中是否 设置有第四许可证;
    若所述注册表中设置有所述第四许可证,清除所述注册表中的第四许可证,在所述注册表中设置所述第三许可证,并激活所述注册表中的第三许可证;
    若所述注册表中未设置有所述第四许可证,在所述注册表中设置所述第三许可证,并激活所述注册表中的第三许可证。
  9. 根据权利要求7所述的方法,其特征在于,所述操作系统为linux操作系统,所述第二脚本用于:
    在所述第二虚拟机启动时,检测所述第二虚拟机的linux操作系统的软件仓库配置文件中是否设置有第四许可证;
    若所述软件仓库配置文件中设置有所述第四许可证,清除所述软件仓库配置文件中的第四许可证,并在所述软件仓库配置文件中设置所述第三许可证;
    若所述软件仓库配置文件中未设置有所述第四许可证,在所述软件仓库配置文件中设置所述第三许可证。
  10. 一种云平台的虚拟机管理装置,其特征在于,所述装置包括:
    第一获取模块,用于获取第一客户端镜像文件和第一许可证,所述第一客户端镜像文件携带有第一软件运行环境,所述第一许可证用于为所述第一软件运行环境中的软件进行认证;
    第一生成模块,用于根据所述第一许可证配置所述第一客户端镜像文件,以生成第一云平台镜像文件,所述第一云平台镜像文件携带有不收费标识;
    第一创建模块,用于基于所述第一云平台镜像文件创建第一虚拟机,所述第一虚拟机中设置有所述第一软件运行环境,且所述第一虚拟机携带有所述不收费标识;
    免除费用模块,用于根据所述不收费标识,免除所述第一虚拟机内所述第一软件运行环境中的软件的许可证费用。
  11. 根据权利要求10所述的装置,其特征在于,所述第一软件运行环境中的软件为操作系统,所述第一生成模块,用于:
    根据所述第一许可证获取第一脚本;
    在所述第一客户端镜像文件中设置所述第一脚本,以得到所述第一云平台镜像文件;
    其中,所述第一脚本用于:
    在所述第一虚拟机启动时,检测所述第一虚拟机的操作系统中是否设置有第二许可证;
    若所述第一虚拟机的操作系统中设置有所述第二许可证,清除所述第二许可证,并在所述操作系统中设置所述第一许可证;
    若所述第一虚拟机的操作系统中未设置有所述第二许可证,在所述操作系统中设置所述第一许可证。
  12. 根据权利要求11所述的装置,其特征在于,所述操作系统为windows操作系统, 所述第一脚本用于:
    在所述第一虚拟机启动时,检测所述第一虚拟机的windows操作系统的注册表中是否设置有第二许可证;
    若所述注册表中设置有所述第二许可证,清除所述注册表中的第二许可证,在所述注册表中设置所述第一许可证,并激活所述注册表中的第一许可证;
    若所述注册表中未设置有所述第二许可证,在所述注册表中设置所述第一许可证,并激活所述注册表中的第一许可证。
  13. 根据权利要求11所述的装置,其特征在于,所述操作系统为linux操作系统,所述第一脚本用于:
    在所述第一虚拟机启动时,检测所述第一虚拟机的linux操作系统的软件仓库配置文件中是否设置有第二许可证;
    若所述软件仓库配置文件中设置有所述第二许可证,清除所述软件仓库配置文件中的第二许可证,并在所述软件仓库配置文件中设置所述第一许可证;
    若所述软件仓库配置文件中未设置有所述第二许可证,在所述软件仓库配置文件中设置所述第一许可证。
  14. 根据权利要求10所述的装置,其特征在于,所述装置还包括:
    第二获取模块,用于获取第二客户端镜像文件,所述第二客户端镜像文件携带有第二软件运行环境;
    第二生成模块,用于根据所述云平台提供的第三许可证配置所述第二客户端镜像文件,以生成第二云平台镜像文件,所述第二云平台镜像文件携带有收费标识,所述第三许可证用于为所述第二软件运行环境中的软件进行认证;
    第二创建模块,用于基于所述第二云平台镜像文件创建第二虚拟机,所述第二虚拟机中设置有所述第二软件运行环境,且所述第二虚拟机携带有所述收费标识;
    收费模块,用于根据所述收费标识,收取所述第二虚拟机内所述第二软件运行环境中的软件的许可证费用。
  15. 一种云平台的虚拟机管理装置,其特征在于,所述装置包括:
    获取模块,用于获取第二客户端镜像文件,所述第二客户端镜像文件携带有第二软件运行环境;
    生成模块,用于根据所述云平台提供的第三许可证配置所述第二客户端镜像文件,以生成第二云平台镜像文件,所述第二云平台镜像文件携带有收费标识,所述第三许可证用于为所述第二软件运行环境中的软件进行认证;
    创建模块,用于基于所述第二云平台镜像文件创建第二虚拟机,所述第二虚拟机中设置有所述第二软件运行环境,且所述第二虚拟机携带有所述收费标识;
    收费模块,用于根据所述收费标识,收取所述第二虚拟机内所述第二软件运行环境中的软件的许可证费用。
  16. 根据权利要求15所述的装置,其特征在于,所述第二软件运行环境中的软件为操作系统,所述生成模块,用于:
    根据所述第三许可证获取第二脚本;
    在所述第二客户端镜像文件中设置所述第二脚本,以得到所述第二云平台镜像文件;
    其中,所述第二脚本用于:
    在所述第二虚拟机启动时,检测所述第二虚拟机的操作系统中是否设置有第四许可证;
    若所述第二虚拟机的操作系统中设置有所述第四许可证,清除所述第四许可证,并在所述操作系统中设置所述第三许可证;
    若所述第二虚拟机操作系统中未设置有所述第四许可证,在所述操作系统中设置所述第三许可证。
  17. 根据权利要求16所述的装置,其特征在于,所述操作系统为windows操作系统,所述第二脚本用于:
    在所述第二虚拟机启动时,检测所述第二虚拟机的windows操作系统的注册表中是否设置有第四许可证;
    若所述注册表中设置有所述第四许可证,清除所述注册表中的第四许可证,在所述注册表中设置所述第三许可证,并激活所述注册表中的第三许可证;
    若所述注册表中未设置有所述第四许可证,在所述注册表中设置所述第三许可证,并激活所述注册表中的第三许可证。
  18. 根据权利要求16所述的装置,其特征在于,所述操作系统为linux操作系统,所述第二脚本用于:
    在所述第二虚拟机启动时,检测所述第二虚拟机的linux操作系统的软件仓库配置文件中是否设置有第四许可证;
    若所述软件仓库配置文件中设置有所述第四许可证,清除所述软件仓库配置文件中的第四许可证,并在所述软件仓库配置文件中设置所述第三许可证;
    若所述软件仓库配置文件中未设置有所述第四许可证,在所述软件仓库配置文件中设置所述第三许可证。
  19. 一种云平台的虚拟机管理装置,其特征在于,包括:
    存储单元,用于存储指令;以及
    至少一台处理器,与所述存储单元耦合;
    其中,当所述至少一台处理器执行所述指令时,实现如权利要求1至5任一所述的云平台的虚拟机管理方法,或者,实现如权利要求6至9任一所述的云平台的虚拟机管理方法。
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有指令,当所述指令被处理器执行时,实现如权利要求1至5任一所述的云平台的虚拟机管理方法,或者,实现如权利要求6至9任一所述的云平台的虚拟机管理方法。
PCT/CN2019/105681 2018-09-17 2019-09-12 云平台的虚拟机管理方法及装置 WO2020057437A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
EP19863204.4A EP3846024B1 (en) 2018-09-17 2019-09-12 Virtual machine management method and device for cloud platform
JP2021538884A JP7137711B2 (ja) 2018-09-17 2019-09-12 クラウドプラットフォームのための仮想マシン管理方法および装置
SG11202102657VA SG11202102657VA (en) 2018-09-17 2019-09-12 Virtual machine management method and apparatus for cloud platform
US17/202,806 US20210224099A1 (en) 2018-09-17 2021-03-16 Virtual Machine Management Method and Apparatus for Cloud Platform
JP2022140158A JP2022188026A (ja) 2018-09-17 2022-09-02 クラウドプラットフォームのための仮想マシン管理方法および装置

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811082104.6A CN109460281B (zh) 2018-09-17 2018-09-17 云平台的虚拟机管理方法及装置
CN201811082104.6 2018-09-17

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/202,806 Continuation US20210224099A1 (en) 2018-09-17 2021-03-16 Virtual Machine Management Method and Apparatus for Cloud Platform

Publications (1)

Publication Number Publication Date
WO2020057437A1 true WO2020057437A1 (zh) 2020-03-26

Family

ID=65606734

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/105681 WO2020057437A1 (zh) 2018-09-17 2019-09-12 云平台的虚拟机管理方法及装置

Country Status (6)

Country Link
US (1) US20210224099A1 (zh)
EP (1) EP3846024B1 (zh)
JP (2) JP7137711B2 (zh)
CN (3) CN109460281B (zh)
SG (1) SG11202102657VA (zh)
WO (1) WO2020057437A1 (zh)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109460281B (zh) * 2018-09-17 2021-02-26 华为技术有限公司 云平台的虚拟机管理方法及装置
CN110222517B (zh) * 2019-05-13 2023-04-18 深圳电通信息技术有限公司 一种按需收费的云软件管理方法及系统
CN110413374A (zh) * 2019-06-28 2019-11-05 苏州浪潮智能科技有限公司 一种基于云平台的激活的方法和装置
CN110932900B (zh) * 2019-11-29 2022-07-08 杭州安恒信息技术股份有限公司 云管理平台与云安全管理平台业务对接的方法和系统
CN113741945B (zh) * 2020-08-21 2024-02-13 上海达龙信息科技有限公司 基于云应用的应用磁盘热更新方法、装置、介质及设备
CN112015520A (zh) * 2020-09-14 2020-12-01 支付宝(杭州)信息技术有限公司 数据上传系统及方法
CN112286635B (zh) * 2020-10-29 2022-10-25 卓尔智联(武汉)研究院有限公司 一种热迁移的方法、装置及电子设备
CN113326098B (zh) * 2021-06-11 2023-11-14 成都精灵云科技有限公司 支持kvm虚拟化与容器虚拟化的云管平台

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572239A (zh) * 2013-10-18 2015-04-29 宇宙互联有限公司 利用云平台制作模板的系统及方法
CN104679574A (zh) * 2013-11-26 2015-06-03 谢蓉 云计算中虚拟机镜像管理系统
CN107734018A (zh) * 2017-09-29 2018-02-23 中国石油化工股份有限公司 快速部署云应用服务的系统和方法
CN107888695A (zh) * 2017-11-23 2018-04-06 新华三云计算技术有限公司 云平台创建镜像的方法和云平台设备
US20180247082A1 (en) * 2016-08-11 2018-08-30 Intel Corporation Secure Public Cloud with Protected Guest-Verified Host Control
CN109460281A (zh) * 2018-09-17 2019-03-12 华为技术有限公司 云平台的虚拟机管理方法及装置

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080147530A1 (en) * 2006-12-19 2008-06-19 Kwan Shu-Leung Programmatically transferring applications between handsets based on license information
US9053472B2 (en) * 2010-02-26 2015-06-09 Red Hat, Inc. Offering additional license terms during conversion of standard software licenses for use in cloud computing environments
US10783504B2 (en) 2010-02-26 2020-09-22 Red Hat, Inc. Converting standard software licenses for use in cloud computing environments
DE112011103872T5 (de) * 2010-11-23 2013-08-22 International Business Machines Corporation Verfahren, Computer-Programm und System, um die Voraussetzung eines virtuellen Abbild eines Software-Produkts zu verwalten
US20120216269A1 (en) * 2011-02-18 2012-08-23 Mitel Networks Corporation Software licensing in a virtualization environment
US8468139B1 (en) 2012-07-16 2013-06-18 Dell Products L.P. Acceleration of cloud-based migration/backup through pre-population
US20140283090A1 (en) * 2013-03-15 2014-09-18 Jupiter Systems Licensing using a node locked virtual machine
US9871851B2 (en) * 2014-06-30 2018-01-16 EMC IP Holding Company LLC Migrating private infrastructure services to a cloud
CN105573830B (zh) * 2014-10-09 2019-07-19 中国银联股份有限公司 一种虚拟机迁移方法
US10182103B2 (en) 2014-10-16 2019-01-15 Amazon Technologies, Inc. On-demand delivery of applications to virtual desktops
US10152211B2 (en) * 2014-11-11 2018-12-11 Amazon Technologies, Inc. Application delivery agents on virtual desktop instances
CN105100067B (zh) * 2015-06-26 2018-09-18 上海庆科信息技术有限公司 一种云端激活方法与系统
JP2017058711A (ja) * 2015-09-14 2017-03-23 富士通株式会社 ライセンス管理装置、ライセンス管理システム、ライセンス管理プログラムおよびライセンス管理方法
CN106911744B (zh) * 2015-12-23 2019-11-08 北京神州泰岳软件股份有限公司 一种镜像文件的管理方法和管理装置
US10387198B2 (en) * 2016-08-11 2019-08-20 Rescale, Inc. Integrated multi-provider compute platform
US20180113999A1 (en) 2016-10-25 2018-04-26 Flexera Software Llc Incorporating license management data into a virtual machine
CN108132826B (zh) * 2016-11-30 2020-12-22 华为技术有限公司 跨云服务器的镜像管理方法、装置及服务器
JP2018163502A (ja) * 2017-03-24 2018-10-18 富士通株式会社 制御プログラム、制御方法および情報処理装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572239A (zh) * 2013-10-18 2015-04-29 宇宙互联有限公司 利用云平台制作模板的系统及方法
CN104679574A (zh) * 2013-11-26 2015-06-03 谢蓉 云计算中虚拟机镜像管理系统
US20180247082A1 (en) * 2016-08-11 2018-08-30 Intel Corporation Secure Public Cloud with Protected Guest-Verified Host Control
CN107734018A (zh) * 2017-09-29 2018-02-23 中国石油化工股份有限公司 快速部署云应用服务的系统和方法
CN107888695A (zh) * 2017-11-23 2018-04-06 新华三云计算技术有限公司 云平台创建镜像的方法和云平台设备
CN109460281A (zh) * 2018-09-17 2019-03-12 华为技术有限公司 云平台的虚拟机管理方法及装置

Also Published As

Publication number Publication date
EP3846024A4 (en) 2021-11-03
US20210224099A1 (en) 2021-07-22
SG11202102657VA (en) 2021-04-29
CN109460281A (zh) 2019-03-12
EP3846024A1 (en) 2021-07-07
EP3846024B1 (en) 2024-05-01
CN113076173A (zh) 2021-07-06
CN112905299B (zh) 2022-04-29
CN109460281B (zh) 2021-02-26
CN112905299A (zh) 2021-06-04
JP2022188026A (ja) 2022-12-20
JP7137711B2 (ja) 2022-09-14
JP2021536652A (ja) 2021-12-27

Similar Documents

Publication Publication Date Title
WO2020057437A1 (zh) 云平台的虚拟机管理方法及装置
US11693680B2 (en) Virtual computing systems and methods
US20130132247A1 (en) Management apparatus, management method, and recording medium of management program
US9785544B2 (en) Testing a mobile application
US10747585B2 (en) Methods and apparatus to perform data migration in a distributed environment
US10922445B2 (en) Computing systems and methods
US9652263B2 (en) Migrating servers into a secured environment
CN103975306A (zh) 用于创建虚拟设备的方法和系统
KR20210118130A (ko) 초기 프로그램 로드 메커니즘을 사용하는 보안 게스트의 시작
US9766912B1 (en) Virtual machine configuration
AU2020426828B2 (en) Reserving one or more security modules for secure guest
EP4214602A1 (en) Application migration
US11263053B2 (en) Tag assisted cloud resource identification for onboarding and application blueprint construction
TW202307711A (zh) 安全客體映像及後設資料更新
US11409615B2 (en) Cloning storage volumes from backup
US11803634B2 (en) Secure preconfigured profile for role-based access control setup
Yan Automated administration of virtual machines and networks on the vmware esx platform
Pashaie A study evaluating open source cloud computing platforms

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19863204

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021538884

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019863204

Country of ref document: EP

Effective date: 20210401