gpt4 book ai didi

azure - 如何在不明确指定版本的情况下将 Azure 角色切换到 Windows Server 2008 R2?

转载 作者:行者123 更新时间:2023-12-03 05:10:15 25 4
gpt4 key购买 nike

Azure service configuration有两个参数 - osFamily 和 osVersion。 osFamily 可以是 1 表示 Windows Server 2008(默认),也可以是 2 表示 Windows Server 2008 R2。默认情况下,osVersion*,意思是“无论如何,这取决于 Azure 基础设施”。

现在我想从默认值切换到 R2。我打开配置文件并添加了 osFamily="2",现在当我尝试部署服务时,出现以下错误消息:

Invalid .cscfg file. If the osFamily attribute is set in the .cscfg file, you also need to set the osVersion attribute. The osVersion attribute can either be '*' for automatic operating system upgrades, or the name of a specific operating system version.

这在某种程度上意味着我现在必须指定确切的操作系统版本。

我不想指定确切的版本,我宁愿“无论如何,这取决于 Azure,就让它成为某个 Windows Server 2008 R2”。

如何在不明确指定确切操作系统版本的情况下切换到 Windows 2008 R2?

最佳答案

如果我正确地阅读了您的问题,您的 .cscfg 文件中有一行看起来像这样

<ServiceConfiguration serviceName="MyService" osFamily="2" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration">

根据错误消息告诉您的内容,虽然 osVersion 可能默认为 *,但如果您指定 osFamily,则还必须指定osVersion。在您的情况下,您想要添加该属性并将其设置为 * ,如下所示。

<ServiceConfiguration serviceName="MyService" osFamily="2" osVersion="*" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration">

关于azure - 如何在不明确指定版本的情况下将 Azure 角色切换到 Windows Server 2008 R2?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11775587/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com