Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

VSphere migrates virtual machines

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

When managing a virtual machine cluster, if a virtual machine suddenly goes down, it will cause downtime, and the business will be suspended during the period, which may bring inestimable losses. In view of this, we need to learn another way to manage virtual machines, and that is to migrate virtual machines. VMotion migration migrates powered on virtual machines from one ESXI host to another ESXI host.

Advantages of vMotion:

1. Improve overall hardware utilization

two。 Can be used to enable virtual machines to continue to run during planned hardware downtime

3. Can be used to enable vSphere Distributed Resource Scheduler (DRS) to balance the load of virtual machines across hosts

Virtual machine migration is the process of moving a virtual machine from one host or storage location to another. Copying a virtual machine refers to the creation of a new virtual machine, not a form of migration.

In vCenter Server, the following migration options are available:

Cold migration: move a powered-down virtual machine to a new host. (optional) configuration files and disk files can be relocated to a new storage location. You can use cold migration to move virtual machines from one data center to another.

Migrate suspended virtual machines: move suspended virtual machines to a new host. (optional) configuration files and disk files can be relocated to a new storage location. Suspended virtual machines can be migrated from one data center to another.

Migrate via vMotion: move the powered-on virtual machine to the new host. With vMotion migration, you can move a virtual machine to a new host without disrupting virtual machine availability, but you cannot use vMotion to move a virtual machine from one data center to another.

Migrate through StoragevMotion: move the virtual disk or configuration file of the powered-on virtual machine to another data store. With Storage vMotion migration, the storage of a virtual machine can be moved without disrupting the availability of the virtual machine.

Suspended migration of virtual machines and migration through vMotion are sometimes referred to as "hot migrations" because they allow virtual machines to be migrated without powering off them. Migrating through vMotion is sometimes referred to as "live migration".

You can move the virtual machine manually or you can set up scheduled tasks to perform a cold migration.

New virtual machines can be created by cloning virtual machines or copying their disks and configuration files, and cloning is not a form of migration.

The following are the actual operations of several migration methods:

Environment: on one of my VC clients, there are two ESXI hosts, the ip are 172.16.1.46 and 172.16.1.81, respectively

1. Cold migration operation:

Select "migrate" on the virtual machine to be migrated

Select change Host

Select the target host

Select the location of the virtual machine migrated to 172.16.1.46

After completion, you can see the progress being implemented in the recent task.

two。 Migrate data Stora

With the cold migration done earlier, the migration of the data store is very simple, as follows, select the "change data store" mode. Then select the target storage location and ok it.

3. Heat transfer

Some conditions are needed for heat transfer, and sufficient preparatory work should be done. Now let's talk about the necessary conditions for heat transfer.

The requirements that must be met by the virtual machine to be migrated by ①:

A virtual machine cannot be connected to an internal virtual switch (a virtual switch with zero uplink adapters).

Virtual machines cannot be connected to virtual devices that load local images, such as CD-ROM or floppy disk drives or ISO images.

Virtual machines cannot configure CPU associativity.

If the target host cannot access the swap file of the virtual machine, vMotion must be able to create a swap file that the target host can access before the migration can begin.

If the virtual machine is using RDM, the target host must be able to access the RDM (bare device mapping)

② source and target hosts must have compatible CPU features

③ ensures that the source host and the target host have a shared storage, so that both machines can access virtual machine files, and the data storage of the migrated virtual machine is also migrated to

Therefore, before doing the experiment, you must first check whether the CPU types of the two hosts are the same, and add a Vkernel port group to allow migration (in the previous blog, it was mentioned how to create a Vkernel port group, if necessary, you can check it out)

Make sure that the CD/DVD drive cannot connect to the local image file and connect to the client device

Go to the "home page" and click "data Storage and data Storage Cluster" to view the shared storage. In this case, you need to migrate the data storage to the shared storage VMFS-Esxi, so that both hosts can access the data of the virtual machine.

After the preparatory work is done, here is a simple operation:

Select change Host

Select the target host

Priority Select "High priority"

When you are finished, you can check the progress bar. The migration is in progress.

There are three ways to migrate. Suspending a virtual machine in a pending state is similar to a cold migration.

Another point is that with vMotion or Storage vMotion, a host can perform up to two migration operations at the same time

Up to eight simultaneous vMotion, clone, deployment, or Storage vMotion access to a single VMFS-5 data store is supported.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report