ConfigMgr

VMware, Azure and Automation

YAMS – Yet Another Migration Script

23 juni 2020 PowerCli Script VMware

I was asked if I could write a script that could be used for moving VMs to another data center location. Sounds easy right? Well, there were some specific requirements that made it a bit more challenging…

  • Downtime for the VMs should be kept to a minimum.
  • Some clusters re-use the current hardware while other clusters are getting new hardware.
  • Some clusters are merged with each other.

All ESXi clusters are stretched but the underlying storage layer is not stretched. Datastores are local to their location but can be synced so it looks like shared storage.

There are two datacenter locations and one of them needs to be dismantled. So a third location is introduced.

There are several different migration scenarios:

  • Place temporary hosts at the new location and perform a vMotion and Storage vMotion to those hosts.
  • Then relocate the old hosts to that location and perform a second vMotion from the temporary hosts to the old hosts.
  • Perform a Storage vMotion of the VMs in the second location to storage that is synced with the storage at the new, third location.
  • Move VMs to a new cluster by doing a vMotion and Storage vMotion from the first location to the new, third location.
  • Move VMs to a new cluster by doing a vMotion and Storage vMotion from the second location to new hosts at that same location.

And this must be possible with one script…

The code…

migrationpowercli

Migrating Windows PSC to VCSA - failed to send HTTP data

ESXi Events flooded... Firewall configuration has changed.

Recent Posts

  • Using API for Aria OPS Chargeback
  • Unable to set reservation on Org VDC
  • Veeam Tweaks
  • VCF Anyone? Get your license for free…
  • Configure Entra ID as Cloud Director IdP

Recent Comments

Geen reacties om te tonen.

Archives

  • april 2025
  • maart 2025
  • november 2024
  • oktober 2024
  • januari 2024
  • november 2023
  • oktober 2023
  • september 2023
  • juni 2023
  • mei 2023
  • april 2023
  • november 2022
  • maart 2021
  • februari 2021
  • januari 2021
  • november 2020
  • oktober 2020
  • september 2020
  • juli 2020
  • juni 2020
  • april 2020
  • maart 2020
  • februari 2020
  • oktober 2019
  • september 2019
  • juli 2019
  • juni 2019
  • mei 2019
  • maart 2019
  • februari 2019
  • januari 2019
  • december 2018
  • november 2018
  • april 2018
  • januari 2018
  • juli 2017
  • juni 2017
  • mei 2017

Categories

  • AnyLinq
  • Azure
  • Cloud Director
  • ConfigMgr
  • DIY
  • HomeAssistant
  • Microsoft
  • PowerCli
  • Powershell
  • SCCM
  • Script
  • Solutions
  • System Center
  • Veeam
  • VMware
  • vRealize Automation
  • vRealize Orchestrator
Proudly powered by WordPress | Theme: Doo by ThemeVS.