VMware Cloud Community
epytir
Contributor
Contributor
Jump to solution

VM mit mehreren Datastores Migrieren

Hallo Community,

ich möchte unsere Infrastruktur in ein anderen Rechenzentrum migrieren. In dem neuen Rechenzentrum sind die Netzwerkeinstellungen identisch, allerdings gibt es weniger und vor allem anders benannte Datastores.

Wie ich eine Maschine händisch verschiebe und die Datastores anpasse weiß ich allerdings habe ich nur ein kleines Zeitfenster und es geht um einige Maschinen.

Denn Befehl :

Get-VM -Name 'MyVM' -Server 'MyServer' | Move-VM -Destination 'NewHost' -Datastore 'DatastoreOnNewHost' -DiskStorageFormat 'Thin'

habe ich bereits in der Dokumentation gefunden, nur dass ich mehrere Datastores pro VM nach belieben aufteilen möchte.

Wie kann ich unterschiedliche Ziele pro Datastore bzw. pro vmdk festlegen ?  (pro Datastore und pro vmdk ist bei meiner Infrastruktur gleich da jeder Datastore maximal eine vmdk einer vm hat)

Hoffe ihr könnt mir helfen habe schonmal gegoogelt leider ohne Erfolg oder ich habe falsch gesucht ...

Mit freundlichen Grüßen

Epytir

0 Kudos
1 Solution

Accepted Solutions
epytir
Contributor
Contributor
Jump to solution

i solved my Problem. Its so easy and i dont thinked about it :smileygrin:

I migrate the old hosts to the new vcenter so all hosts are in the new center then i add the new datastores to the old hosts then i copy the vm configs and the storages to the new datastores one by one. Finally i delete the old hosts from the center

View solution in original post

0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

0 Kudos
epytir
Contributor
Contributor
Jump to solution

thanks for your answer.

My Problem is that i cant turn off the VMs so i must migrate them in "power on state".

My old Datacenter has 8 Datastores. 1 VM has up to 4 vmdks on 4 Datastores.

My new Datacenter has 4 Datastores in which i need to move the vmdk.

Both have their own vcenter and hosts its a complett new infrastruktur. Only the Networks are the same.

I find a Script on github that maybe solve my Problem powershell-scripts/move-vmadvanced.ps1 at master · cmouse/powershell-scripts · GitHub.

Can i move a VM, change Datastores and dont power off that Maschine ?

0 Kudos
epytir
Contributor
Contributor
Jump to solution

i solved my Problem. Its so easy and i dont thinked about it :smileygrin:

I migrate the old hosts to the new vcenter so all hosts are in the new center then i add the new datastores to the old hosts then i copy the vm configs and the storages to the new datastores one by one. Finally i delete the old hosts from the center

0 Kudos