Using Device Emulator 1.0 reliably inside Virtual PC
Over the last week, I have received many requests for getting Device Emulator to work within Virtual PC and get it to talk to another VPC image on the same machine. Yes, you can run the Emulator inside a VPC. However, you will have to use the Virtual Machine Network (VMNet) Driver inside the VPC. What you first need to do is to (a) get the two VPCs talking to each other (over a private network hosted by the host PC) and (b) then get the emulator within one VPC to obtain network connectivity.
Here are the detailed steps to get the emulator to work within your VPC.
1. Install the "Microsoft Loopback Adapter" on the host PC (running the VPC).
- Go to Control Panel ==> Add Hardware. When the Add Hardware wizard appears, Click Next.
- When the 'Is the hardware connected?' page appears, select 'Yes, I have already connected the hardware', and then click 'Next'
- In the 'Installed hardware' list, select 'Add a new hardware device' and then click 'Next'
- In the 'What do you want the wizard to do?' list, select 'Install the hardware that I manually select from a list (Advanced)', and then click 'Next'
- In the 'Common hardware types' list, click 'Network adapters', and then click 'Next'
- In 'Manufacturer' list, select 'Microsoft'
- In the 'Network Adapter' list, select 'Microsoft Loopback Adapter', and then click 'Next' twice
- In the 'Completing the Add Hardware Wizard' page, click 'Finish'
2. Configure your VPC to use the Loopback adapter. To do this, n the host PC (running the VPC).
- Go to the Settings dialog inside Virtual PC and click Networking, and choose "Microsoft Loopback Adapter" from the dropdown menu for Adapter 1.
3. Now, you want to run the Device Emulator inside the Virtual PC.
- First install the Virtual Machine Network driver (Virtual PC may already have this). The VSD Team blog has instructions on how to obtain the Virtuam Machine Network (VMNet) Driver.
- Configure the Emulator to use the hardware network card that the Virtual PC provides.
- Remember, do not configure the Emulator to use the loopback adapter when it is running inside the VPC image.
4. The Virtual PC gets network connectivity through the loopback adapter interface on the host PC. You can check through "IPConfig" that the VPC OSes have auto-IP addresses. The OS running inside the emulator will also get an auto-IP address and will be able to communicate with the other VPC.