Data Backup and Recovery

How to get the datastores (vSphere) / volumes (ONTAP) of VMs protected by SC Server using Cmdlet CLI

benaph
412 Views

Hi,

 

We need to get the datastores (vSphere) / volumes (ONTAP) of VMs protected by SnapCenter Server using Cmdlet CLI. A RESP API alternative is OK.

 

Context

For this scenario all the VMs has SCO (Oracle database) plugin for Linux installed and are VMDK-based. We have SCV for integration between SC Server and vSphere. We are using SC 4.4P2 + SCV 4.4P1.

 

Thank you in advance.

 

Best regards,

Ben

5 REPLIES 5

benaph
411 Views

Context (cont.)

We also have another SC Server used to protect HANA databases in NFS-based VMs. In those cases we simply use Get-SmResources -PluginCode $plugin -HostName $host -ListStorageFootprint to retrieve the required information.

aladd
344 Views

benaph
323 Views

Hi, @aladd ,

 

I really appreciate your response. Unfortunately I could not find a single operation of the SCV REST API that returns the information I require: the names of the datastores / volumes of a VM at the time of the query. Maybe I couldn't identify it, would you please be so kind as to point me to the operation that returns this information?

 

Thank you very much.

 

Best regards,

Ben

benaph
292 Views

Hi,

 

In other words, we need somethig equivalent to Get-SmResources -PluginCode 'HANA' -HostName $hostname -ListStorageFootprint for ORACLE databases on VMDK file systems. It seems -ListStorageFootprint parameter is not supported on that environment.

 

Any suggestion?

 

Best regards,

Ben

benaph
288 Views

Hi,

 

I hope this examples help to explain what I mean.

 

# ----------------------------------------------------------------------------------------------------------------------
# HOST-LINUX-ORACLE-VMDK - NOT OK
# ----------------------------------------------------------------------------------------------------------------------

scmgr@SCS-VMDK ~ PS > $scURL = 'https://SCS-VMDK:8146/'
$scCredential = Get-Credential -Message 'Enter SnapCenter credential'
Open-SmConnection -Credential $scCredential -SMSbaseUrl $scURL -RoleName 'SnapCenterAdmin'


scmgr@SCS-VMDK ~ PS > $hostname = 'HOST-LINUX-ORACLE-VMDK'

# ----------------------------------------------------------------------------------------------------------------------
# Calls to `Get-SmResources` with `ListStorageFootprint` parameter fail.
# ----------------------------------------------------------------------------------------------------------------------

scmgr@SCS-VMDK ~ PS > $scResources = Get-SmResources -PluginCode 'SCO' -HostName $hostname -UseKnownResources -ListStorageFootprint
Get-SmResources : A parameter cannot be found that matches parameter name 'ListStorageFootprint'.
At line:1 char:89
+ ... de 'SCO' -HostName $hostname -UseKnownResources -ListStorageFootprint
+                                                     ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-SmResources], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,SmPSSnapin.PsGetSmResources
 

# ----------------------------------------------------------------------------------------------------------------------
# SnapCenter versions
# ----------------------------------------------------------------------------------------------------------------------

scmgr@SCS-VMDK ~ PS > Get-SmServerConfig
Standalone Server Configuration
SnapCenter Server Version : 4.4.0.5343

scmgr@SCS-VMDK ~ PS > Get-Module -Name SnapCenter

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   1.0        SnapCenter                          {Add-SmCloneDataSet, Add-SmCloneJob, Add-SmConfigurationCheckSchedule, Add-SmCredential...}



scmgr@SCS-VMDK ~ PS > Get-SmPluginConfiguration -PluginCode 'SCO' -HostName $hostname


