CN114237814A - Virtual machine migration method and device across virtualization platforms and computer equipment - Google Patents

Virtual machine migration method and device across virtualization platforms and computer equipment Download PDF

Info

Publication number
CN114237814A
CN114237814A CN202111361476.4A CN202111361476A CN114237814A CN 114237814 A CN114237814 A CN 114237814A CN 202111361476 A CN202111361476 A CN 202111361476A CN 114237814 A CN114237814 A CN 114237814A
Authority
CN
China
Prior art keywords
virtual machine
migrated
migration
platform
hyper
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111361476.4A
Other languages
Chinese (zh)
Inventor
洪志恒
赵烨婷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Pudong Development Bank Co Ltd
Original Assignee
Shanghai Pudong Development Bank 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 Shanghai Pudong Development Bank Co Ltd filed Critical Shanghai Pudong Development Bank Co Ltd
Priority to CN202111361476.4A priority Critical patent/CN114237814A/en
Publication of CN114237814A publication Critical patent/CN114237814A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects

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

The application relates to a virtual machine migration method, a virtual machine migration device, a computer device, a storage medium and a computer program product, which cross a virtualization platform. The method comprises the following steps: judging the migration type of the virtual machine, if the virtual machine is migrated from the KVM platform to the Hyper-V platform, obtaining the operating system type of the virtual machine to be migrated, if the operating system type of the virtual machine to be migrated is a Windows system, closing the operating system of the virtual machine to be migrated and exporting a qcow2 image file, then configuring network information of the migrated Hyper-V platform, exporting the qcow2 image file to the Hyper-V platform, and finally converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated. By adopting the method, the migration success rate of the virtual machine can be improved.

Description

