Azure DevTest Labs: Set expiration date for a virtual machine

2016. augusztus 2.

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.

 

 

 

Ingyenes fiók

$200 értékű kredittel tanulhat és fejleszthet, és ingyenesen dolgozhat tovább

Kezdetben ingyenes

Visual Studio

Előfizetőink akár évi $1800 értékben vehetnek igénybe Azure-szolgáltatásokat

Aktiválás

Startupok

Csatlakozzon a BizSpark-programhoz, és ingyenesen használhatja az Azure-szolgáltatásokat

Részletek