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

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

问题描述

下面的代码行是我尝试过的手臂模板部分,但对我不起作用.

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模板注册服务器.如 docs ,您可以按以下方式注册服务器:

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 File Sync代理并将其安装在要同步的所有服务器上.
  • 完成代理安装后,您可以:
    • 使用打开的服务器注册实用程序将服务器注册到Storage Sync Service,或者

    • 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.rel ="nofollow noreferrer"> 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门户中浏览到Storage Sync Service,则应该能够在已注册服务器刀片服务器中看到您的服务器.然后可以使用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 TEMPLATE为Azure文件同步注册服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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