如何使用 ARM 模板为 Azure 文件同步注册服务器 [英] How to register a server for an Azure file sync using ARM TEMPLATE

查看:20
本文介绍了如何使用 ARM 模板为 Azure 文件同步注册服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下代码行是我尝试过但对我不起作用的 arm 模板部分.

The below lines of code is an arm template section that I tried and didn't work for me.

 {
        "type": "microsoft.storagesync/storageSyncServices/registeredServers",
        "apiVersion": "2020-03-01",
        "name": "[concat(parameters('storagesyncname'), 'xxx')]",
        "dependsOn": [
            "[resourceId('microsoft.storagesync/storageSyncServices', parameters('storagesyncname'))]"
        ],
        "properties": {
            "agentVersion": "11.1.0.0",
            "serverOSVersion": "10.0.17763.0",
            "lastHeartBeat": "2021-02-09T12:36:34.36877Z",
            "serverRole": "Standalone",
            "clusterId": "00000000-0000-0000-0000-000000000000",
            "serverId": "xxxx",
            "friendlyName": "xxx"
        }
    }

推荐答案

AFAIK,不支持使用 ARM 模板注册服务器的方法.如文档,您可以按如下方式注册服务器:

AFAIK, using an ARM template to register a server isn't a supported approach. As mentioned in the docs, you can register a server as follows:

  • 下载 Azure 文件同步代理并将其安装在您要同步的所有服务器上.
  • 完成代理安装后,您可以:
    • 使用打开的服务器注册实用程序将服务器注册到存储同步服务,或

    • Download the Azure File Sync agent and install it on all servers you want to sync.
    • After finishing the agent install, you can either:
      • use the server registration utility that opens to register the server to a Storage Sync Service, or

      使用 Register-AzStorageSyncServer cmdlet 来自 Az.StorageSync 模块将服务器注册到存储同步服务.请注意,此命令必须在您要注册的服务器上运行.

      use the Register-AzStorageSyncServer cmdlet from the Az.StorageSync module to register the server with a Storage Sync service. Note that this command has to be run on the server you want to register.

      Register-AzStorageSyncServer -ResourceGroupName "myResourceGroup" -StorageSyncServiceName "myStorageSyncServiceName"
      

    • 然后您将在输出中获得 ServerId.

      You will then get the ServerId in the output.

      此时,如果您在 Azure 门户中浏览到您的存储同步服务,您应该能够看到您的服务器列在注册服务器边栏选项卡中.然后可以使用 PowerShell 或 Azure 门户在此服务器上配置同步.

      At this point, if you browse to your Storage Sync Service in the Azure portal, you should be able to see your server listed in the Registered servers blade. PowerShell or the Azure portal can then be used to configure sync on this server.

      这篇关于如何使用 ARM 模板为 Azure 文件同步注册服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