CopyAzVHDFromVMToLab.ps1 - warn that source VM will be stopped for as long as the copy takes

Open Beginner friendly
#911 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
82/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
azure, powershell
Domain
cloud

Research direction

Start with samples/DevTestLabs/Scripts/CopyVirtualMachines/CopyAzVHDFromVMToLab.ps1 and review how the script handles SignatureExpire. Add a comment warning that the source VM remains stopped for the duration of the VHD copy, which may take over an hour for a large disk. Done when users can see this warning before running the script.

Written by the indexing model from the issue text.

Description

This script shuts down the source VM and blocks from restarting, probably for over an hour. Please add a comment to warn users about that.

WRT script:
samples/DevTestLabs/Scripts/CopyVirtualMachines/CopyAzVHDFromVMToLab.ps1

While running it, I found out that the source VM will be stopped by the script for the duration of the script execution.

The main contributor to that time is the copying of the VHD. That took over 1 hour for a 256GB disk. There was little network traffic on my laptop running the script, so I presume the copy was happening in the cloud.

It seems the script effectively locks the source VHD so the source VM cannot be restarted. This is probably controlled by the parameter SignatureExpire which defaults to 3600 (seconds, or 1 hour).

Dominant language
PowerShell
Stars
465
Forks
595
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/azure-devtestlab

All issues in Azure/azure-devtestlab

Similar issues

More Cloud issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.