Virtual machine migration method and device across virtualization platforms and computer equipment
Technical Field
The present application relates to the field of virtual machine migration technologies, and in particular, to a method and an apparatus for virtual machine migration across virtualization platforms, a computer device, a storage medium, and a computer program product.
Background
At present, cloud and virtualization technologies are widely applied to various large enterprises, and at present, many enterprises use more than one virtualization technology, so that migration across virtualization platforms is very important, maximized utilization of resources can be achieved, simultaneously maximized utilization of underlying resources is achieved, and product dependence on a single virtualization technology is eliminated.
The mainstream virtualization technologies in the virtualization market are commercial virtualization VMware and Hyper-V and open source virtualization technologies KVM and Xen. Technical schemes and application practices from VMware to an open source virtualization platform are rich in the market at present, and the VMware also provides rich migration methods of p2v and v2 v. Hyper-V is used as a virtualization solution of Microsoft, a user can directly deploy and use a virtual machine on a Windows system, the deployment and the operation are simple, due to the difference of a bottom operating system and a virtualization principle, a Hyper-V cross-virtual machine migration scheme is absent at present, no complete open source KVM virtualization migration to a Hyper-V platform and migration of the Hyper-V platform to a KVM or a migration solution of a KVM-based cloud manufacturer is achieved, many problems are caused in the conventional migration process, the operating system cannot be started and used normally, and the migration success rate and the normal use of a service system are seriously influenced.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device, a computer readable storage medium, and a computer program product for migrating a virtual machine across virtualization platforms, which can improve the success rate of migrating the virtual machine.
In a first aspect, the present application provides a method for migrating a virtual machine across virtualization platforms. The method comprises the following steps:
judging the migration type of the virtual machine, and if the virtual machine is migrated from the KVM platform to the Hyper-V platform, acquiring the type of the operating system of the virtual machine to be migrated;
if the operating system type of the virtual machine to be migrated is a Windows system, closing the operating system of the virtual machine to be migrated and exporting a qcow2 image file;
configuring network information of the transferred Hyper-V platform, and exporting the qcow2 mirror image file to the Hyper-V platform;
and converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated.
In one embodiment, the method for migrating virtual machines across virtualization platforms further includes: if the operating system type of the virtual machine to be migrated is a Linux system, acquiring a kernel version of the virtual machine to be migrated;
acquiring a target kernel starting mirror image based on the kernel version of the virtual machine to be migrated, closing an operating system of the virtual machine to be migrated and exporting a qcow2 mirror image file;
importing the target kernel boot image into a system boot file, and clearing udev rule information and a cloud-init running plug-in the system;
configuring network information of the transferred Hyper-V platform, and exporting the qcow2 mirror image file to the Hyper-V platform;
and converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated.
In one embodiment, the obtaining the target kernel boot image based on the kernel version of the virtual machine to be migrated includes:
if the local Hyper-V kernel library of the virtual machine to be migrated contains the target kernel boot image, directly acquiring the target kernel boot image;
and if the local Hyper-V kernel library of the virtual machine to be migrated does not contain the target kernel boot image, writing the kernel file into the Hyper-V driver for recompilation, and acquiring the target kernel boot image.
In one embodiment, the method for migrating virtual machines across virtualization platforms further includes: if the virtual machine is migrated from the Hyper-V platform to the KVM platform, acquiring the operating system type of the virtual machine to be migrated;
closing an operating system of a virtual machine to be migrated, exporting an image file, and then transmitting the image file to a KVM platform;
converting the image file into a qcow2 format, and installing virtio related drivers;
and configuring network information of the KVM platform after migration, and realizing the migration of the virtual machine to be migrated.
In one embodiment, the installing the virtio related driver comprises: and if the operating system type of the virtual machine to be migrated is a Windows system, executing the batch file installation virtio related driver through the starting item.
In one embodiment, the installing the virtio-related driver further comprises: and if the operating system type of the virtual machine to be migrated is a Linux system, installing a virtio related driver based on a virt-copy-in command.
In a second aspect, the present application further provides a virtual machine migration apparatus across virtualization platforms. The device comprises:
the obtaining module is used for judging the migration type of the virtual machine, and obtaining the type of the operating system of the virtual machine to be migrated if the virtual machine is migrated from the KVM platform to the Hyper-V platform;
the first export module is used for closing the operating system of the virtual machine to be migrated and exporting the qcow2 mirror image file when the operating system type of the virtual machine to be migrated is a Windows system;
the second export module is used for configuring the network information of the transferred Hyper-V platform and exporting the qcow2 image file to the Hyper-V platform;
and the migration module is used for converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the following steps when executing the computer program:
judging the migration type of the virtual machine, and if the virtual machine is migrated from the KVM platform to the Hyper-V platform, acquiring the type of the operating system of the virtual machine to be migrated;
if the operating system type of the virtual machine to be migrated is a Windows system, closing the operating system of the virtual machine to be migrated and exporting a qcow2 image file;
configuring network information of the transferred Hyper-V platform, and exporting the qcow2 mirror image file to the Hyper-V platform;
and converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
judging the migration type of the virtual machine, and if the virtual machine is migrated from the KVM platform to the Hyper-V platform, acquiring the type of the operating system of the virtual machine to be migrated;
if the operating system type of the virtual machine to be migrated is a Windows system, closing the operating system of the virtual machine to be migrated and exporting a qcow2 image file;
configuring network information of the transferred Hyper-V platform, and exporting the qcow2 mirror image file to the Hyper-V platform;
and converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprising a computer program which when executed by a processor performs the steps of:
judging the migration type of the virtual machine, and if the virtual machine is migrated from the KVM platform to the Hyper-V platform, acquiring the type of the operating system of the virtual machine to be migrated;
if the operating system type of the virtual machine to be migrated is a Windows system, closing the operating system of the virtual machine to be migrated and exporting a qcow2 image file;
configuring network information of the transferred Hyper-V platform, and exporting the qcow2 mirror image file to the Hyper-V platform;
and converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated.
According to the virtual machine migration method and device, the computer equipment, the storage medium and the computer program product of the cross-virtualization platform, the virtual machine migration type is judged, if the virtual machine migration method and device is migrated from the KVM platform to the Hyper-V platform, the operating system type of the virtual machine to be migrated is acquired, if the operating system type of the virtual machine to be migrated is a Windows system, the operating system of the virtual machine to be migrated is closed, a qcow2 image file is exported, network information of the Hyper-V platform after migration is configured, the qcow2 image file is exported to the Hyper-V platform, and the qcow2 image file is converted into a vhdx format, so that migration of the virtual machine to be migrated is achieved, the virtual machine migration success rate is improved, and the problem that the existing market lacks a Hyper-V virtualization migration solution is solved.
Drawings
FIG. 1 is a diagram of an application environment for a method of virtual machine migration across virtualization platforms, in one embodiment;
FIG. 2 is a schematic flow diagram of a method for virtual machine migration across virtualization platforms in one embodiment;
FIG. 3 is a block diagram of a virtual machine migration apparatus across virtualization platforms in one embodiment;
FIG. 4 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The virtualization platform is an unavailable part for infrastructure construction of large enterprises, a plurality of types of virtualization platforms are contained in a plurality of large enterprises (such as financial industry, basic manufacturing industry and the like) at present, and with popularization of cloud products, cloud requirements on resource migration of the virtualization platforms are obvious, so that a virtualization platform mutual migration tool which is simple, efficient and high in success rate is very important. Currently, virtualization platforms are mainly divided into commercial virtualization platforms (such as VMware, Hyper-V, etc.) and open source virtualization platforms (such as KVM, Xen, etc.). Where VMware is the largest share of the entire virtualization market, KVM is an open source virtualization and virtualization layer solution for each large mainstream cloud vendor.
VMware, as a holder of the largest market share of the virtualized market, provides a complete migration scheme of P2V and V2V, and has a wide range of application cases for migration in and out. The VMware vCenter changer provides a standard migration tool, can realize the migration work of a physical Server, VMware virtual machines of other versions, Hyper-V virtual machines and third-party virtualization platform virtual machines, and supports the import of a disk image backed up by a third party into the VMware vCenter Server, and the software supports two modes of cold clone and hot clone migration, so that a user can select a desired migration mode according to the requirement. The live migration needs to deploy a remote agent program and has support requirements for reading and writing files for an application program, and essentially, an assistant virtual machine is deployed on a new platform and passes through the assistant virtual machine. Cold migration requires physical access to the source host, but it cannot retain the exact same disk layout and logical volume information. And the whole migration process only contains a copy of the disk state, and does not reserve a driver of related hardware, sometimes even information such as a mapped disk drive letter and the like. In addition, the tool currently supports only virtual machines migrated to a VMware environment, and the supported sources are also basically virtual machines under a VMware Infrastrastructure or running on a Hyper-V Server. And migration in and migration out of the virtual machine of the open source virtualization platform are not supported. In addition, Microsoft's own Microsoft Virtual Machine Changer (MVMC) migration tool also only supports migration of physical machines and VMware Virtual machines to Hyper-V virtualization platforms.
In addition, in the field of open source virtualization, KVM virtualization provides migration tools of virt-v2v and virt-p2v, which can convert virtual machines or physical machines on an external virtualization platform to a running KVM platform, read windows and Linux virtual machines on VMware, Xen, and convert them to libvirt of KVM, even an Openstack private cloud platform. The source end virtualization platform supported by the system richly supports two modes of disk conversion and virtualization layer migration, but the system has more problems after the support of Hyper-V virtualization and the system start.
In addition, each KVM-based virtualization vendor and cloud vendor also issued a self-developed platform-based virtualization business migration tool. The tools comprise an online migration tool and an offline mirror image conversion tool, and can provide end-to-end service migration or local mirror image format conversion services. The online migration can ensure that the service offline time is almost zero and the migration process supports data additional synchronization, ensures data consistency, and basically has the following online synchronization and migration processes as shown in the following figures. Besides, the migration tools are business tools, and the manufacturer charges the migration amount, so that the migration cost is high.
The virtual machine migration method across virtualization platforms provided by the embodiment of the present application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104, or may be located on the cloud or other network server. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices and portable wearable devices, and the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart car-mounted devices, and the like. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, and the like. The server 104 may be implemented as a stand-alone server or as a server cluster comprised of multiple servers.
In one embodiment, as shown in fig. 2, a method for migrating a virtual machine across virtualization platforms is provided, which is described by taking the method as an example applied to the server 104 in fig. 1, and includes the following steps:
step 202, judging the virtual machine migration type, and if the virtual machine migration type is migrated from the KVM platform to the Hyper-V platform, acquiring the operating system type of the virtual machine to be migrated.
The KVM is a short for Kernel-based Virtual Machine, is an open-source system virtualization module, and is integrated in each main release version of Linux from behind Linux 2.6.20. It uses Linux's own scheduler for management, so its core source code is very small compared to Xen. KVM has become one of the mainstream VMMs in academia. Hyper-V is a virtualization product from Microsoft, the first to Microsoft to use hypervisor-based technologies like Vmware ESxi and Citrix Xen.
Specifically, the virtual machine migration type refers to from which platform the virtual machine to be migrated is migrated to another platform, such as from a KVM platform to a Hyper-V platform or from a Hyper-V platform to a KVM platform; firstly, judging a virtual machine migration type, and if the virtual machine migration type is from a KVM platform to a Hyper-V platform, acquiring the type of an operating system of a virtual machine to be migrated; the operating system type of the virtual machine to be migrated refers to an operating system type installed in the virtual machine to be migrated, such as a Windows system, a Linux system, and the like.
And step 204, if the operating system type of the virtual machine to be migrated is a Windows system, closing the operating system of the virtual machine to be migrated and exporting a qcow2 image file.
Specifically, the Hyper-V is a Hypervisor running on a privilege layer above a kernel layer of a windows system, so that the Hypervisor has good compatibility with a client operating system of windows, and the KVM is taken as a system virtualization module of an open source system, and is integrated into an operating system kernel of a main release from behind Linux 2.6.20, so that the Hypervisor has good compatibility with a client operating system based on Linux. The qcow2 image format is one of the disk image formats supported by the Quick Emulator software. It may use a file to represent a fixed-size block device. When the operating system type of the virtual machine to be migrated is a Windows system, the operating system of the virtual machine to be migrated is closed, and then the qcow2 image file is exported.
And step 206, configuring the network information of the transferred Hyper-V platform, and exporting the qcow2 image file to the Hyper-V platform.
Specifically, the network information of the Hyper-V platform after migration is configured, the network information is automatically configured according to the network configuration of the new platform, for example, the network card configuration after migration is configured through a virt-edge instruction, and then the qcow2 image file is exported to the Hyper-V platform.
And 208, converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated.
Specifically, the main format of the bottom disk of the Hyper-V virtualization is based on vhd or vhdx at present, the main disk format of the KVM virtualization is the raw format raw or qcow2 format, the conversion work of the two formats can be completed by utilizing a qemu-img tool carried by the virtualization layer itself, and the migration of the virtual machine to be migrated can be realized by converting the qcow2 image file into the vhdx format.
In the virtual machine migration method across the virtualization platforms, the virtual machine migration type is judged, if the virtual machine migration method is from the KVM platform to the Hyper-V platform, the operating system type of the virtual machine to be migrated is obtained, if the operating system type of the virtual machine to be migrated is a Windows system, the operating system of the virtual machine to be migrated is closed, a qcow2 image file is exported, then network information of the Hyper-V platform after migration is configured, the qcow2 image file is exported to the Hyper-V platform, and finally the qcow2 image file is converted into a vhdx format, so that the migration of the virtual machine to be migrated is realized, the virtual machine migration success rate is improved, and the problem that the existing market lacks a Hyper-V virtualization migration solution is solved.
In one embodiment, the method for migrating virtual machines across virtualization platforms further comprises:
if the operating system type of the virtual machine to be migrated is a Linux system, acquiring a kernel version of the virtual machine to be migrated;
acquiring a target kernel starting mirror image based on the kernel version of the virtual machine to be migrated, closing an operating system of the virtual machine to be migrated and exporting a qcow2 mirror image file;
importing the target kernel boot image into a system boot file, and clearing udev rule information and a cloud-init running plug-in the system;
configuring network information of the transferred Hyper-V platform, and exporting the qcow2 mirror image file to the Hyper-V platform;
and converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated.
Specifically, the two virtualization modes correspond to completely different drivers of a disk, a network card, a video card and a memory bus, and directly perform format conversion on the bottom virtualization disk, which easily causes the situation that the system cannot be normally started and migration fails. The design of Hyper-V refers to Xen, adopts the structure of microkernel, and gives consideration to the requirements of safety and performance. The Hypervisor underlying the Hyper-V runs at the highest privilege level, called ring-1 by Microsoft (and root mode by Intel), while the operating system kernel and drivers of the virtual machine run in ring 0 and the application runs in ring 3. Hyper-V adopts VMbus-based high-speed memory bus architecture, and hardware requests (video card, mouse, disk and network) from a virtual machine can be directly sent to VSP of a root partition through a VMbus by a VSC, the VSP calls corresponding equipment drivers to directly access hardware without the help of Hypervisor in the middle. The Hyper-V virtualization layer mainly relates to three drive types, including hv _ vmbus, high-speed memory bus drive, and the hardware request of each virtual machine in charge is called to corresponding equipment through the vmbus drive by VSC; the hv _ netvsc is used as a virtual network card driver and a network service client and is responsible for processing network related requests of the virtual machine; the hv _ storvsc is responsible for the entire disk drive and storage service client, and for handling I/O related requests of the virtual machine. The compilation of the driver of this part in the Linux system requires recompiling the system kernel.
When the operating system type of the virtual machine to be migrated is a Linux system, acquiring a kernel version of the virtual machine to be migrated, acquiring a target kernel boot image based on the kernel version of the virtual machine to be migrated, and preparing a relevant kernel boot image (initramfs image) containing Hyper-V drivers (hv _ vmbus, hv _ netvsc, hv _ storvsc and the like) on an intermediate host. Closing an operating system of the virtual machine to be migrated, exporting a qcow2 image file, importing a target kernel boot image into a system boot file, clearing udev rule information and a closed-init running plug-in the system, and configuring network information of the Hyper-V platform after migration. Because the udev rule in the system aims at the static rule of the Ethernet interface which is easy to be manufactured by part of the operating systems, the part of the rule may cause the problems of network connectivity or network card configuration when the migrated virtual machine is started, and the part of the rule needs to be cleared in the migration process, so that the automatic configuration of the network can be normally completed. In addition, for a part of virtual machines in a KVM-based cloud platform, a cloud server initialization management tool cloud-init is generally preset in the virtual machines, and after the virtual machines are migrated to a Hyper-V environment, since a metadata server or a config-drive metadata acquisition mechanism does not exist in a new platform, the starting speed of the migrated virtual machines is seriously affected, the starting speed of the migrated virtual machines is extremely low, and the tool needs to be unloaded before migration.
And finally, exporting the qcow2 image file to a Hyper-V platform, and finally converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated. The internal configuration parameters of the virtual machine image can be directly modified by using a virtualized image management tool. The mirror image can be directly checked, edited and deleted through the shell script without being attached to the local, and the file in the virtual disk can be directly written, copied and cut without starting a KVM guest host, so that the process arrangement of the operating system in the disk is completed, the related requirements of migration can be met, and the script batch completion can be realized.
In the embodiment, when the operating system type of the virtual machine to be migrated is a Linux system, acquiring a kernel version of the virtual machine to be migrated, acquiring a target kernel boot image based on the kernel version of the virtual machine to be migrated, closing the operating system of the virtual machine to be migrated and exporting a qcow2 image file, then importing the target kernel boot image into a system boot file, clearing udev rule information and cloud-init running plug-in the system, finally configuring network information of a Hyper-V platform after migration, exporting the qcow2 image file to the Hyper-V platform, and converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated, the arrangement process realized by the migration method has strong practicability and easy expansion for large enterprises containing the two virtualization types, and has the capability of large-scale migration application.
In an embodiment, the obtaining the target kernel boot image based on the kernel version of the virtual machine to be migrated includes:
if the local Hyper-V kernel library of the virtual machine to be migrated contains the target kernel boot image, directly acquiring the target kernel boot image;
and if the local Hyper-V kernel library of the virtual machine to be migrated does not contain the target kernel boot image, writing the kernel file into the Hyper-V driver for recompilation, and acquiring the target kernel boot image.
Specifically, if the local Hyper-V kernel library of the virtual machine to be migrated contains the target kernel boot image, the target kernel boot image is directly obtained, namely when the local initramfs kernel image does not contain the version, a driver is added and then recompiled in the client operating system, and then the recompiled object is added into the intermediate packed local Hyper-V kernel image library; when the local Hyper-V kernel library of the virtual machine to be migrated does not contain the target kernel boot image, the kernel file is written into the Hyper-V driver for recompilation, and the target kernel boot image is obtained, namely the directory containing the target kernel boot image is directly copied into the system boot image when passing through the image editing tool.
In the embodiment, if the local Hyper-V kernel library of the virtual machine to be migrated contains the target kernel boot image, the target kernel boot image is directly obtained; and if the local Hyper-V kernel library of the virtual machine to be migrated does not contain the target kernel boot image, writing the kernel file into the Hyper-V driver for recompilation, and acquiring the target kernel boot image, thereby realizing the acquisition of the target kernel boot image.
In one embodiment, the method for migrating virtual machines across virtualization platforms further comprises:
if the virtual machine is migrated from the Hyper-V platform to the KVM platform, acquiring the operating system type of the virtual machine to be migrated;
closing an operating system of a virtual machine to be migrated, exporting an image file, and then transmitting the image file to a KVM platform;
converting the image file into a qcow2 format, and installing virtio related drivers;
and configuring network information of the KVM platform after migration, and realizing the migration of the virtual machine to be migrated.
Specifically, when the virtual machine to be migrated is migrated from the Hyper-V platform to the KVM platform, the operating system type of the virtual machine to be migrated is acquired, the operating system of the virtual machine to be migrated is closed, the image file is exported, then the image file is transmitted to the KVM platform, the image file is converted into a qcow2 format, a virtio-related driver is installed, and finally network information of the KVM platform after migration is configured, so that migration of the virtual machine to be migrated is achieved. The migration part from Hyper-V to KVM mainly aims at windows system, related drivers such as uploading related driver kernel packages, executing batch processing files through startup items, installing virtio and the like need to be executed, and in addition, according to network configuration information in a new environment, a mirror image editing and configuration tool needs to be used for configuring network information of a target environment
In this embodiment, when migrating from the Hyper-V platform to the KVM platform, the operating system type of the virtual machine to be migrated is acquired, the operating system of the virtual machine to be migrated is closed and the image file is exported, then the image file is transmitted to the KVM platform, the image file is converted into a qcow2 format, a virtio-related drive is installed, and finally, the network information of the KVM platform after migration is configured, so that migration of the virtual machine to be migrated is realized, the migration success rate of the virtual machine is improved, and the problem that the existing market lacks a Hyper-V virtualization migration solution is also solved.
In one embodiment, the installing the virtio related driver comprises: and if the operating system type of the virtual machine to be migrated is a Windows system, executing the batch file installation virtio related driver through the starting item.
In particular, virtio is used for KVM virtualization as a program for virtualization of general I/O devices, and is an abstraction of a set of general I/O devices in a semi-virtualized Hypervisor. Virtio is used as a set of general framework and a standard interface protocol and is responsible for acquiring resources (such as block devices, network devices, PCI devices, balloon drivers and the like) of an underlying host, and the windows system does not contain the relevant drivers and needs to complete the installation of the drivers in advance. And when the operating system type of the virtual machine to be migrated is a Windows system, executing the batch file installation virtio related driver through the starting item.
In this embodiment, when the operating system type of the virtual machine to be migrated is a Windows system, the virtual machine installation related driver is installed by executing the batch processing file installation by the start item, so that the virtual machine installation related driver is installed, and a condition is provided for configuring network information of the KVM platform after migration and realizing migration of the virtual machine to be migrated.
In one embodiment, the installing the virtio-related driver further comprises: and if the operating system type of the virtual machine to be migrated is a Linux system, installing a virtio related driver based on a virt-copy-in command.
Specifically, when the operating system type of the virtual machine to be migrated is a Linux system, installing a virtio-related driver based on a virt-copy-in command; wherein, virt-copy-in copies the file to the virtual machine.
In this embodiment, when the operating system type of the virtual machine to be migrated is a Linux system, the virtio-related driver is installed based on the virt-copy-in command, so that the virtio-related driver is installed, and a condition is provided for configuring network information of the KVM platform after migration and realizing migration of the virtual machine to be migrated.
When the virtual machine to be migrated is migrated from the KVM platform to the Hyper-V platform, firstly, acquiring the operating system type of the virtual machine to be migrated, if the operating system type of the virtual machine to be migrated is a Windows system, closing the operating system of the virtual machine to be migrated and exporting a qcow2 image file, configuring network information of the migrated Hyper-V platform, exporting the qcow2 image file to the Hyper-V platform, converting the qcow2 image file into a vhdx format, and realizing migration of the virtual machine to be migrated; if the operating system type of the virtual machine to be migrated is a Linux system, acquiring a kernel version of the virtual machine to be migrated, and if a local Hyper-V kernel library of the virtual machine to be migrated contains a target kernel boot image, directly acquiring the target kernel boot image; and if the local Hyper-V kernel library of the virtual machine to be migrated does not contain the target kernel boot image, writing the kernel file into the Hyper-V driver for recompilation, and acquiring the target kernel boot image. Closing an operating system of a virtual machine to be migrated, exporting a qcow2 image file, importing a target kernel boot image into a system boot file, clearing udev rule information and a closed-init running plug-in the system, configuring network information of a Hyper-V platform after migration, exporting the qcow2 image file to the Hyper-V platform, and finally converting the qcow2 image file into a vhdx format to realize migration of the virtual machine to be migrated.
If the virtual machine is migrated from the Hyper-V platform to the KVM platform, the operating system type of the virtual machine to be migrated is acquired, the operating system of the virtual machine to be migrated is closed, the image file is exported, then the image file is transmitted to the KVM platform, and the image file is converted into a qcow2 format. Specifically, if the operating system type of the virtual machine to be migrated is a Windows system, the batch file installation virtio related driver is executed through the startup item; and if the operating system type of the virtual machine to be migrated is a Linux system, installing a virtio related driver based on a virt-copy-in command. And configuring network information of the KVM platform after migration, and realizing the migration of the virtual machine to be migrated.
In this embodiment, based on Hyper-V and KVM virtualization scenarios, a virtual disk is used as a medium, and a kernel-driven switching manner is used on the disk, so that an end-to-end cross-virtualization migration process is completely realized, and the batch migration capability under a multi-source scenario is achieved. Based on the technical characteristics of virtual disk and kernel migration, the migration scheme has expandability, can realize the capability of multi-concurrent serial migration based on a high-speed network in a large-scale scene, and meets the batch migration requirements. In this embodiment, a large number of practical migration experiences of different Guest OSs are used to solve the common problem of inter-migration between Hyper-V and KVM, so as to ensure the availability of the server after cross-virtualization migration.
The migration method in the embodiment has the following advantages that the migration success rate is ensured, and meanwhile, the problem that a Hyper-V virtualization migration solution is lacking in the existing market is solved. The arrangement process realized by the migration method has strong practicability and easy expansion for large enterprises containing the two virtualization types, and has the capability of large-scale migration application. The migration in the embodiment does not depend on a compatible list, has universality for different GuestOS, and is lower in cost compared with commercial software.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the present application further provides a virtual machine migration apparatus across virtualization platforms, which is used for implementing the above-mentioned virtual machine migration method across virtualization platforms. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so specific limitations in one or more embodiments of the virtual machine migration device across virtualization platforms provided below may refer to the above limitations on the virtual machine migration method across virtualization platforms, and details are not repeated here.
In one embodiment, as shown in fig. 3, there is provided a virtual machine migration apparatus across virtualization platforms, including: an obtaining module 301, a first exporting module 302, a second exporting module 303, and a migrating module 304, wherein:
an obtaining module 301, configured to determine a virtual machine migration type, and if the virtual machine migration type is migrated from a KVM platform to a Hyper-V platform, obtain an operating system type of a virtual machine to be migrated;
the first exporting module 302 is configured to, when the operating system type of the virtual machine to be migrated is a Windows system, close the operating system of the virtual machine to be migrated and export a qcow2 image file;
the second export module 303 is configured to configure the network information of the transferred Hyper-V platform, and export the qcow2 image file to the Hyper-V platform;
the migration module 304 is configured to convert the qcow2 image file into a vhdx format, so as to implement migration of the virtual machine to be migrated.
In one embodiment, the virtual machine migration apparatus across virtualization platforms further includes a second migration module configured to: if the operating system type of the virtual machine to be migrated is a Linux system, acquiring a kernel version of the virtual machine to be migrated; acquiring a target kernel starting mirror image based on the kernel version of the virtual machine to be migrated, closing an operating system of the virtual machine to be migrated and exporting a qcow2 mirror image file; importing the target kernel boot image into a system boot file, and clearing udev rule information and a cloud-init running plug-in the system; configuring network information of the transferred Hyper-V platform, and exporting the qcow2 mirror image file to the Hyper-V platform; and converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated.
In one embodiment, the second migration module is further configured to: if the local Hyper-V kernel library of the virtual machine to be migrated contains the target kernel boot image, directly acquiring the target kernel boot image; and if the local Hyper-V kernel library of the virtual machine to be migrated does not contain the target kernel boot image, writing the kernel file into the Hyper-V driver for recompilation, and acquiring the target kernel boot image.
In one embodiment, the virtual machine migration apparatus across virtualization platforms further includes a third migration module configured to: if the virtual machine is migrated from the Hyper-V platform to the KVM platform, acquiring the operating system type of the virtual machine to be migrated; closing an operating system of a virtual machine to be migrated, exporting an image file, and then transmitting the image file to a KVM platform; converting the image file into a qcow2 format, and installing virtio related drivers; and configuring network information of the KVM platform after migration, and realizing the migration of the virtual machine to be migrated.
In one embodiment, the third migration module is further configured to: and if the operating system type of the virtual machine to be migrated is a Windows system, executing the batch file installation virtio related driver through the starting item.
In one embodiment, the third migration module is further configured to: and if the operating system type of the virtual machine to be migrated is a Linux system, installing a virtio related driver based on a virt-copy-in command.
The virtual machine migration device across the virtualization platforms judges the migration type of the virtual machine, acquires the operating system type of the virtual machine to be migrated if the virtual machine to be migrated is migrated from the KVM platform to the Hyper-V platform, closes the operating system of the virtual machine to be migrated and exports a qcow2 image file if the operating system type of the virtual machine to be migrated is a Windows system, then configures network information of the Hyper-V platform after migration, exports the qcow2 image file to the Hyper-V platform, and finally converts the qcow2 image file into a vhdx format, so that migration of the virtual machine to be migrated is realized, the migration success rate of the virtual machine is improved, and the problem that the existing market lacks a Hyper-V virtualization migration solution is solved.
The modules in the virtual machine migration device across the virtualization platform can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 4. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of virtual machine migration across virtualization platforms.
Those skilled in the art will appreciate that the architecture shown in fig. 4 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
judging the migration type of the virtual machine, and if the virtual machine is migrated from the KVM platform to the Hyper-V platform, acquiring the type of the operating system of the virtual machine to be migrated;
if the operating system type of the virtual machine to be migrated is a Windows system, closing the operating system of the virtual machine to be migrated and exporting a qcow2 image file;
configuring network information of the transferred Hyper-V platform, and exporting the qcow2 mirror image file to the Hyper-V platform;
and converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated.
In one embodiment, the processor, when executing the computer program, further performs the steps of: if the operating system type of the virtual machine to be migrated is a Linux system, acquiring a kernel version of the virtual machine to be migrated; acquiring a target kernel starting mirror image based on the kernel version of the virtual machine to be migrated, closing an operating system of the virtual machine to be migrated and exporting a qcow2 mirror image file; importing the target kernel boot image into a system boot file, and clearing udev rule information and a cloud-init running plug-in the system; configuring network information of the transferred Hyper-V platform, and exporting the qcow2 mirror image file to the Hyper-V platform; and converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated.
In one embodiment, the processor, when executing the computer program, further performs the steps of: if the local Hyper-V kernel library of the virtual machine to be migrated contains the target kernel boot image, directly acquiring the target kernel boot image; and if the local Hyper-V kernel library of the virtual machine to be migrated does not contain the target kernel boot image, writing the kernel file into the Hyper-V driver for recompilation, and acquiring the target kernel boot image.
In one embodiment, the processor, when executing the computer program, further performs the steps of: if the virtual machine is migrated from the Hyper-V platform to the KVM platform, acquiring the operating system type of the virtual machine to be migrated; closing an operating system of a virtual machine to be migrated, exporting an image file, and then transmitting the image file to a KVM platform; converting the image file into a qcow2 format, and installing virtio related drivers; and configuring network information of the KVM platform after migration, and realizing the migration of the virtual machine to be migrated.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and if the operating system type of the virtual machine to be migrated is a Windows system, executing the batch file installation virtio related driver through the starting item.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and if the operating system type of the virtual machine to be migrated is a Linux system, installing a virtio related driver based on a virt-copy-in command.
The computer equipment judges the migration type of the virtual machine, acquires the operating system type of the virtual machine to be migrated if the virtual machine to be migrated is migrated from a KVM platform to a Hyper-V platform, closes the operating system of the virtual machine to be migrated and exports a qcow2 image file if the operating system type of the virtual machine to be migrated is a Windows system, then configures network information of the migrated Hyper-V platform, exports the qcow2 image file to the Hyper-V platform, and finally converts the qcow2 image file into a vhdx format, so that the migration of the virtual machine to be migrated is realized, the migration success rate of the virtual machine is improved, and the problem that the existing market lacks a Hyper-V virtualization migration solution is solved.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
judging the migration type of the virtual machine, and if the virtual machine is migrated from the KVM platform to the Hyper-V platform, acquiring the type of the operating system of the virtual machine to be migrated;
if the operating system type of the virtual machine to be migrated is a Windows system, closing the operating system of the virtual machine to be migrated and exporting a qcow2 image file;
configuring network information of the transferred Hyper-V platform, and exporting the qcow2 mirror image file to the Hyper-V platform;
and converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated.
In one embodiment, the computer program when executed by the processor further performs the steps of: if the operating system type of the virtual machine to be migrated is a Linux system, acquiring a kernel version of the virtual machine to be migrated; acquiring a target kernel starting mirror image based on the kernel version of the virtual machine to be migrated, closing an operating system of the virtual machine to be migrated and exporting a qcow2 mirror image file; importing the target kernel boot image into a system boot file, and clearing udev rule information and a cloud-init running plug-in the system; configuring network information of the transferred Hyper-V platform, and exporting the qcow2 mirror image file to the Hyper-V platform; and converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated.
In one embodiment, the computer program when executed by the processor further performs the steps of: if the local Hyper-V kernel library of the virtual machine to be migrated contains the target kernel boot image, directly acquiring the target kernel boot image; and if the local Hyper-V kernel library of the virtual machine to be migrated does not contain the target kernel boot image, writing the kernel file into the Hyper-V driver for recompilation, and acquiring the target kernel boot image.
In one embodiment, the computer program when executed by the processor further performs the steps of: if the virtual machine is migrated from the Hyper-V platform to the KVM platform, acquiring the operating system type of the virtual machine to be migrated; closing an operating system of a virtual machine to be migrated, exporting an image file, and then transmitting the image file to a KVM platform; converting the image file into a qcow2 format, and installing virtio related drivers; and configuring network information of the KVM platform after migration, and realizing the migration of the virtual machine to be migrated.
In one embodiment, the computer program when executed by the processor further performs the steps of: and if the operating system type of the virtual machine to be migrated is a Windows system, executing the batch file installation virtio related driver through the starting item.
In one embodiment, the computer program when executed by the processor further performs the steps of: and if the operating system type of the virtual machine to be migrated is a Linux system, installing a virtio related driver based on a virt-copy-in command.
The storage medium judges the migration type of the virtual machine, if the virtual machine is migrated from the KVM platform to the Hyper-V platform, the operating system type of the virtual machine to be migrated is acquired, if the operating system type of the virtual machine to be migrated is a Windows system, the operating system of the virtual machine to be migrated is closed, a qcow2 image file is exported, then network information of the migrated Hyper-V platform is configured, the qcow2 image file is exported to the Hyper-V platform, and finally the qcow2 image file is converted into a vhdx format, so that migration of the virtual machine to be migrated is achieved, the migration success rate of the virtual machine is improved, and the problem that a Hyper-V virtualization migration solution is lacking in the existing market is solved.
In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, performs the steps of:
judging the migration type of the virtual machine, and if the virtual machine is migrated from the KVM platform to the Hyper-V platform, acquiring the type of the operating system of the virtual machine to be migrated;
if the operating system type of the virtual machine to be migrated is a Windows system, closing the operating system of the virtual machine to be migrated and exporting a qcow2 image file;
configuring network information of the transferred Hyper-V platform, and exporting the qcow2 mirror image file to the Hyper-V platform;
and converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated.
In one embodiment, the computer program when executed by the processor further performs the steps of: if the operating system type of the virtual machine to be migrated is a Linux system, acquiring a kernel version of the virtual machine to be migrated; acquiring a target kernel starting mirror image based on the kernel version of the virtual machine to be migrated, closing an operating system of the virtual machine to be migrated and exporting a qcow2 mirror image file; importing the target kernel boot image into a system boot file, and clearing udev rule information and a cloud-init running plug-in the system; configuring network information of the transferred Hyper-V platform, and exporting the qcow2 mirror image file to the Hyper-V platform; and converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated.
In one embodiment, the computer program when executed by the processor further performs the steps of: if the local Hyper-V kernel library of the virtual machine to be migrated contains the target kernel boot image, directly acquiring the target kernel boot image; and if the local Hyper-V kernel library of the virtual machine to be migrated does not contain the target kernel boot image, writing the kernel file into the Hyper-V driver for recompilation, and acquiring the target kernel boot image.
In one embodiment, the computer program when executed by the processor further performs the steps of: if the virtual machine is migrated from the Hyper-V platform to the KVM platform, acquiring the operating system type of the virtual machine to be migrated; closing an operating system of a virtual machine to be migrated, exporting an image file, and then transmitting the image file to a KVM platform; converting the image file into a qcow2 format, and installing virtio related drivers; and configuring network information of the KVM platform after migration, and realizing the migration of the virtual machine to be migrated.
In one embodiment, the computer program when executed by the processor further performs the steps of: and if the operating system type of the virtual machine to be migrated is a Windows system, executing the batch file installation virtio related driver through the starting item.
In one embodiment, the computer program when executed by the processor further performs the steps of: and if the operating system type of the virtual machine to be migrated is a Linux system, installing a virtio related driver based on a virt-copy-in command.
The computer program product judges the migration type of the virtual machine, acquires the operating system type of the virtual machine to be migrated if the virtual machine to be migrated is migrated from a KVM platform to a Hyper-V platform, closes the operating system of the virtual machine to be migrated and exports a qcow2 image file if the operating system type of the virtual machine to be migrated is a Windows system, then configures network information of the Hyper-V platform after migration, exports the qcow2 image file to the Hyper-V platform, and finally converts the qcow2 image file into a vhdx format, so that the migration of the virtual machine to be migrated is realized, the migration success rate of the virtual machine is improved, and the problem that the existing market lacks a Hyper-V virtualization migration solution is solved.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), Magnetic Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A method for virtual machine migration across virtualization platforms, the method comprising:
judging the migration type of the virtual machine, and if the virtual machine is migrated from the KVM platform to the Hyper-V platform, acquiring the type of the operating system of the virtual machine to be migrated;
if the operating system type of the virtual machine to be migrated is a Windows system, closing the operating system of the virtual machine to be migrated and exporting a qcow2 image file;
configuring network information of the transferred Hyper-V platform, and exporting the qcow2 mirror image file to the Hyper-V platform;
and converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated.
2. The method of claim 1, wherein the method of virtual machine migration across virtualization platforms further comprises:
if the operating system type of the virtual machine to be migrated is a Linux system, acquiring a kernel version of the virtual machine to be migrated;
acquiring a target kernel starting mirror image based on the kernel version of the virtual machine to be migrated, closing an operating system of the virtual machine to be migrated and exporting a qcow2 mirror image file;
importing the target kernel boot image into a system boot file, and clearing udev rule information and a cloud-init running plug-in the system;
configuring network information of the transferred Hyper-V platform, and exporting the qcow2 mirror image file to the Hyper-V platform;
and converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated.
3. The method according to claim 2, wherein the obtaining a target kernel boot image based on the kernel version of the virtual machine to be migrated comprises:
if the local Hyper-V kernel library of the virtual machine to be migrated contains the target kernel boot image, directly acquiring the target kernel boot image;
and if the local Hyper-V kernel library of the virtual machine to be migrated does not contain the target kernel boot image, writing the kernel file into the Hyper-V driver for recompilation, and acquiring the target kernel boot image.
4. The method of claim 1, wherein the method of virtual machine migration across virtualization platforms further comprises:
if the virtual machine is migrated from the Hyper-V platform to the KVM platform, acquiring the operating system type of the virtual machine to be migrated;
closing an operating system of a virtual machine to be migrated, exporting an image file, and then transmitting the image file to a KVM platform;
converting the image file into a qcow2 format, and installing virtio related drivers;
and configuring network information of the KVM platform after migration, and realizing the migration of the virtual machine to be migrated.
5. The method of claim 4, wherein said installing a virtio-related drive comprises:
and if the operating system type of the virtual machine to be migrated is a Windows system, executing the batch file installation virtio related driver through the starting item.
6. The method of claim 5, wherein said installing a virtio-related drive further comprises:
and if the operating system type of the virtual machine to be migrated is a Linux system, installing a virtio related driver based on a virt-copy-in command.
7. An apparatus for virtual machine migration across virtualization platforms, the apparatus comprising:
the obtaining module is used for judging the migration type of the virtual machine, and obtaining the type of the operating system of the virtual machine to be migrated if the virtual machine is migrated from the KVM platform to the Hyper-V platform;
the first export module is used for closing the operating system of the virtual machine to be migrated and exporting the qcow2 mirror image file when the operating system type of the virtual machine to be migrated is a Windows system;
the second export module is used for configuring the network information of the transferred Hyper-V platform and exporting the qcow2 image file to the Hyper-V platform;
and the migration module is used for converting the qcow2 image file into a vhdx format to realize the migration of the virtual machine to be migrated.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 6 when executed by a processor.
CN202111361476.4A 2021-11-17 2021-11-17 Virtual machine migration method and device across virtualization platforms and computer equipment Pending CN114237814A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111361476.4A CN114237814A (en) 2021-11-17 2021-11-17 Virtual machine migration method and device across virtualization platforms and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111361476.4A CN114237814A (en) 2021-11-17 2021-11-17 Virtual machine migration method and device across virtualization platforms and computer equipment

Publications (1)

Publication Number Publication Date
CN114237814A true CN114237814A (en) 2022-03-25

Family

ID=80749812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111361476.4A Pending CN114237814A (en) 2021-11-17 2021-11-17 Virtual machine migration method and device across virtualization platforms and computer equipment

Country Status (1)

Country Link
CN (1) CN114237814A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117112071A (en) * 2023-10-25 2023-11-24 成都云祺科技有限公司 Cross-platform configuration information conversion method, system, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117112071A (en) * 2023-10-25 2023-11-24 成都云祺科技有限公司 Cross-platform configuration information conversion method, system, equipment and storage medium
CN117112071B (en) * 2023-10-25 2024-01-02 成都云祺科技有限公司 Cross-platform configuration information conversion method, system, equipment and storage medium

Similar Documents

Publication Publication Date Title
US10740132B2 (en) Systems and methods for updating containers
US10379836B2 (en) Optimized creation of distributed storage and distributed processing clusters on demand
US9983891B1 (en) Systems and methods for distributing configuration templates with application containers
EP3117311B1 (en) Method and system for implementing virtual machine images
US8631217B2 (en) Apparatus, system, and method for virtual machine backup
US7669020B1 (en) Host-based backup for virtual machines
US8621461B1 (en) Virtual machine based operating system simulation using host ram-based emulation of persistent mass storage device
KR101606212B1 (en) Hypervisor file system
US8776058B2 (en) Dynamic generation of VM instance at time of invocation
US20140033201A1 (en) System and Method of Replicating Virtual Machines for Live Migration Between Data Centers
US9792075B1 (en) Systems and methods for synthesizing virtual hard drives
US10606646B1 (en) Systems and methods for creating a data volume from within a software container and initializing the data volume with data
CN102799483B (en) A kind of method and apparatus for conversion operations system running environment
US10474484B2 (en) Offline management of virtualization software installed on a host computer
US11709692B2 (en) Hot growing a cloud hosted block device
US9336131B1 (en) Systems and methods for enabling virtual environments to mount non-native storage disks
CN111679889B (en) Conversion migration method and system of virtual machine
US11068353B1 (en) Systems and methods for selectively restoring files from virtual machine backup images
US10175886B1 (en) Systems and methods for handling missing storage image layers while provisioning containers in computer clusters
US10248523B1 (en) Systems and methods for provisioning distributed datasets
CN114237814A (en) Virtual machine migration method and device across virtualization platforms and computer equipment
US20230185580A1 (en) Single node deployment of container platform
WO2022083158A1 (en) Data processing method, instances and system
US20140195752A1 (en) Efficient copying between storage devices
JP2022536681A (en) non-volatile storage identifier

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