Welcome,
Guest.
Please
Login
or
Register
.
News:
Home
Help
Search
Calendar
Register
Login
Vmware Scripting Forum
»
Scripts!
»
Powershell Scripts
»
Datastore/Disk Scripts
»
adding an extent
Pages: [
1
]
« previous
next »
Print
Author
Topic: adding an extent (Read 597 times)
flawless_cowboy
Newbie
Posts: 1
adding an extent
«
on:
March 09, 2009, 02:07:06 AM »
Does anyone know how to add an extent via powershell? I have searched around for a bit but come up empty.
Logged
esarakaitis
Administrator
Full Member
Posts: 241
Re: adding an extent
«
Reply #1 on:
March 10, 2009, 06:58:56 AM »
ill do some digging, but i know of no way to do it as of now
Logged
ewannema
Administrator
Newbie
Posts: 30
Re: adding an extent
«
Reply #2 on:
March 10, 2009, 01:17:31 PM »
In general you would only modify a datastore once and then possibly do a refresh on all of the other hosts. Adding the extent itself through PS might be more work than it is worth because you have to make sure to pick the correct available LUN, etc.
The refresh itself should be easier to script.
If you want to dig into the SDK and to add an extent you may want to look at the ExtendVmfsDatastore method. Here is how you would get to the HostDatastoreSystem object.
$vmhost = Get-VMhost esx
$vmhostview = Get-View $vmhost.ID
$dss = Get-View $vmhostview.ConfigManager.DatastoreSystem
Logged
ewannema
Administrator
Newbie
Posts: 30
Re: adding an extent
«
Reply #3 on:
March 10, 2009, 01:21:34 PM »
I guess I could show the refresh.
$vmhost = Get-VMhost esxhost
$vmhostview = Get-View $vmhost.View
$hss = Get-View $vmhostview.ConfigManager.StorageSystem
$hss.RefreshStorageSystem()
$hss.RescanAllHba() # This is there as well if you want to do that.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Discussion
-----------------------------
=> Suggestion Area
-----------------------------
VMware Scripting!
-----------------------------
=> General Discussion
=> VMware Scripting Links
-----------------------------
Scripts!
-----------------------------
=> Powershell Scripts
===> Guest Scripts
===> Host Scripts
===> Networking Scripts
===> Reporting Scripts
===> Cluster Scripts
===> Datastore/Disk Scripts
=> Orchestrator Workflow's
=> .NET (C#/VB.NET)
=> RCLI
=> Bash Scripts
=> Perl Scripts
=> Vprobes
=> Python
-----------------------------
Scripting Language Resources
-----------------------------
=> Bash
=> PowerShell
=> Python
=> Perl
Loading...