Skip to content

Commit 40b7a10

Browse files
author
Jill Grant
authored
Merge pull request #291691 from RoseHJM/mdb-troubleshooting-appendix
MDB - troubleshooting appendix
2 parents 70c69b8 + 2bd09bc commit 40b7a10

File tree

5 files changed

+164
-0
lines changed

5 files changed

+164
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
title: Configure virtual switches for dev boxes
3+
description: Learn to configure virtual switches for dev boxes, enabling communication between dev boxes, VMs, and physical devices.
4+
author: RoseHJM
5+
ms.author: rosemalcolm
6+
ms.service: dev-box
7+
ms.topic: how-to
8+
ms.date: 12/05/2024
9+
10+
#customer intent: As a developer, I want to learn how to connect to a Dev Box using a virtual switch, so that my dev boxes, VMs, and physical devices can communicate.
11+
---
12+
13+
# Configure virtual switches for dev boxes
14+
15+
This article provides guidance on how to set up and use dev box with virtual switches. Virtual switches are used to connect dev boxes and other virtual machines (VMs) to both virtual networks and physical networks. They provide a way for dev boxes to communicate with each other and with external networks.
16+
17+
Dev box supports nested virtualization. You can create virtual machines inside a dev box and connect them to the default virtual switch *Default Switch*. If you want to create another virtual switch with internet access, set up a NAT network with an internal virtual switch. Use an IP address range that suits your required configuration.
18+
19+
> [!WARNING]
20+
> Incorrect configuration of virtual switch will cause you to lose the connection to dev box immediately and this is NOT reversable. Please setup with extreme care.
21+
22+
## Prerequisites
23+
- A dev box with Hyper-V and Virtual Machine Platform installed.
24+
25+
## Create virtual switch with NAT network
26+
27+
Create a virtual switch with a NAT network to enable internet access for your dev box and its guest VMs.
28+
29+
1. Create internal virtual switch:
30+
```powershell
31+
New-VMSwitch -SwitchName "VM-Internal" -SwitchType Internal
32+
```
33+
34+
1. Create an IP address for the NAT gateway
35+
```powershell
36+
New-NetIPAddress -IPAddress 192.168.100.1 -PrefixLength 24 -InterfaceIndex 34
37+
```
38+
39+
To find the *InterfaceIndex*, run `Get-NetAdapter`. Use the *ifIndex* of the adapter linked to the VM-Internal switch. If you choose a different IP range, ensure the IP address ends with “.1”.
40+
41+
1. Create the NAT network
42+
```powershell
43+
New-NetNat -Name VM-Internal-Nat -InternalIPInterfaceAddressPrefix 192.168.100.0/24
44+
```
45+
46+
## Configure guest VMs
47+
48+
Configure guest virtual machines (VMs) to use the virtual switch.
49+
50+
1. Create guest virtual machines (VMs) in your dev box, using the *VM-Internal* virtual switch. At this stage, the guest VM doesn't have internet access because it doesn't have an IP address.
51+
52+
1. Assign IP addresses to the guest VM.
53+
54+
1. On the guest VM, set the IP address to an available address in the range, like 192.168.100.10, 192.168.100.11, etc.
55+
1. Use the subnet mask 255.255.255.0, default gateway 192.168.100.1, and your desired DNS (for example, 8.8.8.8 for internet or your dev box's DNS).
56+
1. Open Network Connections, right-click the network adapter, select **Properties** > **Internet Protocol Version 4 (TCP/IPv4)**.
57+
58+
:::image type="content" source="media/how-to-connect-devices-to-dev-box/tcpip-config.png" alt-text="Screenshot that shows the TCP/IP version 4 configuration dialog.":::
59+
60+
After setting the IP address, the setup is complete. Verify that you have:
61+
62+
- Internet access from the guest VM.
63+
- Access between guest VMs.
64+
- Access to guest VMs from the dev box.
65+
66+
## Related content
67+
68+
- [Microsoft Dev Box: Frequently asked questions](dev-box-faq.yml)
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
title: How to connect Android devices to a dev box
3+
description: Learn how to connect Android devices to a dev box for efficient testing and debugging, enhancing your app development workflow and productivity.
4+
author: RoseHJM
5+
ms.author: rosemalcolm
6+
ms.service: dev-box
7+
ms.topic: how-to
8+
ms.date: 12/11/2024
9+
10+
#customer intent: As a developer, I want to connect Android devices to my dev box so that I can develop apps for Android.
11+
12+
---
13+
14+
# Connect Android devices to a dev box
15+
16+
Connecting Android devices to a dev box enhances your app development process by allowing you to test and debug directly on physical devices. This article provides step-by-step instructions to help you connect your Android devices to a dev box, streamlining your development workflow.
17+
18+
## Prerequisites
19+
20+
- Access to a dev box
21+
- A client computer to connect to the dev box from
22+
23+
## Prepare your client computer
24+
25+
To connect Android devices to your dev box, you first connect the devices to client computer you use to connect to the dev box.
26+
27+
### Connect Android devices
28+
29+
Connect your Android device to the client computer you'll use to connect to your dev box.
30+
31+
1. To open Device Manager, from the search box on the taskbar, run `devmgmt.msc`.
32+
1. Check that your device displays like one of the following options:
33+
- Device name: Universal Serial Bus / Pixel 6
34+
- Android Device / Android Composite Android Debug Bridge (ADB) Interface
35+
1. Uninstall nonstandard devices and drivers and restart your computer.
36+
1. In Device manager, verify your Android device displays.
37+
38+
> [!CAUTION]
39+
> Some devices like Samsung might not connect if the ADB interface device exists on the computer you connect from. To resolve this issue, uninstall the device.
40+
41+
### Configure USB redirection
42+
43+
Configure following Local Group Policy settings to allow USB redirection on your client computer.
44+
45+
1. To open Local Group Policy Editor, from a cmd window, run `gpedit.msc`.
46+
1. Navigate to **Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Connection Client\RemoteFX USB Redirection**.
47+
1. Enable **Allow RDP redirection of other supported RemoteFX USB devices from this computer** for **Administrators and Users**.
48+
1. To apply the policy changes, from a cmd window, run `gpupdate /force`.
49+
1. Restart your computer.
50+
51+
## Prepare your dev box
52+
53+
When your Android devices are connected to your client computer, you can configure your dev box to access them by enabling USB redirection.
54+
55+
### Configure USB redirection
56+
57+
Configure following Local Group Policy settings to allow USB redirection on your dev box.
58+
59+
1. To open Local Group Policy Editor, from a cmd window, run `gpedit.msc`.
60+
1. Open **Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Device and Resource Redirection**.
61+
1. Set **Do not allow supported Plug and Play device redirection** to **Disabled**.
62+
1. Navigate to **Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Connection Client\RemoteFX USB Device Redirection**.
63+
1. Enable **Allow RDP redirection of other supported RemoteFX USB devices from this computer** for **Administrators and Users**.
64+
1. To apply the policy changes, from a cmd window, run `gpupdate /force`.
65+
1. Restart your computer.
66+
67+
## Troubleshoot ADB Connection Issues
68+
69+
If the Android device isn't accessible to ADB, check the latest device drivers are installed and the device displays in Device Manager.
70+
71+
Perform the following steps on your dev box:
72+
73+
1. To open Device Manager, from the search box on the taskbar, run `devmgmt.msc`.
74+
1. Ensure the Google USB driver is installed and the device appears as [**Android Device \ Android Composite ADB Interface**](https://developer.android.com/studio/run/win-usb).
75+
- Devices from other manufacturers might not display in Device manager.
76+
- If your device is from another manufacturer, check [Install a USB driver](https://developer.android.com/studio/run/oem-usb#InstallingDriver) for manufacturer specific drivers. The goal is to make the ADB interface device show up in Device Manager.
77+
- The device name can vary from manufacturer to manufacturer, such as "Samsung Android Phone \ Samsung Android ADB Interface" or "Android Device \ Android Composite ADB Interface".
78+
1. Restart your computer.
79+
80+
## Related content
81+
82+
- [Microsoft Dev Box: Frequently asked questions](dev-box-faq.yml)
18.8 KB
Loading
247 KB
Loading

articles/dev-box/toc.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,20 @@ items:
121121
href: how-to-configure-stop-on-disconnect.md
122122
- name: Skip or delay an automatic shutdown
123123
href: how-to-skip-delay-stop.md
124+
- name: Connect devices to dev boxes
125+
items:
126+
- name: Connect physical devices to a dev box
127+
displayName: USB, devices, connect, physical, peripherals, android
128+
href: how-to-connect-devices-to-dev-box.md
129+
- name: Configure virtual switch
130+
displayName: connect, devices, switch
131+
href: how-to-connect-dev-box-virtual-switch.md
132+
- name: Drives and storage
133+
displayName: drives, storage, connect, physical, peripherals, android, switch
134+
href: /azure/virtual-desktop/redirection-configure-drives-storage?tabs=group-policy&pivots=dev-box
135+
- name: USB redirection
136+
displayName: USB, devices, connect, physical, peripherals, android, switch
137+
href: /azure/virtual-desktop/redirection-configure-usb?tabs=intune&pivots=dev-box
124138
- name: Troubleshooting
125139
items:
126140
- name: Automatically repair connectivity issues

0 commit comments

Comments
 (0)