• About me…

ConfigMgr.nl

VMware, Automation and more

  • About me…

YAMS – Yet Another Migration Script

23-06-2020 PowerCli Script VMware No Comments

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.

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • Testing Script Runtime Service for vSphere – part 2
  • Reporting on your Windows Server backup
  • Testing Script Runtime Service for vSphere – part 1
  • Using ADFS with vCenter 7
  • Network Port Diagram vSphere
  • Joining ESXi hosts to AD using Authentication Proxy in vCenter 7 (updated 04-12-2020)
  • Windows Server 2019 customization issue
  • Packer and WinRM – mystery resolved
  • Using LDAPS with vCenter and AD
  • Backup your homelab… for free!

Archives

Categories

AnyLinq (1) Azure (2) ConfigMgr (8) DIY (4) PowerCli (9) Powershell (10) SCCM (9) Script (12) Solutions (16) System Center (3) VMware (31) vRealize Automation (1) vRealize Orchestrator (1)

Jeroen BurenFollow

Jeroen Buren
jeroen_burenJeroen Buren@jeroen_buren·
23 Feb

Eerlijk gezegd ben ik niet zo opstandig maar dit kan je toch niet volhouden? Gooi wat mij betreft de winkels, sportscholen en restaurants maar open! Ik weet wel op wie ik niet ga stemmen... #persconferentie #klaarmetRutte

Reply on Twitter 1364303792364269568Retweet on Twitter 1364303792364269568Like on Twitter 13643037923642695682Twitter 1364303792364269568
jeroen_burenJeroen Buren@jeroen_buren·
22 Feb

Installed vSphere with K8S using this awesome script (https://github.com/lamw/vghetto-vsphere-with-kubernetes-external-nsxt-automated-lab-deployment) from @lamw. The only thing I could not get running was the yelb demo app... Could it be the NSX-T 3.1 Limited Export edition? #vExpert #NSX

Reply on Twitter 1363884748205142020Retweet on Twitter 1363884748205142020Like on Twitter 1363884748205142020Twitter 1363884748205142020
Retweet on TwitterJeroen Buren Retweeted
Annemiek73Annemiek Meijer@Annemiek73·
16 Jan

Running man kan altijd! Ook tijdens #VVAL2021 @VriendvanAmstel #RunningMan #VVALS

Reply on Twitter 1350537030879608833Retweet on Twitter 13505370308796088332Like on Twitter 135053703087960883326Twitter 1350537030879608833
Retweet on TwitterJeroen Buren Retweeted
PowerCLIVMware PowerCLI@PowerCLI·
11 Jan

Do check out the SRS roadmap here. Feel free to influence the roadmap by submitting your requests. https://github.com/vmware/script-runtime-service-for-vsphere/projects/2 https://twitter.com/PowerCLI/status/1337370157551796225

VMware PowerCLI@PowerCLI

Introduction to Script Runtime Service (SRS) for vSphere https://blogs.vmware.com/PowerCLI/2020/12/introduction-to-script-runtime-service-srs-for-vsphere.html

Reply on Twitter 1348606798492618752Retweet on Twitter 13486067984926187524Like on Twitter 13486067984926187528Twitter 1348606798492618752
jeroen_burenJeroen Buren@jeroen_buren·
7 Jan

New blogpost about Script Runtime Service for vSphere.
https://configmgr.nl/2021/01/07/testing-script-runtime-service-for-vsphere-part-1/

#VMware #vSphere #SRS #PowerCLI

Reply on Twitter 1347191971002118144Retweet on Twitter 1347191971002118144Like on Twitter 1347191971002118144Twitter 1347191971002118144
Load More...
Proudly powered by WordPress | Theme: Doo by ThemeVS.