Skip to content

Commit 84b9cfe

Browse files
authored
Merge pull request #179077 from v-thepet/dtl4
Refresh Shared IP and Import VMs
2 parents bd727af + 86ae2a6 commit 84b9cfe

File tree

5 files changed

+57
-60
lines changed

5 files changed

+57
-60
lines changed
Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,45 @@
11
---
22
title: Understand shared IP addresses
3-
description: Learn how Azure DevTest Labs uses shared IP addresses to minimize the public IP addresses required to access your lab VMs.
3+
description: Learn how Azure DevTest Labs uses shared IP addresses to minimize the public IP addresses you need to access your lab VMs.
44
ms.topic: how-to
5-
ms.date: 06/26/2020
5+
ms.date: 11/08/2021
66
---
77

88
# Understand shared IP addresses in Azure DevTest Labs
99

10-
Azure DevTest Labs lets lab VMs share the same public IP address to minimize the number of public IP addresses required to access your individual lab VMs. This article describes how shared IPs work and their related configuration options.
10+
Azure DevTest Labs virtual machines (VMs) can share a public IP address, to minimize the number of public IPs you need to access lab VMs. This article describes how shared IPs work, and how to configure shared IP addresses.
1111

12-
## Shared IP setting
12+
## Shared IP settings
1313

14-
When you create a lab, it's created in a subnet of a virtual network. By default, this subnet is created with **Enable shared public IP** set to *Yes*. This configuration creates one public IP address for the entire subnet. For more information about configuring virtual networks and subnets, see [Configure a virtual network in Azure DevTest Labs](devtest-lab-configure-vnet.md).
14+
You create a DevTest Labs lab in a virtual network, which can have one or more subnets. The default subnet has **Enable shared public IP** set to **Yes**. This configuration creates one public IP address for the entire subnet. Any VMs in this subnet default to using the shared IP.
1515

16-
![New lab subnet](media/devtest-lab-shared-ip/lab-subnet.png)
16+
For more information about configuring virtual networks and subnets, see [Configure a virtual network in Azure DevTest Labs](devtest-lab-configure-vnet.md).
1717

18-
For existing labs, you can enable this option by selecting **Configuration and policies > Virtual Networks**. Then, select a virtual network from the list and choose **ENABLE SHARED PUBLIC IP** for a selected subnet. You can also disable this option in any lab if you don't want to share a public IP address across lab VMs.
18+
![Screenshot that shows the Shared I P setting on the Lab Subnet page.](media/devtest-lab-shared-ip/lab-subnet.png)
1919

20-
Any VMs created in this lab default to using a shared IP. When creating the VM, this setting can be observed in the **Advanced settings** page under **IP address configuration**.
20+
For existing labs, you can check or set this option by selecting **Configuration and policies** in the lab's left navigation, and then selecting **Virtual networks** under **External resources**. Select a virtual network from the list to see the shared IP settings for its subnets.
2121

22-
![New VM](media/devtest-lab-shared-ip/new-vm.png)
22+
To change the setting, select a subnet from the list, and then change **Enable shared public IP** to **Yes** or **No**.
2323

24-
- **Shared:** All VMs created as **Shared** are placed into one resource group (RG). A single IP address is assigned for that RG and all VMs in the RG will use that IP address.
25-
- **Public:** Every VM you create has its own IP address and is created in its own resource group.
26-
- **Private:** Every VM you create uses a private IP address. You can't connect to this VM directly from the internet with Remote Desktop.
24+
When creating a VM, you can access this setting on the **Advanced settings** page next to **IP address**.
2725

28-
Whenever a VM with shared IP enabled is added to the subnet, DevTest Labs automatically adds the VM to a load balancer and assigns a TCP port number on the public IP address, forwarding to the RDP port on the VM.
26+
![Screenshot that shows the Shared I P setting in Advanced Settings when creating a new V M.](media/devtest-lab-shared-ip/new-vm.png)
2927

30-
## Using the shared IP
28+
- **Shared:** All VMs you create as **Shared** go into the same resource group. The resource group has one assigned IP address that all VMs in the resource group use.
29+
- **Public:** Every public VM has its own IP address and resource group.
30+
- **Private:** Every private VM uses a private IP address. You can't connect to these VMs from the internet by using Remote Desktop protocol (RDP).
3131

32-
- **Linux users:** SSH to the VM by using the IP address or fully qualified domain name, followed by a colon, followed by the port. For example, in the image below, the RDP address to connect to the VM is `mydevtestlab597975021002.eastus.cloudapp.azure.com:50661`.
32+
When you add a VM with shared IP to a subnet, DevTest Labs automatically adds the VM to a load balancer and assigns the VM a TCP port number on the public IP address. The port number forwards to the secure shell (SSH) port on the VM.
3333