Auth                      : SMCoreContracts.SmAuth
DateCreated               : 11/15/2020 10:58:06 AM
DateModified              : 7/8/2022 4:20:09 PM
Description               : SnapCenter Plug-in for Oracle Database
DisplayName               : 
EndpointURI               : https://HOST-LINUX-ORACLE-VMDK:8145/SMCorePlugin_SCO
GUID                      : 
HostMaintenanceStatus     : Production
HostName                  : HOST-LINUX-ORACLE-VMDK
InstallPath               : /opt/NetApp/snapcenter/spl/plugins/sco
LicenseKey                : 
LicenseType               : None
Message                   : 
PluginCode                : SCO
PluginCompatibilityStatus : None
PluginConfiguration       : SMCoreContracts.SmConfiguration
PluginInfoId              : 53
PluginInstallStatus       : ePluginStatusInstalled
PluginName                : SnapCenter Plug-in for Oracle Database
PluginServiceAction       : None
PluginVersion             : 4.4.0.5343
Port                      : 8145
ReleaseVersion            : 
Resources                 : {}
ServiceName               : SnapCenter Plug-in Loader
ServiceStatus             : Unavailable
TCPPort                   : 0
VendorName                : NetApp




scmgr@SCS-VMDK ~ PS > Get-SmPluginConfiguration -PluginCode 'SCU' -HostName $hostname


Auth                      : SMCoreContracts.SmAuth
DateCreated               : 11/15/2020 10:58:06 AM
DateModified              : 7/8/2022 4:31:09 PM
Description               : 
DisplayName               : 
EndpointURI               : https://HOST-LINUX-ORACLE-VMDK:8145/SMCorePlugin_SCU
GUID                      : 
HostMaintenanceStatus     : Production
HostName                  : HOST-LINUX-ORACLE-VMDK
InstallPath               : /opt/NetApp/snapcenter/spl/plugins/scu
LicenseKey                : 
LicenseType               : None
Message                   : 
PluginCode                : SCU
PluginCompatibilityStatus : None
PluginConfiguration       : SMCoreContracts.SmConfiguration
PluginInfoId              : 51
PluginInstallStatus       : ePluginStatusInstalled
PluginName                : SnapCenter Plug-in for UNIX
PluginServiceAction       : None
PluginVersion             : 4.4.0.5343
Port                      : 8145
ReleaseVersion            : 
Resources                 : {}
ServiceName               : SnapCenter Plug-in Loader
ServiceStatus             : Unavailable
TCPPort                   : 0
VendorName                : NetApp




scmgr@SCS-VMDK ~ PS > Get-SmPluginConfiguration -PluginCode 'SCV' -HostName 'SCV-APPLIANCE'


Auth                      : SMCoreContracts.SmAuth
DateCreated               : 5/29/2020 9:42:49 PM
DateModified              : 7/8/2022 4:31:06 PM
Description               : 
DisplayName               : 
EndpointURI               : https://SCV-APPLIANCE:8144/scbr/smcoreplugin
GUID                      : 
HostMaintenanceStatus     : Production
HostName                  : SCV-APPLIANCE
InstallPath               : 
LicenseKey                : 
LicenseType               : None
Message                   : 
PluginCode                : SCV
PluginCompatibilityStatus : None
PluginConfiguration       : SMCoreContracts.SmConfiguration
PluginInfoId              : 4
PluginInstallStatus       : ePluginInstallStatusUnknown
PluginName                : SnapCenter Plug-in for VMware vSphere
PluginServiceAction       : None
PluginVersion             : 4.4.0
Port                      : 8144
ReleaseVersion            : 4.4
Resources                 : {}
ServiceName               : SnapCenter Plugin for VMware
ServiceStatus             : Unavailable
TCPPort                   : 0
VendorName                : NetApp




scmgr@SCS-VMDK ~ PS >

# ----------------------------------------------------------------------------------------------------------------------
# HOST-LINUX-HANA-NFS - OK
# ----------------------------------------------------------------------------------------------------------------------

scmgr@SCS-NFS ~ PS > $scURL = 'https://SCS-NFS:8146/'
$scCredential = Get-Credential -Message 'Enter SnapCenter credential'
Open-SmConnection -Credential $scCredential -SMSbaseUrl $scURL -RoleName 'SnapCenterAdmin'


scmgr@SCS-NFS ~ PS > $hostname = 'HOST-LINUX-HANA-NFS'

# ----------------------------------------------------------------------------------------------------------------------
# Calls to `Get-SmResources` with `ListStorageFootprint` parameter successful.
# ----------------------------------------------------------------------------------------------------------------------

