Azure DevTest Labs: Set expiration date for a virtual machine

terça-feira, 2 de agosto de 2016

In Azure DevTest Labs, you can now set an expiration date and time for a virtual machine. The VM will be deleted within 24 hours of the specified date and time. The time is in UTC.

You can do this by using an Azure Resource Manager template—namely, by specifying the expirationDate property for the VM that will be created in the lab. You can check out a sample Resource Manager template in our public GitHub repository. You can also modify any of the existing sample Resource Manager templates for the VM creation (name starting with 101-dtl-create-vm) by specifying the expirationDate property as follows.

"resources": [
    {
      "apiVersion": "2016-05-15",
      "type": "Microsoft.DevTestLab/labs/virtualMachines",
      "name": "[variables('resourceName')]",
      "location": "[resourceGroup().location]",
      "properties": {
        "customImageId": "[parameters('existingCustomImageId')]",
        "size": "[parameters('newVMSize')]",
        "isAuthenticationWithSshKey": false,
        "userName": "[parameters('userName')]",
        "sshKey": "",
        "password": "[parameters('password')]",
        "labVirtualNetworkId": "[variables('labVirtualNetworkId')]",
        "labSubnetName": "[variables('labSubnetName')]",
        "expirationDate": "[parameters('expirationDate')]"
      }
 
    }
  ],

 

Please try the new feature and let us know how we can make it better by sharing your ideas and suggestions at the DevTest Labs feedback forum.

If you run into any problems with the feature or have any questions, we are always ready to help you at our MSDN forum.

 

 

 

Conta gratuita

Obtenha $200 em créditos Azure e 12 meses de serviços populares gratuitamente

Início gratuito

Visual Studio

Assinantes ganham até $1800 por ano de serviços do Azure

Ative Agora

Inicializações

Participe do programa BizSpark e obtenha serviços gratuitos do Azure

Saiba mais