Is there any way I can copy the set of files from my GitHub Repo/Azure Blob Storage to Azure VMSS (Windows Server) using GitHub actions and then restart all the instances? should I use a custom extension script to copy the files? are there any other methods to copy? Please Note: on my vmss server autoscaling is enabled.
Thank you
Hussain.
It seems you want to copy the files from your GitHub Repo/Azure Blob Storage to Azure VMSS and the VMSS is configured with autoscaling, which means you want the copy files in all the instances, including the autoscaling instances.
If I'm right, then manually copy files is not the right way. You should know all the instances of the VMSS are created from the configuration that you set in the creation time. If you just copy files to the existing instances, then when it auto-scales, the new instances will not have the copy files. There are two ways for you.
One is that you can create a custom VM image and copy files in that image. Then use this VM image to create your VMSS.
Another one is that if you use the Azure File Share, you can mount the file share to the VMSS, then all the files in the file share will exist in all the instances of the VMSS. Here is an example.
Related
in addition to my question Code sync from Azure Scale Set VM To Azure Storage is there any way to copy files from one of the particular Scale Set VM to Azure File share(Azure Storage) through ADO Pipelines ? since its scale Set server i cant push every time from one VM. Eg: In pool there will be 100 VMSS servers ,when i try to push code through pipeline it should pick up one server from pool and from that need to push code !!! does it possible ?
No, we do not have this kind of build-in task. We have a Azure File Copy task which use it copy application files and other artifacts to Microsoft Azure storage blobs or virtual machines (VMs).
When the target is Azure VMs, the files are first copied to an
automatically generated Azure blob container and then downloaded into
the VMs. The container is deleted after the files have been
successfully copied to the VMs.
As a workaround, please use a custom script to copy files to Azure File Storage. In other words, if you are able to do the same thing locally. You should also be able to achieve it through Azure DevOps pipeline.
You may have to built your own extension or use scripts in pipeline. Take a look at this similar 3rd-party task-- AzureDevOpsReleaseToFileStorage
I have an Azure VM with un-managed disk. I want to move it to another region.
Is there any other way than generalizing my current VM?
Is there any other way than generalizing my current VM?
Azure does not support changing a VM's location. You need copy the VM's VHD to another location and use that VHD to create a new VM.
If you don't use current VM's VHD to create multiple VMs in other location, you don't need generalize your VM. Please refer to following steps.
Stop your VM.
Create a new storage account and blob container in another location.
Copy VHD to the new storage account, you could use Azcopy. For more information about Azcopy please refer to this article.
AzCopy /Source:https://shuidisks446.blob.core.windows.net/vhds /Dest:https://shuidiag102.blob.core.windows.net/vhds /SourceKey:sGqtdFHQWQWYyf2tRWGF5jkeAEubTp13AVaeTM25QogxXE+K0Ezq1ulcs18qGVPhCEp6ULdLLbKVa7fMbUvYZg== /DestKey:iCjeS+eegjkSJXHjH2UqCkqXnUPiCGvxaOG0Ad2LoPgUnvBoWl9wQJtC1jc//lOj4CF7khpLQe791P4QeyTY6Q== /Pattern:shui20161222141315.vhd
Use the VHD to create a new VM. It is easy for you to recreate with existing VHD by using this template.
Important: Because you don't generalize your currently VM, please don't start two VM at the same time. The second would have the same network issue.
Yes, even though the VM is generalized if you restore from backup the working state will get restored
Plan your VM backup infrastructure in Azure
https://learn.microsoft.com/en-us/azure/backup/backup-azure-vms-introduction
Back up Azure virtual machines to a Recovery Services vault
https://learn.microsoft.com/en-us/azure/backup/backup-azure-arm-vms
Use Azure portal to restore virtual machines
https://learn.microsoft.com/en-us/azure/backup/backup-azure-arm-restore-vms
Azure Site Recovery now offers migration capability between some regions. See this link for details.
https://learn.microsoft.com/en-us/azure/site-recovery/azure-to-azure-tutorial-migrate
Notably, you can only move between supported regions as shown here - basically the same continent.
https://learn.microsoft.com/en-us/azure/site-recovery/azure-to-azure-support-matrix#region-support
I am assigned to create an on-premise data gateway on a virtual machine in Azure. This way, I am able to watch new files created in a specific folder and trigger a logic app flow for every newly created file.
As the name says 'on-premise' I feel like there must be a better option.
Is there any trigger that is able to watch a certain folder on a VHD disk in a storage account?
Is there any trigger that is able to watch a certain folder on a VHD
disk in a storage account?
If my understanding is right, you want to watch files on a Azure storage account VHD. Currently, it is not possible. You need use the VHD to create a new VM or mount the VHD on a VM, then you could see the file in VHD.
Because Azure has no native FTP capabilities, I created a small VM where clients can drop files. I have a separate webjob that will process those files but I can't figure out how to get access to the files from the webjob. I first created a blob thinking i could attach it to the VM but that doesn't seem to be possible. How is this done?
You can't access the C drive of another VM directly. Maybe you should use Azure files which is SMB file shares? No need for FTP. You can access that share from anywhere and it should be quite easy to use.
For small temporary the cost should be near zero.
I have an azure virtual machine which has some application specific CSV files(retrieved via ftp from on-premise) that needs to be stored into a blob (and eventually will be read and pushed into a Azure SQL DB via a worker role). Question is around pushing the files from VM to blob. Is it possible to get AzCopy without installing the SDK to have the files copied to the blob? Is there a better solution than this? Please read the points below for further information
Points to note:
1) Though files could be directly uploaded to a blob rather than getting them into the VM first and copying from there, for security reasons the files will have to be pulled into the VM and this cannot be changed.
2) I also thought about a worker role talking to a VM folder share (via common virtual network) to pull the files and upload to the blob, but this does not appear to be a right solution after reading some blogs - as it requires changes to both VMs (worker role VM and the Iaas VM).
3) Azure File Service is still in preview (?) and hence cannot be used.
Is it possible to get AzCopy without installing the SDK to have the
files copied to the blob?
Absolutely yes. You can directly download AzCopy binaries without installing SDK using the following links:
Version 3.1.0: http://aka.ms/downloadazcopy
Version 4.1.0: http://aka.ms/downloadazcopypr
Source: http://blogs.msdn.com/b/windowsazurestorage/archive/2015/01/13/azcopy-introducing-synchronous-copy-and-customized-content-type.aspx