I am trying to use Windows Azure PowerShell to copy a zip file into VM. I have managed to connect to VM following the documentation.
But, I cannot find any tutorial
Here is ano ther approach that I documented here. It involves
Here is an example:
#Create and mount a new local VHD
$volume = new-vhd -Path test.vhd -SizeBytes 50MB | `
Mount-VHD -PassThru | `
Initialize-Disk -PartitionStyle mbr -Confirm:$false -PassThru | `
New-Partition -UseMaximumSize -AssignDriveLetter -MbrType IFS | `
Format-Volume -NewFileSystemLabel "VHD" -Confirm:$false
#Copy my files
Copy-Item C:\dev\boxstarter "$($volume.DriveLetter):\" -Recurse
Dismount-VHD test.vhd
#upload the Vhd to azure
Add-AzureVhd -Destination http://mystorageacct.blob.core.windows.net/vhdstore/test.vhd `
-LocalFilePath test.vhd
#mount the VHD to my VM
Get-AzureVM MyCloudService MyVMName | `
Add-AzureDataDisk -ImportFrom `
-MediaLocation "http://mystorageacct.blob.core.windows.net/vhdstore/test.vhd" `
-DiskLabel "boxstarter" -LUN 0 | `
Update-AzureVM