vmware / powershell-module-for-vmware-cloud-foundation-power-management

PowerShell Module for VMware Cloud Foundation Power Management
https://vmware.github.io/powershell-module-for-vmware-cloud-foundation-power-management/
BSD 2-Clause "Simplified" License
10 stars 8 forks source link

`PowerManagement-ManagementDomain.ps1` fails if the SDDC Manager's IP address is provided instead of the FQDN #45

Closed garlicNova closed 9 months ago

garlicNova commented 1 year ago

Code of Conduct

VMware Cloud Foundation

v4.5

PowerShell Version

Windows Powershell 5.1

PowerCLI Version

v13.0

Module Version

v1.1.0

PowerVCF Version

v2.2.0

Guest Operating System

Windows Server 2019

Environment Details

No response

Description

When IP address of the SDDC Manager is provided for the management domain shutdown workflow, the script detects sfo-vcf01 as a "non-VCF" management virtual machine.

Error or Debug Output

When IP address of the SDDC Manager is provided for the management domain shutdown workflow, the script detects sfo-vcf01 as a "non-VCF" management virtual machine.

Log:

[11-26-2022_07:45:41] INFO Management virtual machines covered by the script: '172; sfo-m01-vc01; sfo-m01-nsx01a; sfo-m01-nsx01b; sfo-m01-nsx01c; sfo-m01-en02; sfo-m01-en01; vCLS-6251915b-41c5-416b-aff4-72272a75c124; vCLS-5e399bf4-6c60-4fd4-915b-ad9f84e148a7; vCLS-5c7089ad-058d-4067-93c5-79bbf59cc3cf' .
[11-26-2022_07:45:41] INFO Virtual machines not covered by the script: 'sfo-vcf01' . Those VMs will be stopped in a random order if the 'shutdownCustomerVm' flag is passed.
[11-26-2022_07:45:41] WARNING Some VMs are still in powered-on state. -shutdownCustomerVm is not passed to the script.
[11-26-2022_07:45:41] WARNING Hence not shutting down management VMs not managed by SDDC Manager: sfo-vcf01 .
[11-26-2022_07:45:41] ERROR The script cannot proceed unless these VMs are shut down manually or the -shutdownCustomerVm option is present.  Take the necessary action and run the script again.
[11-26-2022_07:45:41]   ERROR at Script Line 437
[11-26-2022_07:45:41]   Relevant Command: Write-PowerManagementLogMessage -Type ERROR -Message "The script cannot proceed unless these VMs are shut down manually or the -shutdownCustomerVm option is present.  Take the necessary action and run the script again." -Colour Red
[11-26-2022_07:45:41]   ERROR Message: The script cannot proceed unless these VMs are shut down manually or the -shutdownCustomerVm option is present.  Take the necessary action and run the script again.

Expected Behavior

Script completes successfully and the management domain is shut down.

Actual Behavior

Script fails stating not all virtual machines are powered off.

Steps to Reproduce

Pass the SDDC Manager's IP address instead of the FQDN.

PowerManagement-ManagementDomain.ps1  -server 172.19.11.59 -user administrator@vsphere.local -pass *******  -shutdown -shutdownCustomerVm

Log Fragments and Files

No response

Screenshots

No response

References

No response

github-actions[bot] commented 1 year ago

'Marking this issue as stale due to inactivity. This helps us focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!'

github-actions[bot] commented 11 months ago

'Marking this issue as stale due to inactivity. This helps us focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!'

github-actions[bot] commented 9 months ago

'Marking this issue as stale due to inactivity. This helps us focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!'

burnsjared0415 commented 9 months ago

will pick up

github-actions[bot] commented 8 months ago

I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.