Skip to content

Commit 7021819

Browse files
committed
using forcefull flag for settoupgrade
1 parent e026718 commit 7021819

File tree

4 files changed

+9
-95
lines changed

4 files changed

+9
-95
lines changed

Rubrik/Private/Get-RubrikAPIData.ps1

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -711,18 +711,6 @@ function Get-RubrikAPIData {
711711
ObjectTName = 'Rubrik.HyperVVM'
712712
}
713713
}
714-
'Get-RubrikHvmForceFullSpec' = @{
715-
'6.0' = @{
716-
Description = 'Get the ForceFullSpec of a HyperV Virtual Machine.'
717-
URI = '/api/v1/hyperv/vm/{id}/request/force_full_snapshot'
718-
Method = 'Get'
719-
Body = ''
720-
Query = ''
721-
Result = 'data'
722-
Filter = ''
723-
Success = '200'
724-
}
725-
}
726714
'Get-RubrikHvmFormatAutoUpgrade' = @{
727715
'6.0' = @{
728716
Description = 'Retrieve the global HyperV settings for backup format migration.'

Rubrik/Public/Get-RubrikHvmForceFullSpec.ps1

Lines changed: 0 additions & 76 deletions
This file was deleted.

Rubrik/Public/Get-RubrikHvmFormatClusterStorage.ps1

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ function Get-RubrikHvmFormatClusterStorage
3535
Get-RubrikHvmFormatClusterStorage -Hostname 'Server1' -SLA Gold
3636
This will return projected space consumption of migrating all old-format Hyper-V VMs of "Server1" that are protected by the Gold SLA Domain, and cluster free space before and after migration.
3737
38-
.EXAMPLE
39-
Get-RubrikHvmFormatClusterStorage -SetToUpgrade
40-
This will return projected space consumption of migrating all old-format, removed Hyper-V VMs that have been set for a force full upgrade by specifying the forcefullspec.
41-
4238
.EXAMPLE
4339
Get-RubrikHvmFormatClusterStorage -Relic
4440
This will return projected space consumption of migrating all old-format, removed Hyper-V VMs that were formerly protected by Rubrik, and cluster free space before and after migration.
4541
42+
.EXAMPLE
43+
Get-RubrikHvmFormatClusterStorage -SetToUpgrade
44+
This will return projected space consumption of migrating all old-format, removed Hyper-V VMs that have been set for a force full upgrade by specifying the forcefullspec.
45+
4646
.EXAMPLE
4747
Get-RubrikHvmFormatClusterStorage -Id HypervVirtualMachine:::205b0b65-b90c-48c5-9cab-66b95ed18c0f
4848
This will return projected space consumption for the specified HypervVirtualMachine ID, and 0 if this HypervVirtualMachine uses fast VHDX format (no need for migration).
@@ -79,6 +79,7 @@ function Get-RubrikHvmFormatClusterStorage
7979
# Filter the report based on whether a Volume Group is set to take a full snapshot on the next backup.
8080
[Alias('ForceFullSpec')]
8181
[Switch]$SetToUpgrade,
82+
[Switch]$DisplayReport,
8283
# Rubrik server IP or FQDN
8384
[String]$Server = $global:RubrikConnection.server,
8485
# API version
@@ -143,7 +144,6 @@ function Get-RubrikHvmFormatClusterStorage
143144
continue
144145
}
145146
$vmsnapshot = Get-RubrikSnapshot -Latest -id $vm.ID
146-
$spec = Get-RubrikHvmForceFullSpec -id $vm.ID
147147
if (!$vmsnapshot) {
148148
continue
149149
}
@@ -154,7 +154,7 @@ function Get-RubrikHvmFormatClusterStorage
154154
# Add the report only if the HyperV VM did not use fast VHDX format for its latest snapshot
155155
if (-not $hvmformat.usedFastVhdx) {
156156
$hvmformat | Add-Member NoteProperty VmName $vm.name
157-
$hvmformat | Add-Member NoteProperty SetToUpgrade ($null -ne $spec -and $spec.virtualDiskInfos.Count -gt 0)
157+
$hvmformat | Add-Member NoteProperty SetToUpgrade $vmsnapshot.forcefull
158158
foreach ($h in $hostResult) {
159159
$vmHostId = -join ("HypervServer:::", $vm.HostId)
160160
if($h.data.id -eq $vmHostId) {
@@ -166,6 +166,9 @@ function Get-RubrikHvmFormatClusterStorage
166166
$hvmformatreport += @($hvmformat)
167167
}
168168
}
169+
if($DisplayReport -and $hvmformatreport -ne @()) {
170+
Write-Output "Hyper-V Virtual Machines Summary with UsedFastVhfx=false: $hvmformatreport"
171+
}
169172

170173
if ($NamePrefix) {
171174
Write-Verbose "Filtering by Hyper-V Virtual Machine name prefix: $NamePrefix"

Rubrik/Rubrik.psd1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@
141141
'Get-RubrikGuestOSCredential',
142142
'Get-RubrikHost',
143143
'Get-RubrikHostVolume',
144-
'Get-RubrikHvmForceFullSpec',
145144
'Get-RubrikHvmFormatAutoUpgrade',
146145
'Get-RubrikHvmFormatClusterStorage',
147146
'Get-RubrikHvmFormatReport',

0 commit comments

Comments
 (0)