Share via


Moving files between Azure VMs

Question

Saturday, April 15, 2017 5:45 AM

Hi

Can someone explain me the difference between the below two options 

  1. Ctrl+C in VM1 and Ctrl+V in VM2 (downloads folder) - I dont specify details of my subscription, destination type etc. but it still works
  2. Azure File copy task in VSTS

I realized that I have to use Azcopy but like to understand why it is required especially when manual copy/paste works between VMs. 

Additionally, copy/paste doesn't work if I paste in any folder other than "Downloads" in the destination VM. could some explain or give me a link explaining these concepts?

Thanks

Jag

Kind Regards, Jag

All replies (3)

Saturday, April 15, 2017 6:04 PM

Ctrl+C and Ctrl+V works to copy data between one machine to another, however AzCopy is used if customer wants to move data between storage accounts or download from Azure storage to On-premises or upload data from On-premises to Azure Storage. AzCopy usage is explained in detail in the below link:

https://docs.microsoft.com/en-us/azure/storage/storage-use-azcopy

In regards to the Azure File copy task in VSTS, it is used to copy application files and other artifacts that are required to install the application on Azure VMs like PowerShell scripts, PowerShell-DSC modules etc. The task provides the ability to copy files to an Azure blob or directly to Azure VMs. The tasks uses AzCopy, the command-line utility built for fast copying of data from and into Azure storage accounts.

VSTS task is an automated way of initiating copy operation between volumes. And between volumes customer need not specify storage account or subscription details as long as the VMs are accessible in network. Storage account details are required, in case there is a copy operation from storage account.

I did a repro and found that I was able to copy from one VM and paste into any folder in the destination VM without any issues. Hence, check again in another session and let me know if the issue persists.

Sapna G


Thursday, April 20, 2017 4:21 AM

Thanks for the detailed explanation.

Does this mean that I should be able to copy files from 1 Azure vm to another azure VM using vsts task"Windows machine file copy"? I was able to copy files if the source and target machines are same (done for testing) but getting below error when I tried to copy to another VM

System.Management.Automation.RuntimeException: Copying failed for resource : ***-builddev.westeurope.cloudapp.azure.com

Failed to connect to the path \***-builddev.westeurope.cloudapp.azure.com with the user builtin\axlocaladmin for copying.
2017-04-12T14:05:10.2101613Z     System error 53 has occurred. 
2017-04-12T14:05:10.2101613Z The network path was not found

My environments are ARM. Each environment has 3 VMs. We access each VM using RDP downloaded from LCS. The machine name I used in VSTS task was taken from the RDP file->General tab ->Logon settings section ->computer. I included port as well in the machine name and given user is admin on the target machine. In "My computer' properties, machine name is shown as ***-SB4-AOS-1 without "builddev.westeurope.cloudapp.azure.com". Please let me know which name should I be using in vsts task. 

Note: These VMs are managed by Microsoft and hence they refused to share subscription details with us.

Kind Regards, Jag


Thursday, April 20, 2017 10:52 AM

I suggest you to check the below link in order to get details about Azure File Copy Task in VSTS.

https://github.com/Microsoft/vsts-tasks/tree/master/Tasks/AzureFileCopy

Sapna G