Skip to content

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

@Mike-Honey

Description

@Mike-Honey

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions