Is there a quick way to import all the VMs on a datastore into a vCenter? Some sort of browse for VMX files and import?
More to the point. I have single Datastore that has been moved to a new location with about 100 VMs on it. I want to import all the VMs on this single datastore to a single host at the new location.
Thanks,
Boston Tech Guy
You can specify the name of that 1 datastore in the $Datastores variable.
And if you change this line
$ESXHost
= Get
-Cluster
$Cluster
| Get
-VMHost
|
select
-First
1
into
$ESXHost
=
Get
-VMHost -Name MyEsx
it should do the trick.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Have you checked my VMX Raiders Revisited post ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I have, different versions of it as well. It keeps choking on a few points. The trick is I want to import all the VMs (about 100) from one datastore to one host. The Host has several datastores attached to it, I dont want to search them all. Also the other hosts in the cluster are not ready to have this datastore added to it. (Politics is the reason, not technology).
Thanks
You can specify the name of that 1 datastore in the $Datastores variable.
And if you change this line
$ESXHost
= Get
-Cluster
$Cluster
| Get
-VMHost
|
select
-First
1
into
$ESXHost
=
Get
-VMHost -Name MyEsx
it should do the trick.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
The changes I made we not exactly like above, but logically I thought they were. I am going to go ahead and do the exact changes you have listed.
Thanks
Luc, that was it. I was so close with the changes on my own. Only one line was off with my changes... I made the same mistake I did before.
For $ESXHost I had this line.
$ESXHost = "name of ESX Host"
Which doesnt mean anything for the script. Uggg need to remember that.
Thanks!
Boston Tech Guy