CN115292000B - Method, device and electronic device for dynamic migration of virtual machines - Google Patents

Method, device and electronic device for dynamic migration of virtual machines Download PDF

Info

Publication number
CN115292000B
CN115292000B CN202210877002.3A CN202210877002A CN115292000B CN 115292000 B CN115292000 B CN 115292000B CN 202210877002 A CN202210877002 A CN 202210877002A CN 115292000 B CN115292000 B CN 115292000B
Authority
CN
China
Prior art keywords
type
register
virtual machine
migrated
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210877002.3A
Other languages
Chinese (zh)
Other versions
CN115292000A (en
Inventor
刘强
王夕波
王春林
阳春光
李成
韩丁
湛松涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Cloud Technology Co Ltd
Original Assignee
China Telecom Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Cloud Technology Co Ltd filed Critical China Telecom Cloud Technology Co Ltd
Priority to CN202210877002.3A priority Critical patent/CN115292000B/en
Publication of CN115292000A publication Critical patent/CN115292000A/en
Priority to PCT/CN2022/141594 priority patent/WO2024021480A1/en
Application granted granted Critical
Publication of CN115292000B publication Critical patent/CN115292000B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • G06F9/5088Techniques for rebalancing the load in a distributed system involving task migration
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/4557Distribution of virtual machine instances; Migration and load balancing

Landscapes

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

Abstract

一种虚拟机动态迁移的方法、装置及电子设备,该方法包括:确定出源主机上的待迁移虚拟机的类型,响应于类型与预设类型一致,将符合条件的中断控制器对应的数据结构进行存储,将数据结构添加至待迁移虚拟机的迁移传输数据中,基于迁移传输数据将待迁移虚拟机从源主机迁移至目标主机。通过上述的方法,将迁移传输数据从源主机迁移至目标主机,从而实现基于硬件透传虚拟机的迁移,将迁移传输数据传输至目标主机之后,能够使得虚拟机在目标主机上恢复运行。

A method, device and electronic device for dynamic migration of a virtual machine, the method comprising: determining the type of the virtual machine to be migrated on the source host, storing a data structure corresponding to an interrupt controller that meets the conditions in response to the type being consistent with a preset type, adding the data structure to the migration transmission data of the virtual machine to be migrated, and migrating the virtual machine to be migrated from the source host to the target host based on the migration transmission data. Through the above method, the migration transmission data is migrated from the source host to the target host, thereby realizing the migration of the virtual machine based on hardware transparent transmission, and after the migration transmission data is transmitted to the target host, the virtual machine can be restored to run on the target host.

Description

Virtual machine dynamic migration method and device and electronic equipment
Technical Field
The present application relates to the field of cloud computing virtualization technologies, and in particular, to a method and an apparatus for dynamic migration of a virtual machine, and an electronic device.
Background
With development of cloud computing virtualization technology, dynamic migration of virtual machines is a process of moving a virtual machine system from one physical host to another physical host while ensuring normal operation of virtual machine services, and the process does not have obvious influence on users, so that an administrator can maintain or upgrade the physical hosts offline without affecting normal use of the users.
In order to ensure that virtual machine services are available in the migration process, the migration process only occupies very short downtime, the dynamic migration actually encapsulates the configuration of the virtual machine in a file, and then quickly transmits the configuration and the memory running state of the virtual machine from a source host to a destination host through a high-speed network, so that the source host transfers control to the destination host, and the virtual machine system continues to run on the destination host, thereby realizing the dynamic migration of the virtual machine.
At present, the dynamic migration of the virtual machine is realized based on software, and the migration technology of the hardware transparent virtual machine is lacked.
Disclosure of Invention
The application provides a method, a device and electronic equipment for dynamically migrating a virtual machine, which realize the dynamic migration of the virtual machine based on hardware.
In a first aspect, the present application provides a method for dynamically migrating a virtual machine, where the method includes:
determining the type of a virtual machine to be migrated on a source host;
Responding to the type consistent with the preset type, and storing a data structure corresponding to the interrupt controller which accords with the condition;
adding the data structure to migration transmission data of the virtual machine to be migrated;
And migrating the virtual machine to be migrated from a source host to a target host based on the migration transmission data.
By the method, after the types of the virtual machines on the source host are classified, migration transmission data containing the data structure is stored, so that the virtual machines can be migrated from the source host to the target host, and the registers of the target host can be restored.
In one possible design, responsive to the type being consistent with a preset type, the method includes:
matching the type of the virtual machine to be migrated with each preset type in a preset type set;
and when the preset type consistent with the type is matched, responding to the type consistent with the preset type.
By the method, the types of the virtual machines to be migrated are matched with the preset types of the virtual machines, and when the virtual machines to be migrated are matched with the virtual machines consistent with the preset types, the virtual machines to be migrated are determined to accord with the virtual machines of the preset types, so that the screening of the virtual machines based on the types of the virtual machines is realized.
In one possible design, storing a data structure corresponding to a eligible interrupt controller includes:
extracting the interrupt controller of the type, and extracting the register type of a register in the interrupt controller and data corresponding to the register;
And associating the register type with the data, generating a data structure, and storing the data structure.
By the method, the interrupt controller of the type is determined, the type and the data of the register in the interrupt controller are extracted, the type and the data are associated, a data structure is generated, and the data structure is stored, so that recovery of the virtual machine is ensured.
In one possible design, after the virtual machine to be migrated is migrated from the source host to the target host based on the migration transmission data, the method includes:
controlling a CPU on the target host to start and restore the virtual machine of the interrupt controller;
Extracting a preset register in the interrupt controller of the type and reading the preset register;
and inputting the register data into a preset register to realize the injection of the register data.
By the method, the server controls the target host to start and resume the virtual machine corresponding to the interrupt controller, and inputs the register data into the register in the interrupt controller, so that the injection of the terminal program is realized.
In a second aspect, the present application provides an apparatus for dynamic migration of a virtual machine, the apparatus comprising:
The determining module is used for determining the type of the virtual machine to be migrated on the source host;
The storage module is used for responding to the fact that the type is consistent with the preset type and storing the data structure corresponding to the interrupt controller which meets the condition;
The matching module is used for adding the data structure into migration transmission data of the virtual machine to be migrated;
and the migration module is used for migrating the virtual machine to be migrated from the source host to the target host based on the migration transmission data.
In one possible design, the storage module is specifically configured to match a type of the to-be-migrated virtual machine with each preset type in a preset type set, and when a preset type consistent with the type is matched, respond to the type consistent with the preset type.
In one possible design, the storage module is further configured to extract the type of interrupt controller, extract a register type of a register in the interrupt controller and data corresponding to the register, associate the register type with the data, generate a data structure, and store the data structure.
In one possible design, the migration module is specifically configured to control a CPU on the target host to start and restore a virtual machine of the type of interrupt controller, extract a preset register in the type of interrupt controller, read the preset register, and input the register data into the preset register, so as to implement injection of the register data.
In a third aspect, the present application provides an electronic device, comprising:
a memory for storing a computer program;
and the processor is used for realizing the method steps of the dynamic migration of the virtual machine when executing the computer program stored on the memory.
In a fourth aspect, a computer readable storage medium has stored therein a computer program which, when executed by a processor, performs the method steps of a virtual machine live migration described above.
The technical effects of each of the first to fourth aspects and the technical effects that may be achieved by each aspect are referred to above for the technical effects that may be achieved by the first aspect or the various possible aspects of the first aspect, and are not repeated here.
Drawings
FIG. 1 is a flowchart illustrating steps of a method for dynamically migrating a virtual machine according to the present application;
FIG. 2 is a flow chart of a physical lapic dynamic migration source host provided by the present application;
FIG. 3 is a flowchart of a physical lapic dynamic migration target host provided by the present application;
FIG. 4 is a schematic diagram of a virtual machine dynamic migration apparatus according to the present application;
fig. 5 is a schematic structural diagram of an electronic device according to the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings. The specific method of operation in the method embodiment may also be applied to the device embodiment or the system embodiment. In the description of the present application, "a plurality of" means "at least two". "and/or" describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate that there are three cases of a alone, a and B together, and B alone. A and B are connected, and it can be represented that A and B are directly connected and A and B are connected through C. In addition, in the description of the present application, the words "first," "second," and the like are used merely for distinguishing between the descriptions and not be construed as indicating or implying a relative importance or order.
Currently, in order to realize the dynamic migration of the virtual machine, a mode is adopted that the dynamic migration is realized based on software and apic simulation, on a 'lapic' transparent high-performance virtual machine, the virtual machine directly uses the physical lapic, and the state of the physical lapic is in a physical register, and the dynamic migration method of the hardware transparent virtual machine is lacking because the dynamic migration is realized based on software and lapic simulation.
In order to solve the above-described problems, an embodiment of the present application provides a method for dynamically migrating a virtual machine, which is used for dynamically migrating the virtual machine based on hardware transparent transmission. The method and the device according to the embodiments of the present application are based on the same technical concept, and because the principles of the problems solved by the method and the device are similar, the embodiments of the device and the method can be referred to each other, and the repetition is not repeated.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 1, the application provides a method for dynamically migrating a virtual machine, which can realize dynamic migration based on hardware transparent virtual machines, and the implementation flow of the method is as follows:
And S1, determining the type of the virtual machine to be migrated on the source host.
In order to realize the dynamic migration of the virtual machine based on hardware transparent transmission, the embodiment of the application firstly needs to determine the type of the source host of the virtual machine to be migrated on the source host, the type of the host to be migrated can be a virtual machine capable of being added with 'lapic' transparent transmission, and in the embodiment of the application, the virtual machine to be migrated is a virtual machine capable of being transparent transmission, and the application needs to supplement that lapic in the file is an interrupt controller.
And step S2, storing a data structure corresponding to the interrupt controller which accords with the condition in response to the type being consistent with the preset type.
The type of the virtual machine to be migrated is determined, in order to ensure that the virtual machine to be migrated is a virtual machine of a specified type, the type of the virtual machine to be migrated needs to be matched with each preset type in a preset type set, if the type is matched with a consistent preset type, the type is represented as being in the preset type, and if the type is not matched with the consistent preset type, the type is represented as not being in the preset type.
When the type is consistent with the preset type, determining that each interrupt controller is corresponding to the type, wherein each interrupt controller is provided with a register, the register is used for reading and/or writing, the register type of the register and the data corresponding to the register are extracted from the interrupt controller, the register type can be TPR, APR, PPR, RRD, LDR, DFR, ICR, IRR, ISR, TMR, LVTT, and the like, and the register type can also be other types, and the description is omitted herein.
After the type of the register and the data corresponding to the register are obtained, the type and the data are associated to generate a data structure, and the data structure is stored, which should be noted that, when kvm_ vcpu _ioctl and kvm_get_lapic are called, the data structure may be added to the calling program, and the implementation of saving the physical LAPIC data structure is added to the kvm_ apic _get_state function, which is mainly implemented to save all readable physical LAPIC registers.
Step S3, adding the data structure to migration transmission data of the virtual machine to be migrated;
In the above description, during the migration process of the virtual machine, the KVM is combined with the QEMU to implement the migration of the virtual machine, the QEMU is a model of an open source simulator and a virtual machine supervisor, the QEMU can be used as a user mode simulator to execute codes different from the host architecture by using a dynamic code translation mechanism, the QEMU can also be used as a virtual machine supervisor to simulate a whole system, and other VMM (Xen, KVM, etc) is used to use virtualization support provided by hardware to create virtual machines close to the host performance, each virtual machine corresponds to one QEMU process in the host (host), and vcpu of the virtual machine corresponds to one thread of the QEMU process, and the vcpu is cpu of the virtual machine.
After the data structure is stored, the data structure is added to the migration transmission data of the virtual machine to be migrated, and the data structure of the stored physical LAPIC is added when the destination calls kvm_ vcpu _ioctl or kvm_set_lapic.
Based on the above description, the data structure is stored in the migration transmission data, and since the migration transmission data is stored in the KVM, the storage and recovery of the physical lapic state can be realized.
And step S4, migrating the virtual machine to be migrated from the source host to the target host based on the migration transmission data.
The above description describes that the data structure is added to migration transmission data of the virtual machine to be migrated, and when the source host performs dynamic migration of the virtual machine to the target host, the server controls the source host to migrate the migration transmission data to the target host, thereby implementing dynamic migration based on the hardware transparent virtual machine.
After the target host receives the migration transmission data, the target host starts and resumes the virtual machine corresponding to the interrupt controller of the type described above, or starts a new virtual machine of transparent lapic according to qemu xml configuration, and resumes the physical lapic.
In order to realize the injection of register data in the register, the target host shuts down the corresponding cpu interrupt under host, restores the physical lapic normal register, reads the ir/isr register, re-injects the corresponding interrupt into the register according to the interrupt number, and finally, the server controls the target host to restore virtual machine operation.
Specifically, as shown in fig. 2, in the flow chart of the physical LAPIC dynamic migration source host, in fig. 2, there are QEMU and KVM in the source host, QEMU is a hardware virtualization program, a calling function kvm_get_ apic calls kvm_ vcpu _ioctl or kvm_get_lapic, because the source host exists on the virtual machine when migrating the dynamic virtual machine, host exists on the host, in the process of implementing migration of the virtual machine, it is required to ensure that host interrupt is closed, the cpu is designated to exit to host, all readable registers including physical LAPIC are acquired through a program kvm_ vcpu _ioctl_get_ LAPIC, only the non-Reserved registers are saved, the saved LAPIC states including the physical LAPIC states are saved through a program kvm_ apic _get_get_teand then the saved LAPIC states are migrated to the target host, thereby implementing migration from the source host to the virtual machine.
After the source host sends the virtual machine to the target host, the physical LAPIC dynamic migration target host flowchart is shown in fig. 3, after the QEMU of the target host receives LAPIC status data sent by the source host, the program kvm_put_ apic _state will read the saved LAPIC status information, including the physical LAPIC, and then based on the program kvm_ apic _put and the program kvm_ vcpu _ioctl or the kvm_set_lapic under the condition of closing the host interrupt, the state of LAPIC is read, including the physical LAPIC register into the KVM, the physical LAPIC status is SET by the program bm_ apic _set_state, and part of the readable and writable registers are directly written into the KVM, and because the interrupt request register and the interrupt processing register are read-only registers, the corresponding interrupt is required to be re-injected in the interrupt request register, and the interrupt is described above, when the program is injected in the registers, the program is reset, the qu is reset after the program injection in the registers, the program is reset, the purpose is restored from the virtual host is restored to the virtual machine is achieved, and finally the virtual machine is restored to the target host, and the virtual machine is migrated from the host.
Based on the method, the data structure is stored based on the type of the virtual machine to be migrated, the data structure is added into migration transmission data, and dynamic migration based on the hardware transparent virtual machine is realized in a mode that the migration transmission data is sent from a source host to a target host.
Based on the same inventive concept, the embodiment of the present application further provides a virtual machine dynamic migration apparatus, where the virtual machine dynamic migration apparatus is configured to implement a function of a virtual machine dynamic migration method, and referring to fig. 4, the apparatus includes:
a determining module 401, configured to determine a type of a virtual machine to be migrated on a source host;
A storage module 402, configured to store a data structure corresponding to the interrupt controller that meets the condition in response to the type being consistent with a preset type;
A matching module 403, configured to add the data structure to migration transmission data of the virtual machine to be migrated;
And the migration module 404 is configured to migrate the virtual machine to be migrated from the source host to the target host based on the migration transmission data.
In one possible design, the storage module 402 is specifically configured to match the type of the to-be-migrated virtual machine with each preset type in a preset type set, and when a preset type consistent with the type is matched, respond to the type consistent with the preset type.
In one possible design, the storage module 402 is further configured to extract the type of interrupt controller, extract a register type of a register in the interrupt controller and data corresponding to the register, associate the register type with the data, generate a data structure, and store the data structure.
In one possible design, the migration module 404 is specifically configured to control a CPU on the target host to start and restore a virtual machine of the type of interrupt controller, extract a preset register in the type of interrupt controller, read the preset register, and input the register data into the preset register to implement injection of the register data.
Based on the same inventive concept, the embodiment of the present application further provides an electronic device, where the electronic device may implement the function of the foregoing virtual machine dynamic migration apparatus, and referring to fig. 5, the electronic device includes:
The embodiment of the present application is not limited to a specific connection medium between the processor 501 and the memory 502, and the processor 501 and the memory 502 are exemplified in fig. 5 by a connection between the processor 501 and the memory 502 through the bus 500. The connection between the other components of bus 500 is shown in bold lines in fig. 5, and is merely illustrative and not limiting. Bus 500 may be divided into an address bus, a data bus, a control bus, etc., and is represented by only one thick line in fig. 5 for ease of illustration, but does not represent only one bus or one type of bus. Or processor 501 may also be referred to as a controller, without limitation on the name.
In an embodiment of the present application, the memory 502 stores instructions executable by the at least one processor 501, and the at least one processor 501 may perform a virtual machine live migration method as described above by executing the instructions stored in the memory 502. The processor 501 may implement the functions of the various modules in the apparatus shown in fig. 4.
The processor 501 is a control center of the device, and various interfaces and lines can be used to connect various parts of the entire control device, and by executing or executing instructions stored in the memory 502 and invoking data stored in the memory 502, various functions of the device and processing data can be performed to monitor the device as a whole.
In one possible design, processor 501 may include one or more processing units, and processor 501 may integrate an application processor and a modem processor, where the application processor primarily processes operating systems, user interfaces, application programs, and the like, and the modem processor primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 501. In some embodiments, processor 501 and memory 502 may be implemented on the same chip, or they may be implemented separately on separate chips in some embodiments.
The processor 501 may be a general purpose processor such as a Central Processing Unit (CPU), digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, and may implement or perform the methods, steps and logic blocks disclosed in embodiments of the present application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a virtual machine dynamic migration method disclosed in connection with the embodiment of the application can be directly embodied as the execution completion of a hardware processor or the execution completion of the combination execution of hardware and software modules in the processor.
The memory 502, as a non-volatile computer readable storage medium, may be used to store non-volatile software programs, non-volatile computer executable programs, and modules. The Memory 502 may include at least one type of storage medium, and may include, for example, flash Memory, hard disk, multimedia card, card Memory, random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read-Only Memory (ROM), charged erasable programmable Read-Only Memory (ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only Memory, EEPROM), magnetic Memory, magnetic disk, optical disk, and the like. Memory 502 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 502 in embodiments of the present application may also be circuitry or any other device capable of performing storage functions for storing program instructions and/or data.
By programming the processor 501, code corresponding to a virtual machine live migration method described in the foregoing embodiment may be cured into the chip, so that the chip can execute a virtual machine live migration step of the embodiment shown in fig. 1 at runtime. How to design and program the processor 501 is a technique well known to those skilled in the art, and will not be described in detail herein.
Based on the same inventive concept, the embodiment of the present application further provides a storage medium storing computer instructions that, when executed on a computer, cause the computer to perform a method for dynamically migrating a virtual machine as described above.
In some possible embodiments, the aspects of a method for virtual machine live migration may also be implemented in the form of a program product comprising program code for causing a control apparatus to carry out the steps of a method for virtual machine live migration according to the various exemplary embodiments of the application as described herein above when the program product is run on a device.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (8)

1. A method for dynamically migrating a virtual machine, comprising:
determining the type of a virtual machine to be migrated on a source host;
Responding to the type consistent with a preset type, extracting an interrupt controller of the virtual machine to be migrated, and extracting a register type of a register in the interrupt controller and data corresponding to the register;
Associating the register type with the data, generating a data structure, and storing the data structure;
adding the data structure to migration transmission data of the virtual machine to be migrated;
And migrating the virtual machine to be migrated from a source host to a target host based on the migration transmission data.
2. The method of claim 1, wherein in response to the type being consistent with a preset type, extracting an interrupt controller in the virtual machine to be migrated, and extracting a register type of a register in the interrupt controller and data corresponding to the register, comprises:
Matching the type of the virtual machine to be migrated with each preset type in a preset type set;
when the preset type consistent with the type is matched, responding to the type consistent with the preset type, extracting an interrupt controller in the virtual machine to be migrated, and extracting the register type of a register in the interrupt controller and data corresponding to the register.
3. The method of claim 1, wherein after migrating the virtual machine to be migrated from a source host to a target host based on the migration transmission data, comprising:
controlling a CPU on the target host to start and restore a virtual machine corresponding to the interrupt controller of the register type;
Extracting a preset register in the register type interrupt controller, and reading the preset register;
inputting the data corresponding to the register into a preset register to realize the injection of the register data.
4. An apparatus for dynamic migration of a virtual machine, the apparatus comprising:
The determining module is used for determining the type of the virtual machine to be migrated on the source host;
the storage module is used for responding to the fact that the type is consistent with a preset type, extracting an interrupt controller of the virtual machine to be migrated, and extracting a register type of a register in the interrupt controller and data corresponding to the register;
Associating the register type with the data, generating a data structure, and storing the data structure;
The matching module is used for adding the data structure into migration transmission data of the virtual machine to be migrated;
and the migration module is used for migrating the virtual machine to be migrated from the source host to the target host based on the migration transmission data.
5. The apparatus of claim 4, wherein the storage module is specifically configured to match a type of the virtual machine to be migrated with each preset type in a set of preset types, and when a preset type consistent with the type is matched, extract an interrupt controller in the virtual machine to be migrated in response to the type consistent with the preset type, and extract a register type of a register in the interrupt controller and data corresponding to the register.
6. The apparatus of claim 4, wherein the migration module is specifically configured to control a CPU on the target host to start and resume a virtual machine corresponding to the register-type interrupt controller, extract a preset register in the register-type interrupt controller, read the preset register, and input data corresponding to the register into the preset register to implement injection of register data.
7. An electronic device, comprising:
a memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-3 when executing a computer program stored on said memory.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-3.
CN202210877002.3A 2022-07-25 2022-07-25 Method, device and electronic device for dynamic migration of virtual machines Active CN115292000B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210877002.3A CN115292000B (en) 2022-07-25 2022-07-25 Method, device and electronic device for dynamic migration of virtual machines
PCT/CN2022/141594 WO2024021480A1 (en) 2022-07-25 2022-12-23 Method and apparatus for dynamic migration of virtual machine, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210877002.3A CN115292000B (en) 2022-07-25 2022-07-25 Method, device and electronic device for dynamic migration of virtual machines

Publications (2)

Publication Number Publication Date
CN115292000A CN115292000A (en) 2022-11-04
CN115292000B true CN115292000B (en) 2025-02-28

Family

ID=83823896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210877002.3A Active CN115292000B (en) 2022-07-25 2022-07-25 Method, device and electronic device for dynamic migration of virtual machines

Country Status (2)

Country Link
CN (1) CN115292000B (en)
WO (1) WO2024021480A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115292000B (en) * 2022-07-25 2025-02-28 天翼云科技有限公司 Method, device and electronic device for dynamic migration of virtual machines
CN117648155B (en) * 2023-07-18 2025-02-25 武汉大学中南医院 Virtual machine online migration method, device, computer equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114691300A (en) * 2022-03-25 2022-07-01 阿里巴巴(中国)有限公司 Hot migration method of virtual machine instance

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7383405B2 (en) * 2004-06-30 2008-06-03 Microsoft Corporation Systems and methods for voluntary migration of a virtual machine between hosts with common storage connectivity
CN106648826B (en) * 2016-09-09 2018-06-19 北京百度网讯科技有限公司 For the method and apparatus of thermophoresis virtual machine
US10853119B2 (en) * 2018-11-29 2020-12-01 Shanghai Jiao Tong University GiantVM for resource aggregation
CN112559117B (en) * 2019-09-25 2024-06-07 阿里巴巴集团控股有限公司 Timer processing method and device, electronic equipment and computer storage medium
CN111857968A (en) * 2020-07-29 2020-10-30 山东超越数控电子股份有限公司 Method, system, device and medium for live migration of virtual machine
CN113326105B (en) * 2021-08-04 2021-11-05 深圳市科力锐科技有限公司 Hardware equipment configuration method, device and equipment based on host migration
CN114237814A (en) * 2021-11-17 2022-03-25 上海浦东发展银行股份有限公司 Virtual machine migration method, apparatus and computer equipment across virtualization platforms
CN115292000B (en) * 2022-07-25 2025-02-28 天翼云科技有限公司 Method, device and electronic device for dynamic migration of virtual machines

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114691300A (en) * 2022-03-25 2022-07-01 阿里巴巴(中国)有限公司 Hot migration method of virtual machine instance

Also Published As

Publication number Publication date
CN115292000A (en) 2022-11-04
WO2024021480A1 (en) 2024-02-01

Similar Documents

Publication Publication Date Title
KR101296025B1 (en) Improving nested virtualization performance in a computer system
US12367062B1 (en) Virtualization extension modules
US11487523B2 (en) Updating machine emulator
US11036666B2 (en) Asynchronous mapping of hot-plugged device associated with virtual machine
CN111158863B (en) Interrupt controller processing method and device and electronic equipment
JP6458959B2 (en) Co-designed dynamic language accelerator for processors
US9715403B2 (en) Optimized extended context management for virtual machines
CN106970821A (en) A kind of method and apparatus that I/O requests are handled under KVM virtualization
US10055136B2 (en) Maintaining guest input/output tables in swappable memory
US9639388B2 (en) Deferred assignment of devices in virtual machine migration
CN115292000B (en) Method, device and electronic device for dynamic migration of virtual machines
CN106775927A (en) A kind of processor partition method and device based on KVM virtualization technology
US9990216B2 (en) Providing hypercall interface for virtual machines
CN108713189A (en) speculative virtual machine execution
CN117112029B (en) Instruction execution method and device
KR920003044B1 (en) Control system for guest execution of virtual computer system
CN107861795A (en) Method, system, device and the readable storage medium storing program for executing of analog physical TCM chips
CN121605409A (en) System and method for developing firmware using collaborative simulation based on system virtualization
US11755512B2 (en) Managing inter-processor interrupts in virtualized computer systems
EP3961389B1 (en) Virtual machine for developing and testing target code for hardware designs
CN121579127A (en) Affinity setting methods, apparatus, devices, and storage media in virtual machine environments
CN120067017A (en) PCIE interrupt affinity remapping method, system, device and storage medium
CN103488522A (en) Method for managing device of virtual machine and device
JPS60105052A (en) Virtual computer system
JPS60142428A (en) Emulation system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant