locked
How do I copy a file of a virtual machine scale set instance to azure blob storage? RRS feed

  • Question

  • Hi All,

    My requirement is to copy a file from a virtual machine scale set instance to azure blob storage before VM instance scale in time.

    Steps followed to create a Virtual machine scale set(VMSS):

    1. Create a VM and deploy an application.

    2. Generate VM image for Step#1. 

    3.  Put the generated VM in the VM scale set.

    My application will create a file in system drive during run time. i want to copy this file from each VM instance to azure blob before VM scale in . If any possible solution is there please let me know. Thanks in Advance.

    Monday, October 7, 2019 7:46 AM

All replies

  • @ReddyAzureDeveloper, There are several workarounds to the scenario you just mentioned, you either use a python script, or PS script to upload the file to Azure blob storage, or use Logic App as an automation, to move the file once it has been created to Azure Blob Storage, you can find more details in the following documentation: https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-using-file-connector 
    Monday, October 7, 2019 6:46 PM
  • Dear Adam Smith,

    Thank you for your quick reply,

    My problem is how to get the VM instance name and also how to access  files which are inside the VM instance in VMSS.

    Is there any possibility is there please let me know, Thanks in Advance.

    Wednesday, October 9, 2019 6:05 AM
  • @ ReddyAzureDeveloper I see there is similar query which you have raised in the MSDN Virtual machine forum. Can you please refer to the suggestion mentioned there. If you still find any difficulties or you need future assistance on this issue. Please feel free to contact us anytime.

    -------------------------------------------------------------------------------------------------------------

    Do click on "Mark as Answer" and Upvote on the post that helps you, this can be beneficial to other community members.

    Friday, October 11, 2019 5:06 AM
  • Is there any update on the issue?

    If the suggested answer helped for your issue, do click on "Mark as Answer" and “Vote as Helpful” on the post that helps you, this can be beneficial to other community members.

    Monday, October 14, 2019 5:09 AM
  • Is there any update on the issue?

    If the suggested answer helped for your issue, do click on "Mark as Answer" and “Vote as Helpful” on the post that helps you, this can be beneficial to other community members.

    Wednesday, October 16, 2019 7:43 AM
  • If possible modify your application to directly write on Azure Blob storage or File share instead of writing on the system drive. Ideally, your scale set VMs should be stateless.

    Thanks


    Rohan Islam | Azure Architect

    Wednesday, October 16, 2019 10:19 AM
  •  Just checking in to see if the above answer helped. If this answers your query, do click “Mark as Answer” and Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.
    Thursday, October 17, 2019 4:54 AM
  • @ReddyAzureDeveloper Following up to see if the above suggestion was helpful. And, if you have any further query do let us know. If the suggested answer helped for your issue, do click on "Mark as Answer" and “Vote as Helpful” on the post that helps you, this can be beneficial to other community members

    Tuesday, October 22, 2019 3:10 AM