Git Product home page Git Product logo

Comments (7)

mattmcspirit avatar mattmcspirit commented on August 29, 2024

Hey - so in the 'Host Configuration' section, it runs the following:

# Disable Windows Update on infrastructure VMs
Write-CustomVerbose -Message "Disabling Windows Update on Infrastructure VMs and ASDK Host`r`n"
$AZSvms = Get-VM -Name AZS*
$scriptblock = {
     Get-Service -Name wuauserv | Stop-Service -Force -PassThru | Set-Service -StartupType disabled -Confirm:$false
}
foreach ($vm in $AZSvms) {
Invoke-Command -VMName $vm.name -ScriptBlock $scriptblock -Credential $asdkAdminCreds
}

The key here is, the $asdkAdminCreds, which must have been incorrect. These are the creds that you used when you deployed the ASDK host, and should be "AzureStack\AzureStackAdmin" with the accompanying password.

That's the only reason this step would fail.

When you run the script, the -asdkHostPwd 'Passw0rd123!' must have been incorrect.

Thanks!

from azurestack.

caaustin74 avatar caaustin74 commented on August 29, 2024

Yes this is a bit strange. I am logged into the asdk host with azurestack\azurestackadmin so I have the credentials. I used the same credentials variable to login to the PEP:

Enter-PSSession -ComputerName "AzS-ERCS01" -ConfigurationName PrivilegedEndpoint -Credential $asdkad
mincreds
VERBOSE: Loading module from path 'C:\Program
Files\WindowsPowerShell\Modules\PackageManagement\1.0.0.1\PackageManagement.psd1'.
VERBOSE: Importing cmdlet 'Find-Package'.
VERBOSE: Importing cmdlet 'Find-PackageProvider'.
VERBOSE: Importing cmdlet 'Get-Package'.
VERBOSE: Importing cmdlet 'Get-PackageProvider'.
VERBOSE: Importing cmdlet 'Get-PackageSource'.
VERBOSE: Importing cmdlet 'Import-PackageProvider'.
VERBOSE: Importing cmdlet 'Install-Package'.
VERBOSE: Importing cmdlet 'Install-PackageProvider'.
VERBOSE: Importing cmdlet 'Register-PackageSource'.
VERBOSE: Importing cmdlet 'Save-Package'.
VERBOSE: Importing cmdlet 'Set-PackageSource'.
VERBOSE: Importing cmdlet 'Uninstall-Package'.
VERBOSE: Importing cmdlet 'Unregister-PackageSource'.
VERBOSE: Looking up shared vhd product drive letter.
WARNING: Unable to find volume with label Deployment
VERBOSE: Get-Package returned with Success:True
VERBOSE: Found package Microsoft.AzureStack.Solution.Deploy.EnterpriseCloudEngine.Client.Deployment with version
1.2002.0.35 at
C:\NugetStore\Microsoft.AzureStack.Solution.Deploy.EnterpriseCloudEngine.Client.Deployment.1.2002.0.35\Microsoft.AzureS
tack.Solution.Deploy.EnterpriseCloudEngine.Client.Deployment.nuspec.
WARNING: The names of some imported commands from the module 'ECEClient' include unapproved verbs that might make them
less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose
parameter. For a list of approved verbs, type Get-Verb.
[AzS-ERCS01]: PS>

I pipe those same credentials to the commands you listed above and they don't work.

from azurestack.

mattmcspirit avatar mattmcspirit commented on August 29, 2024

So for the PEP, the creds are always azurestack\cloudadmin (for the ASDK).

If you open up Hyper-V Manager, and select one of the VMs, you could be able to connect to it, and try to log in with azurestack\azurestackadmin, and your password. Then you'll know whether the creds are right for the VMs or not. I've not seen an instance where the VM creds are different to that of the ASDK host, so it would be strange.

Also, when calling the script, make sure for the -asdkHostPwd, you're using single quotes 'pass@#$%' rather than double quotes, as that can sometimes cause issues with special escape characters in PowerShell.

from azurestack.

caaustin74 avatar caaustin74 commented on August 29, 2024

Yes I can login to the ECS VM with the same credentials.

from azurestack.

mattmcspirit avatar mattmcspirit commented on August 29, 2024

Right, so in a fresh PS/ISE window, if you run the following:

$asdkTestAdminUsername = "AzureStack\AzureStackAdmin"
$secureTestAsdkHostPwd = Read-Host "Please enter the password used for the ASDK Host Deployment, for account AzureStack\AzureStackAdmin" -AsSecureString -ErrorAction Stop
$asdkTestAdminCreds = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $asdkTestAdminUsername, $secureTestAsdkHostPwd -ErrorAction Stop
                $AZSvms = Get-VM -Name AZS*
                $scriptblock = {
                    Get-Service -Name wuauserv | Stop-Service -Force -PassThru | Set-Service -StartupType disabled -Confirm:$false
                }
                foreach ($vm in $AZSvms) {
                    Invoke-Command -VMName $vm.name -ScriptBlock $scriptblock -Credential $asdkTestAdminCreds
                }

Does this fail? If so, I'm stumped - this is basic PS, unrelated to Azure Stack, and there's no reason why it shouldn't work. I haven't seen any environments where this has happened.

from azurestack.

caaustin74 avatar caaustin74 commented on August 29, 2024

Yes that doesn't work so I think I'm going to re-bake the asdk load. Thank you for your help.

from azurestack.

mattmcspirit avatar mattmcspirit commented on August 29, 2024

Hopefully a redeployment will work fine - seems such a strange error. Let me know if the same happens again and we can always have a screen share session. Thanks!

from azurestack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.