VMware Cloud Community
CarlosFernande1
Contributor
Contributor
Jump to solution

Non-disruptive VM datastore migration

Hi all,

I have a vCenter with several hundred VMs. They are stored in 4 different NFS datastores. Is there any way to non-disruptively move them (1 after the other, and 1 at a time) from their current datastore to the newly created one by command-line?

Thank you.

Carlos Fernandez San Millan Twitter: @Cormite
1 Solution

Accepted Solutions
CarlosFernande1
Contributor
Contributor
Jump to solution

Hi mofr,

thanks to your tip, I did some extra search and found the solution to my problem. In order to limit vCenter to do one (and just one) live datastore migration at a time you should configure vpxd.cfg in your vCenter machine and add the following under <vpxd></vpxd>:

<ResourceManager>

      <maxCostPerDatastore>2</maxCostPerDatastore>

      <maxCostPerEsx41Ds>16</maxCostPerEsx41Ds>

      <maxCostPerHost>4</maxCostPerHost>

</ResourceManager>

I hope this helps others as well.

Thank you again.

Carlos Fernandez San Millan Twitter: @Cormite

View solution in original post

0 Kudos
8 Replies
vmroyale
Immortal
Immortal
Jump to solution

Hello and welcome to the communities.

Note: Discussion successfully moved from VMware Storage to Automation Tools

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
0 Kudos
CarlosFernande1
Contributor
Contributor
Jump to solution

Thank you very much.

I have been a user for some years already, but not very active no be honest... I will try change that Smiley Wink

Carlos Fernandez San Millan Twitter: @Cormite
0 Kudos
mofr
Enthusiast
Enthusiast
Jump to solution

if i understood you correctly you need to move existing VMs from current NFS datastore to another NFS datastore without VMs downtime. if so you can do it using Storage vMotion and change VMs datastores as you want.

VMware vSphere 5.1

---------------------------------------------------------- MCITP: Enterprise Messaging Administrator MCSE: Messaging VCP4 Blog: http://vforv.me/ Twitter: @sgaldava
0 Kudos
CarlosFernande1
Contributor
Contributor
Jump to solution

Hi mofr.

Thank you for your answer. However, if I do it this way, taking under consideration that we are taking about hundreds of VMs and that I have to do it one at a time, and also that this is a manual solution since you have to click on migrate and select the new datasotre... imagine. It is a tedious and time consuming task. I am actually looking for a command line solution so I can actually script it and send the commands to the ESXi hosts or vCenter to make it an automatic task.

I hope to have explained better the situation and the solution I am looking for.

Thank you very much.

Carlos Fernandez San Millan Twitter: @Cormite
0 Kudos
mofr
Enthusiast
Enthusiast
Jump to solution

PowerCLI will help to achive your goal. http://www.virtu-al.net/2011/09/14/quick-and-simple-storage-vmotion-scripts/

also u can limit number of simultaneous svmotion http://niktips.wordpress.com/2013/06/06/limiting-the-number-of-concurrent-storage-vmotions/

---------------------------------------------------------- MCITP: Enterprise Messaging Administrator MCSE: Messaging VCP4 Blog: http://vforv.me/ Twitter: @sgaldava
CarlosFernande1
Contributor
Contributor
Jump to solution

Hi mofr,

this is actually very helpful. I am not skilled on PowerCLI but I will give it a try. Thank you very much.

Carlos Fernandez San Millan Twitter: @Cormite
0 Kudos
CarlosFernande1
Contributor
Contributor
Jump to solution

Hi mofr,

thanks to your tip, I did some extra search and found the solution to my problem. In order to limit vCenter to do one (and just one) live datastore migration at a time you should configure vpxd.cfg in your vCenter machine and add the following under <vpxd></vpxd>:

<ResourceManager>

      <maxCostPerDatastore>2</maxCostPerDatastore>

      <maxCostPerEsx41Ds>16</maxCostPerEsx41Ds>

      <maxCostPerHost>4</maxCostPerHost>

</ResourceManager>

I hope this helps others as well.

Thank you again.

Carlos Fernandez San Millan Twitter: @Cormite
0 Kudos
vMariaL
Enthusiast
Enthusiast
Jump to solution

CarlosFernandezSanMillan wrote:

Hi all,

I have a vCenter with several hundred VMs. They are stored in 4 different NFS datastores. Is there any way to non-disruptively move them (1 after the other, and 1 at a time) from their current datastore to the newly created one by command-line?

Thank you.

Quick Migration might be another option. It's a feature of Veeam Backup Free Edition. You can find more info about it here: http://www.veeam.com/virtual-machine-backup-solution-free.html#migration

----

Veeam Community Manager

---- Veeam Community Manager
0 Kudos