Code: Select all
param($addr="10.0.0.250", $port=3261, $user="root", $password="starwind",
$fileName="vmware",
$filePath="VSA Storage\mnt\md0\datastore",
$size=13000GB,
$targetAlias="vmwaretarget",
$sectorSize=4096,
$numaNode=0,
$cacheMode="writeback",
$cacheSize=16GB)
Import-Module StarWindX
try
{
Enable-SWXLog -level SW_LOG_LEVEL_DEBUG
if($sectorSize -eq 4096 -and $size -lt 2)
{
throw "Minimal device size 2MB"
}
$server = New-SWServer -host $addr -port $port -user $user -password $password
$server.Connect()
#create image file
New-ImageFile -server $server -path $filePath -fileName $fileName -size $size
#create device
$device = Add-ImageDevice -server $server -path $filePath -fileName $fileName -sectorSize $sectorSize -NumaNode $numaNode -CacheMode $cacheMode -CacheSize $cacheSize
$device
#create target
$target = New-Target -server $server -alias $targetAlias -devices $device.Name
$target
}
catch
{
Write-Host $_ -foreground red
}
finally
{
$server.Disconnect()
}
-
control ImageFile -CreateImage:"VSA Storage\mnt\md0\datastore\vmware.img" -Size:"13958643712000" -Flat:"True" -DeferredInit:"True"
-
200 Failed: There is not enough space on the disk..
But under free capacity:
Mounted
md0
14.16 TB
14.05 TB
Standard
-
/mnt/md0/datastore
Any ideas?