当前位置:网站首页>[vSphere high availability] virtual machine reset and restart

[vSphere high availability] virtual machine reset and restart

2022-07-24 05:41:00 hongdi

Reset is different from restart , Reset refers to rebooting the client operating system

One 、 Factors to consider when restarting the virtual machine :

After failure , The preferred host will select an active secondary host to start the virtual machine on the failed host by considering the following factors :

1、 File accessibility . The host in the active cluster should be able to access the virtual machine files ;

2、 Compatibility between virtual machine and host . Include any required virtual machines - The impact of host association rules .

3、 Reserve resources . At least one host has enough unreserved capacity ( No other resources are reserved ) To meet the memory overhead of the virtual machine and any resource reservation . consider 4 Types of reservations :cpu、 Memory 、v NIC And virtual flash ( In addition, there must be enough network ports ).

4、 Host restrictions . A virtual machine can only be placed on one host .

5、 Functional limitation . Including the needs that have been set vsphere ha Enforcement “ virtual machine - Virtual machine anti association rules ( Can't exist at the same time )” Advanced options for ; Include any per host limits configured for fault tolerant virtual machines .

If no host meets the above factors , Then the preferred host will issue a time indicating that there are not enough resources to vsphere ha To start the virtual machine , But it will retry when the cluster condition changes ( To choose ).

Two 、 The number of virtual machine restarts is limited

If vsphere ha The master agent failed to restart the virtual machine , Will retry after a delay .Vsphere ha The default maximum number of restarts is 6 Time , But not all restart failures are calculated according to this maximum :

1、 By default, restart according to the maximum : When restart fails , The master agent will retry after twice the delay implemented since the last attempt , Minimum delay 1 minute , Most delay 30 minute . for example , The delay time is set to 1 Minutes and in t=0 Start trying , Then the time point of retry is t=1,t=3,t=7,t=15,t=30;

2、 Different restart failures , With different delay intervals . For example, when the host that chooses to restart the virtual machine loses access to a virtual machine data store after the master agent makes a choice , Will delay by default 2 Try again in minutes , The maximum number limit is 6.

3、 In some cases, it will not be counted . for example , If the host to restart the virtual machine fails before the master agent sends a restart request , Will be in 2 Try again in minutes , But it will not count .

3、 ... and 、 How to determine that the virtual machine needs to be reset ?

“ Virtual machine monitoring ” When enabled , Virtual machine monitoring service ( Use vmware tools) By checking the vmware tools Routine detection signals and i/0 Activity to evaluate whether each virtual machine in the cluster is running .

If no detection signal is received or i/o Activities , The client operating system may fail , Or assigned to vmware tools Time to complete the task . Sometimes , Virtual machines or applications that are still working will stop sending detection signals . in order to Avoid unnecessary resetting , The virtual machine monitoring service also monitors the virtual machine i/o Activities , If no detection signal is received within the failure time interval , Will check i/o Statistical interval ( Cluster level properties ).i/o The statistical interval is determined in the first two minutes ( Default ,120s, You can use advanced options das.iostatsinterval Set up ) Whether any disk or network activity related to the virtual machine has occurred in , If not, reset the virtual machine .

The time interval between the failure and reset of the virtual machine can be controlled by monitoring the sensitivity , And retry after reset failure

To avoid repeatedly recharging virtual machines due to non transient errors . By default , The virtual machine will be reset only three times in a configurable time interval ( The maximum number of resets can be configured ).

Be careful : When the virtual machine is powered off and then powered on , Or use vmotion When migrating a virtual machine to another host , Reset statistics will be cleared , This will cause the client operating system on the virtual machine to reboot ( Different from the virtual machine power status changes “ Restart ”).

If the virtual machine has data storage access failure ( All paths are abnormal or permanent devices are lost ), Then the virtual machine monitoring service will suspend the virtual machine , Until the fault is eliminated .

原网站

版权声明
本文为[hongdi]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/205/202207240516307112.html