Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
837 views
in Technique[技术] by (71.8m points)

Azure DevOps AzureFileCopy@4 task copy files to VM with no Public IP

I have a DevOps pipeline AzureFileCopy@4 task which I need to copy files to a VM. The task setup is straightforward:

    - task: AzureFileCopy@4
      inputs:
        azureSubscription: '<subscription>'
        storage: '<storagename>'
        SourcePath: 'testfile.txt'
        Destination: 'AzureVMs'
        resourceGroup: 'test-rg'
        MachineNames: 'TEST-VM'
        vmsAdminUserName: 'testAdmin'
        vmsAdminPassword: '$(TestAdminPassword)'
        TargetPath: 'c:destination'

The file is uploaded to storage, but the log then shows the following error:

##[error]Unable to get FQDN for all resources in ResourceGroup : 'test-rg'

I assume this is because the VM does not have a Public IP associated with it, as requirements are that this VM not be publicly exposed. I know the fairly obvious answer would seem to be it needs a public IP, but in other steps in this pipeline there are Powershell tasks that are executed on the same VM using az vm run-command and supplying machine name and resource group, just as this step does, so I'm hoping there is a way to still use this.

Is it possible to use AzureFileCopy in DevOps to copy files to a VM without a Public IP?

question from:https://stackoverflow.com/questions/65894403/azure-devops-azurefilecopy4-task-copy-files-to-vm-with-no-public-ip

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

According to this thread: No it is not possible to use Azure file copy without public IP. Public IP address of the VM is must for Azure File Copy task. This is required to establish connection to the machine from Agent.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...