Reputation: 1170
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?
Upvotes: 2
Views: 1526