scmgr@SCS-NFS ~ PS > $scResources = Get-SmResources -PluginCode 'HANA' -HostName $hostname -UseKnownResources -ListStorageFootprint

scmgr@SCS-NFS ~ PS > $scStorageFootprint = (($scResources.StorageFootPrint -join "`n") -split "`n") |
        Select-String -Pattern 'StorageResource : ([A-Za-z0-9_]+):/(vol/)?([A-Za-z0-9_]+)' |
        Select-Object -Unique |
        ForEach-Object -Process {
            [PsCustomObject]@{
                Vserver = $PSItem.Matches.Groups[1]
                Volume = $PSItem.Matches.Groups[3]
            }
        }

scmgr@SCS-NFS ~ PS > $scStorageFootprint

Vserver       Volume
-------       ------
cluster1svm12 hana_sid_vol1
cluster1svm12 hana_sid_vol2
cluster1svm12 hana_sid_vol3
cluster1svm12 hana_sid_vol4



# ----------------------------------------------------------------------------------------------------------------------
# SnapCenter versions
# ----------------------------------------------------------------------------------------------------------------------

scmgr@SCS-NFS ~ PS > Get-SmServerConfig
Standalone Server Configuration
SnapCenter Server Version : 4.4.0.5343

scmgr@SCS-NFS ~ PS > Get-Module -Name SnapCenter

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   1.0        SnapCenter                          {Add-SmCloneDataSet, Add-SmCloneJob, Add-SmConfigurationCheckSchedule, Add-SmCredential...}



scmgr@SCS-NFS ~ PS > Get-SmPluginConfiguration -PluginCode 'HANA' -HostName $hostname


Auth                      : SMCoreContracts.SmAuth
DateCreated               : 4/19/2021 3:23:10 PM
DateModified              : 7/8/2022 4:25:31 PM
Description               : hana
DisplayName               : SnapCenter Plug-in for SAP HANA
EndpointURI               : https://HOST-LINUX-HANA-NFS:9090/
GUID                      : 
HostMaintenanceStatus     : Production
HostName                  : HOST-LINUX-HANA-NFS
InstallPath               : /opt/NetApp/snapcenter/scc
LicenseKey                : 
LicenseType               : None
Message                   : 
PluginCode                : hana
PluginCompatibilityStatus : None
PluginConfiguration       : SMCoreContracts.SmConfiguration
PluginInfoId              : 104
PluginInstallStatus       : ePluginStatusInstalled
PluginName                : hana
PluginServiceAction       : None
PluginVersion             : 3.0
Port                      : 8145
ReleaseVersion            : 
Resources                 : {}
ServiceName               : SnapCenter Plug-in Creator
ServiceStatus             : Unavailable
TCPPort                   : 0
VendorName                : NetApp




scmgr@SCS-NFS ~ PS > Get-SmPluginConfiguration -PluginCode 'SCU' -HostName $hostname


Auth                      : SMCoreContracts.SmAuth
DateCreated               : 4/19/2021 3:23:10 PM
DateModified              : 7/8/2022 4:25:31 PM
Description               : 
DisplayName               : 
EndpointURI               : https://HOST-LINUX-HANA-NFS:8145/SMCorePlugin_SCU
GUID                      : 
HostMaintenanceStatus     : Production
HostName                  : HOST-LINUX-HANA-NFS
InstallPath               : /opt/NetApp/snapcenter/spl/plugins/scu
LicenseKey                : 
LicenseType               : None
Message                   : 
PluginCode                : SCU
PluginCompatibilityStatus : None
PluginConfiguration       : SMCoreContracts.SmConfiguration
PluginInfoId              : 102
PluginInstallStatus       : ePluginStatusInstalled
PluginName                : SnapCenter Plug-in for UNIX
PluginServiceAction       : None
PluginVersion             : 4.4.0.5343
Port                      : 8145
ReleaseVersion            : 
Resources                 : {}
ServiceName               : SnapCenter Plug-in Loader
ServiceStatus             : Unavailable
TCPPort                   : 0
VendorName                : NetApp




scmgr@SCS-NFS ~ PS > 

# ----------------------------------------------------------------------------------------------------------------------
 
Public