34-
![VM example](media/devtest-lab-shared-ip/vm-info.png)
34+
## Use a shared IP
3535

36-
- **Windows users:** Select the **Connect** button on the Azure portal to download a pre-configured RDP file and access the VM.
36+
- **Windows users:** Select the **Connect** button on the VM **Overview** page to download a pre-configured RDP file and access the VM.
37+
38+
- **Linux users:** Secure shell (SSH) connects to the VM by using the IP address or fully qualified domain name, followed by a colon, followed by the port number. For example, the following screenshot shows an SSH connection address of `contosolab21000000000000.westus3.cloudapp.azure.com:65013`.
39+
40+
![Screenshot that shows the R D P and S S H connection options on a VM Overview page.](media/devtest-lab-shared-ip/vm-info.png)
3741

3842
## Next steps
3943

40-
* [Define lab policies in Azure DevTest Labs](devtest-lab-set-lab-policy.md)
41-
* [Configure a virtual network in Azure DevTest Labs](devtest-lab-configure-vnet.md)
44+
- [Define lab policies in Azure DevTest Labs](devtest-lab-set-lab-policy.md)
45+
- [Configure a virtual network in Azure DevTest Labs](devtest-lab-configure-vnet.md)
Lines changed: 34 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,60 @@
11
---
22
title: Import virtual machines from another lab
3-
description: This article describes how to import virtual machines from another lab into the current lab in Azure DevTest Labs.
3+
description: Learn how to import virtual machines from one lab to another in Azure DevTest Labs.
44
ms.topic: how-to
5-
ms.date: 06/26/2020
5+
ms.date: 11/08/2021
66
---
77

8-
# Import virtual machines from another lab in Azure DevTest Labs
9-
This article provides information about how to import virtual machines from another lab into your lab.
8+
# Import virtual machines from one lab to another
9+
10+
This article discusses and describes how to import virtual machines (VMs) from one DevTest Labs lab to another lab.
1011

1112
## Scenarios
12-
Here are some scenarios where you need to import VMs from one lab into another lab:
13+
Here are some scenarios where you might need to import VMs from one lab into another lab:
1314

14-
- An individual on the team is moving to another group within the enterprise and wants to take the developer desktop to the new team’s DevTest Labs.
15-
- The group has hit a [subscription-level quota](../azure-resource-manager/management/azure-subscription-service-limits.md) and wants to split up the teams into a few subscriptions
16-
- The company is moving to Express Route (or some other new networking topology) and the team wants to move the Virtual Machines to use this new infrastructure
15+
- An individual is moving from one group to another and wants to take their developer desktop to the new team's lab.
16+
- The group has hit a [subscription-level quota](../azure-resource-manager/management/azure-subscription-service-limits.md) and wants to split up the teams into more than one Azure subscription.
17+
- The company is moving to Azure ExpressRoute or some other new networking topology, and the team wants to move the VMs to use the new infrastructure.
1718

18-
## Solution and constraints
19-
This feature enables you to import VMs in one lab (source) into another lab (destination). You can optionally give a new name for the destination VM in the process. The import process includes all the dependencies like disks, schedules, network settings, and so on.
19+
## Requirements and constraints
2020

21-
The process does take some time and is impacted by the following factors:
21+
The import process imports the VMs from the source lab into the destination lab. You can optionally rename the VM in the process. The import process includes all dependencies like disks, schedules, and network settings.
2222

23-
- Number/size of the disks that are attached to the source machine (since it’s a copy operation and not a move operation)
24-
- Distance to the destination (For example, East US region to Southeast Asia).
23+
The process is a copy operation, not a move operation, and can take a long time. The import time partly depends on the following factors:
2524

26-
Once the process is complete, the source Virtual Machine remains shutdown and the new one is running in the destination lab.
25+
- Number and size of the disks attached to the source machine
26+
- Distance between the source and destination regions
2727

28-
There are two key constraints to be aware of when planning to import VMs from one lab in to another lab:
28+
When the import finishes, the process shuts down the source VM and starts the new VM running in the destination lab.
2929

30-
- Virtual Machine imports across subscriptions and across regions are supported, but the subscriptions must be associated to the same Azure Active Directory tenant.
31-
- Virtual Machines must not be in a claimable state in the source lab.
32-
- You're the owner of the VM in the source lab and owner of the lab in the destination lab.
33-
- Currently, this feature is supported only through Powershell and REST API.
30+
There are several requirements and constraints for importing VMs from one lab to another:
3431

