Prepare an ESXi Host for Maintenance
This document describes steps required to prepare an ESXi host for the maintenance. Examples of such maintenance include:
- Replacing broken/old hard drives.
- Reinstalling ESXi system.
Prerequisites
Requirements for CI admin:
- Access to Contrail Windows CI infrastructure.
- Credentials to Contrail Windows CI VMware cluster.
- Browser with Flash support, preferably Chrome.
Before proceeding with the following steps take note of:
- ESXi host hostname
- ESXi local datastore list
In this document, the ESXi host being prepared for the maintenance will be referred to as maintaned host.
Steps
- Open the vSphere Web Client and login using credentials provided by Contrail Windows CI team.
- In
Navigatorpane selectStoragetab. - Expand
WinCI-Datastores-SSDdatastore cluster.- Identify local datastores of maintained host.
- For each such datastore perform:
- Right click on the datastore.
- Click
Move To...option. - In the
Move To...window, selectCI-DC. - Click
Okbutton.
- Perform the previous step for other datastore clusters:
WinCI-Datastores-SATAWinCI-Datastores-Infra
- NOTE: Testbeds in CI are spawned on datastores from
WinCI-Datastores-SSDdatastore cluster. Removing host's datastores from it denies new testbeds from being spawned on this host. - In
Navigatorpane selectHosts and Clusterstab. - Expand
CI-DCdatacenter entry. - Expand
WinCIcluster entry. - Find the maintained host entry click on it.
- Migrate virtual machines off the maintained host.
- Left click on the host entry in the
Navigatorpane. - In the main pane select
VMstab. - For each VM in the table perform the following steps:
- Right click on the VM.
- Select
Migrate...option. Migratewizard should open up.- In
Select the migration typestep:- Select
Change both compute resource and storageoption. - Select
Select compute resource firstoption. - Click
Nextbutton.
- Select
- In
Select a compute resourcestep:- Expand
CI-DCdatacenter entry. - Expand
WinCIcluster entry. - Select a host different than maintained host.
- Click
Nextbutton.
- Expand
- In
Select storagestep:- Select a datastore local to host selected in the previous step.
- Click
Nextbutton.
- In
Select networksstep:- Verify that
Source NetworkmatchesDestination Networkin the presented table. - Click
Nextbutton.
- Verify that
- In
Select vMotion prioritystep:- Select
Schedule vMotion with high priorityoption. - Click
Nextbutton.
- Select
- In
Ready to completestep:- Click
Finishbutton.
- Click
- Left click on the host entry in the
- Migrate templates.
- Left click on the host entry in the
Navigatorpane. 47 - In the main pane selectVMstab. - In the main pane select
VMstab. - Below
VMstab, selectVM Templates if Folders. - For each template perform the following steps:
- Right click on the template.
- Select
Convert to Virtual Machine...option. Convert Template to Virtual Machinewizard should open up:- In
Select a compute resourcestep:- Click on
WinCIcluster object. - In the bottom of the windows, you should see
Compatibility checks succeeded. - Click
Nextbutton.
- Click on
- In
Ready to Completestep:- Click
Finishbutton.
- Click
- Change screen from
VM Templates in FolderstoVirtual Machines. - If the template is listed on the VM list:
- Perform the same migration steps as for virtual machines from step 11.
- If the template is not listed:
- It probably was already located on shared storage and VMware reassigned it to the different host.
- To confirm search for this template in
VMs and Templatestab, inNavigatorpane.
- Right click on this relocated/migrated VM and select
Template > Convert to Templateoption.- In the
Confirm Convertwindows, clickYesbutton.
- In the
- NOTE:
testbedtemplates should stay onNFS-Datastore, since template location on shared storage is a requirement of linked clones. - NOTE: If enough space is free on
NFS-Datastore, latest templates should be located on it.
- Left click on the host entry in the
- Switch host to the maintenance mode.
- Right click on the host entry in the
Navigatorpane. - Select
Maintenance Mode > Enter Maintenance Modeoption. - In the
Confirm Maintenance Modewindow, uncheckMove powered-off and suspended virtual machines to other hosts in the clusteroption. - Click
OKbutton.
- Right click on the host entry in the
- Move host out of the
WinCIcluster.- Right click on the host entry in the
Navigatorpane. - Select
Move To...option. - Click on
CI-DCdatacenter object. - Click
OKbutton.
- Right click on the host entry in the