启动和停止 ASDKStart and stop the ASDK

建议不要仅仅重启 ASDK 主计算机。It's not recommended to simply restart the ASDK host computer. 而是应该遵循本文中的过程正确关闭再重启 ASDK 服务。Instead, follow the procedures in this article to properly shut down and restart ASDK services.

停止 Azure StackStop Azure Stack

若要正常关闭 Azure Stack 服务和 ASDK 主机,请使用以下 PowerShell 命令:To properly shut down Azure Stack services, and the ASDK host computer, use the following PowerShell commands:

  1. 以 AzureStack\AzureStackAdmin 身份登录到 ASDK 主机。Log in as AzureStack\AzureStackAdmin on the ASDK host computer.

  2. 以管理员身份打开 PowerShell(非 PowerShell ISE)。Open PowerShell as an admin (not PowerShell ISE).

  3. 运行以下命令建立特权终结点 (PEP) 会话:Run the following commands to establish a privileged endpoint (PEP) session:

    Enter-PSSession -ComputerName AzS-ERCS01 -ConfigurationName PrivilegedEndpoint
    
  4. 接下来,在 PEP 会话中,使用 Stop-AzureStack cmdlet 停止 Azure Stack 服务并关闭 ASDK 主机:Next, in the PEP session, use the Stop-AzureStack cmdlet to stop Azure Stack services and shut down the ASDK host computer:

    Stop-AzureStack
    
  5. 查看 PowerShell 输出,确保在关闭 ASDK 主机之前已正常关闭所有 Azure Stack 服务。Review the PowerShell output to ensure all Azure Stack services are successfully shut down before the ASDK host computer shuts down. 关机过程需要花费几分钟时间。The shutdown process takes several minutes.

启动 Azure StackStart Azure Stack

启动主机时,ASDK 服务应会自动启动。ASDK services should start automatically when the host computer is started. 但是,ASDK 基础结构服务的启动时间根据 ASDK 主计算机硬件配置的性能而异。However, ASDK infrastructure services startup time varies based on the performance of the ASDK host computer's hardware configuration. 在某些情况下,所有服务可能需要花费好几个小时才能成功重启。It can take several hours for all services to successfully restart in some cases.

不管 ASDK 是否已关闭,都应该使用以下步骤来验证打开主机后,所有 Azure Stack 服务是否都已启动并完全正常运行:Regardless of how the ASDK was shut down, you should use the following steps to verify that all Azure Stack services are started and fully operational after the host computer is powered on:

  1. 打开 ASDK 主机。Power on the ASDK host computer.

  2. 以 AzureStack\AzureStackAdmin 身份登录到 ASDK 主机。Log in as AzureStack\AzureStackAdmin on the ASDK host computer.

  3. 以管理员身份打开 PowerShell(非 PowerShell ISE)。Open PowerShell as an admin (not PowerShell ISE).

  4. 运行以下命令建立特权终结点 (PEP) 会话:Run the following commands to establish a privileged endpoint (PEP) session:

    Enter-PSSession -ComputerName AzS-ERCS01 -ConfigurationName PrivilegedEndpoint
    
  5. 接下来,在 PEP 会话中,运行以下命令检查 Azure Stack 服务的启动状态:Next, in the PEP session, run the following commands to check the startup status of Azure Stack services:

    Get-ActionStatus Start-AzureStack
    
  6. 查看输出,确保 Azure Stack 服务已成功重启。Review the output to ensure that Azure Stack services have restarted successfully.

若要详细了解正常关闭和重启 Azure Stack 服务的建议过程,请参阅启动和停止 Azure StackTo learn more about the recommended procedures to properly shut down and restart Azure Stack services, see Start and stop Azure Stack.

排查启动和关机问题Troubleshoot startup and shutdown

如果在启动 ASDK 主计算机后两小时内,Azure Stack 服务没有成功启动,请执行以下步骤:Follow these steps if Azure Stack services don't successfully start within two hours after you power on your ASDK host computer:

  1. 以 AzureStack\AzureStackAdmin 身份登录到 ASDK 主机。Log in as AzureStack\AzureStackAdmin on the ASDK host computer.

  2. 以管理员身份打开 PowerShell(非 PowerShell ISE)。Open PowerShell as an admin (not PowerShell ISE).

  3. 运行以下命令建立特权终结点 (PEP) 会话:Run the following commands to establish a privileged endpoint (PEP) session:

    Enter-PSSession -ComputerName AzS-ERCS01 -ConfigurationName PrivilegedEndpoint
    
  4. 接下来,在 PEP 会话中,运行以下命令检查 Azure Stack 服务的启动状态:Next, in the PEP session, run the following commands to check the startup status of Azure Stack services:

    Test-AzureStack
    
  5. 查看输出并解决所有错误。Review the output and resolve any errors. 有关详细信息,请参阅运行 Azure Stack 的验证测试For more information, see Run a validation test of Azure Stack.

  6. 在 PEP 会话中运行 Start-AzureStack cmdlet,以重启 Azure Stack 服务:Restart Azure Stack services from within the PEP session by running the Start-AzureStack cmdlet:

    Start-AzureStack
    

如果运行 Start-AzureStack 导致失败,请访问 Azure Stack 支持论坛获取 ASDK 故障排除支持。If running Start-AzureStack results in a failure, visit the Azure Stack support forum to get ASDK troubleshooting support.

后续步骤Next steps

若要详细了解 Azure Stack 诊断工具和问题日志记录,请参阅 Azure Stack 诊断工具Learn more about Azure Stack diagnostic tool and issue logging, see Azure Stack diagnostic tools.