3

In my DC admins have to unplug my FC connection from ESXi5 (from EMC VNX) (temporary, some maintance works). I have never done that before and have some doubt about my own procedure...

My first thought was to turn off all VM's (but only few are using storage mounten via FC), then turn off ESXi, then admins will do they work and after reconect I will turn on my ESXi and all VM's (I don't is this correct thinking).

Second plan was to turn off only VM's that uses mounted storage via FC then let admins unplug FC connection...

I'm not convinced about the two ways. So what is a proper procedure for unplugging fiber chanel from ESXi.

B14D3
  • 5,110
  • 13
  • 58
  • 82

2 Answers2

3

What version of ESXi hypervisor do you have installed? The following procedure is for ESXi 5.x and it is performed from GUI with vSphere client 5.x.

I would shutdown all the virtual machines on that datastore as you wrote, then I would remove/unregister all the machines from the inventory and finally I would unmount it which ensures that there is no active machine on it, there is no storage DRS running and so on. The successful unmount should present you this confirmation window

enter image description here

After confirmation, you can begin with maintenance of the storage. When you are finished mount the datastore and re-register the machines.

Finally, I would like to mention that if you had deployed vCenter server and proper licensing in your environment you you could use Storage vMotion feature to migrate the machines to another storage/datastore without any downtime.

dsmsk80
  • 5,757
  • 17
  • 22
1

If you have the time, the best way would be to shut down or suspend the VMs and unmount the data store (or even shut down the ESXi instance altogether if you do not have other VMs which have to keep running and do not depend on the data store) for the duration of the maintenance.

At times where you cannot afford the suspend/unmount/remount/restart cycle (e.g. if you have VMs which would take too long to either shut down or suspend and subsequently restart to possibly fit into the maintenance window), you might want to consider an entirely unsupported, hacky but very quick alternative:

  1. use SSH to log in to the console and halt your virtual machines by issuing STOP signals to the vcpu-<X>:<vmname> processes of the affected virtual machines kill STOP <pid> - this will stop execution and thus cease the VM's I/O.
  2. disconnect FC link(s) and do whatever you need to do (VMFS is quite robust in respect to disconnects)
  3. reconnect FC link(s)
  4. re-login to the target(s) - if you use QLogic's HBAs, use echo "scsi-qlalip"> /proc/scsi/qla2xxx/<hba#> on the console to do so
  5. let ESXi re-check the HBAs and see if the path(s) come up "Active" again and see if you can access the data store through the GUI
  6. unfreeze your VMs by issuing CONT signals to all vcpu-<X>:<vmname> processes you've STOPped before
  7. check if you need to adjust clocks since the VMs would not have received timer interrupts while STOPped

The most crucial point here is that you need to get the HBA to re-login, otherwise the ESXi instance would not be able to get to the store unless you reboot - this should be tested and verified to work beforehand, especially if you have non-QLogic HBAs (where the procedure has been quite well documented all over the web and which I personally can confirm to be working).

the-wabbit
  • 40,319
  • 13
  • 105
  • 169