35-
## Use PowerShell
36-
Download ImportVirtualMachines.ps1 file from the [GitHub](https://github.com/Azure/azure-devtestlab/tree/master/samples/DevTestLabs/Scripts/ImportVirtualMachines). You can use the script to import a single VM or all VMs in the source lab into the destination lab.
32+
- You can import VMs across subscriptions and across regions, but both subscriptions must be associated with the same Azure Active Directory tenant.
33+
- VMs can't be in a claimable state in the source lab.
34+
- You must be the owner of the VM in the source lab, and the owner of the destination lab.
35+
- Currently, this feature is supported only through PowerShell and REST API.
3736

38-
### Use PowerShell to import a single VM
39-
Executing this powershell script requires identifying the source VM and the destination lab, and optionally supplying a new name to use for the destination machine:
37+
## Use PowerShell to import one or all lab VMs
4038

41-
```powershell
42-
./ImportVirtualMachines.ps1 -SourceSubscriptionId "<ID of the subscription that contains the source lab>" `
43-
-SourceDevTestLabName "<Name of the source lab>" `
44-
-SourceVirtualMachineName "<Name of the VM to be imported from the source lab> " `
45-
-DestinationSubscriptionId "<ID of the subscription that contians the destination lab>" `
46-
-DestinationDevTestLabName "<Name of the destination lab>" `
47-
-DestinationVirtualMachineName "<Optional: specify a new name for the imported VM in the destination lab>"
48-
```
39+
Download and run [ImportVirtualMachines.ps1](https://github.com/Azure/azure-devtestlab/tree/master/samples/DevTestLabs/Scripts/ImportVirtualMachines). You can use the script to import a single VM or all VMs from the source lab into the destination lab.
4940

50-
### Use PowerShell to import all VMs in the source lab
51-
If the Source Virtual Machine isn’t specified, the script automatically imports all VMs in the DevTest Labs. For example:
41+
To run this PowerShell script, identify the source and destination subscriptions and labs, and the source VM. Optionally, supply a new name for the destination VM.
5242

5343
```powershell
54-
./ImportVirtualMachines.ps1 -SourceSubscriptionId "<ID of the subscription that contains the source lab>" `
55-
-SourceDevTestLabName "<Name of the source lab>" `
56-
-DestinationSubscriptionId "<ID of the subscription that contians the destination lab>" `
57-
-DestinationDevTestLabName "<Name of the destination lab>"
44+
./ImportVirtualMachines.ps1 -SourceSubscriptionId "<ID of the subscription that contains the source lab>"`
45+
-SourceDevTestLabName "<Name of the source lab>"`
46+
-SourceVirtualMachineName "<Name of the VM to import from the source lab>" `
47+
-DestinationSubscriptionId "<ID of the subscription that contains the destination lab>"`
48+
-DestinationDevTestLabName "<Name of the destination lab>"`
49+
-DestinationVirtualMachineName "<Optional: specify a new name for the imported VM in the destination lab>"
5850
```
51+
If you don't specify a source VM, the script automatically imports all VMs in the source lab.
5952

6053
## Use HTTP REST to import a VM
61-
The REST call is simple. You give enough information to identify the source and destination resources. Remember that the operation takes place on the destination lab resource.
6254

63-
```REST
55+
The REST call is simple. You provide the information to identify the source and destination resources. The operation takes place on the destination lab resource.
56+
57+
```http
6458
POST https://management.azure.com/subscriptions/<DestinationSubscriptionID>/resourceGroups/<DestinationResourceGroup>/providers/Microsoft.DevTestLab/labs/<DestinationLab>/ImportVirtualMachine?api-version=2017-04-26-preview
6559
{
6660
sourceVirtualMachineResourceId: "/subscriptions/<SourceSubscriptionID>/resourcegroups/<SourceResourceGroup>/providers/microsoft.devtestlab/labs/<SourceLab>/virtualmachines/<NameofVMTobeImported>",
@@ -69,7 +63,6 @@ POST https://management.azure.com/subscriptions/<DestinationSubscriptionID>/reso
6963
```
7064

7165
## Next steps
72-
See the following articles:
7366

7467
- [Set policies for a lab](devtest-lab-set-lab-policy.md)
75-
- [Frequently asked questions](devtest-lab-faq.yml)
68+
- [DevTest Labs frequently asked questions](devtest-lab-faq.yml)
-1.87 KB
Loading
-898 Bytes
Loading
1.1 KB
Loading

0 commit comments

Comments
 (0)