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 uses vMotion to achieve hot migration of virtual machines

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Storage is a very critical part of the physical infrastructure of vSphere. Without good storage, there is no need for virtualization. And it can determine its system performance and whether advanced functions such as vMotion can be realized.

Knowledge points that must be understood to implement hot migration of virtual machines using vMotion:

ESXi storage: ESXi provides host-level storage virtualization, divided into local storage and external shared storage. They are mainly used to store virtual machine files, such as common vmdk, vmx and nvram files, and the files in the virtual machine system are stored on the virtual disk vmdk.

Local storage: internal or external disks that can communicate without a network, including storage systems such as SCSI, IDE, SATA, USB, and SAS; sharing among multiple ESXi hosts is not supported.

External shared storage: an external storage disk or array connected by an ESXi host through a network, including:

SAN (Storage area Network): complex deployment, but powerful performance

ISCSI (Network attached Storage): attach storage to an existing network for easy deployment but poor performance

NFS (Network Storage Protocol)

Storage protocols, which can be shared by multiple ESXi hosts.

Openfiler is a free NAS/ISCSI SAN server system that is mainly used to provide opposing storage systems for LAN hosts. Openfiler provides a variety of connection methods, including nfs, smb, iscsi, target and so on, which are generally managed by http. If you want to access the data on the openfiler, you can do so through iscsi initiator, shared folders, mount, and so on. For small and medium-sized enterprises that want to build virtualization, it is the best tool for the Provision phase.

VMotion is the basis of all vshpere advanced features and enables hot migration, that is, virtual machines can be migrated from one esxi host to another esxi host in real time without power off, making it easier to maintain, reduce failures, and so on.

The migration process for vMotion (if an error occurs during the migration, the virtual machine will revert to its original state and location) is as follows:

When ① requests vmotion migration, vcenter server verifies that the virtual machine and esxi host state is stable

② at this point, the source esxi host clones the virtual machine memory to the new esxi host

The ③ source esxi host records the memory information that changed during the clone on the bitmap (memory bitmap)

④ when the virtual machine memory data is migrated to the new esxi host, the source esxi host puts the virtual machine in a quiescent state where the virtual machine cannot provide services, and then clone the memory bitmap to the new esxi host. The time required for a forbidden state is extremely short

The new esxi of ⑤ recovers the memory data according to memory bitmap. After completion, the memory of the two esxi hosts is exactly the same for this virtual machine.

⑥ finally runs the virtual machine on the new esxi host and deletes the in-memory data in the source esxi host.

The compatibility requirements for running vmotion are as follows:

① does not allow connections to devices that can only be recognized by a single esxi host, such as optical drives and floppy disks

② does not allow connections to virtual switches without a physical network

③ migrated virtual machines must be stored in external shared storage and accessible to all esxi hosts

At least 1 gigabit network card for ④ esxi host is used for vmotion

⑤ if standard switching uses machines, you must ensure that the port group network labels of all esxi hosts are consistent

⑥ the cpu vendor used by all esxi hosts must be consistent (Intel or AMD).

The experimental environment is as follows:

Install Openfiler first

To install openfiler, you can download the ISO image of openfiler through the official website of http://www.openfiler.com/, or through the

Link: https://pan.baidu.com/s/1KFVDIbk1tRE-9EbfAGRJpw

Extraction code: lyz6

To get the Openfiler system image.

Installation process:

The default user name is root, and the password will be prompted during installation. Openfiler itself is a fairly complete Linux operating system, and most of the commands are the same as Linux.

Installation complete!

Openfiler system configuration ISCSI

When the Openfiler system is installed and rebooted, the system will configure all the subsequent configuration processes through Web.

User name is Openfiler and password is password

See various initialization messages for the system.

Next:

Displays the hard disk information mounted by the system

Go to the disk editing page and you can see the disk partition information that has been assigned

Create a volume group

Create ISCSI Volum

Start the appropriate service

Openfiler configuration is complete!

Create the required port group

For detailed steps on creating a port group, please refer to the blog post: https://blog.51cto.com/14157628/2409254

To implement vMotion, it is not enough to have only one port group for vMotion, you also need to create another ISCSI port group to connect to shared storage.

VMotion port group has been created!

Create an iSCSI port group that loves you in the same way

Another ESXi host also creates the same network port group (the name must be the same)

Connect to shared storage

It's the same configuration on another ESXi host!

Create new shared storage

If there is no screenshot, keep it by default!

VMotion migrates virtual machines

Click "vCenter" → "hosts and clusters" in the navigation bar to see a virtual machine

After completion, the disk files of the virtual machine have been migrated to the shared storage.

In order to better observe the effect of vMotion, power on the virtual machine and test the connectivity with the virtual machine through the ping command (always ping)

Delay, packet loss and other phenomena will occur during the migration process, but the connection will not be disconnected and will return to normal after the migration is completed.

VMotion hot transfer operation completed!

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

Servers

Wechat

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

12
Report