Share via


Prepare Your Virtual CEPC for Stand-Alone Use (Compact 7)

3/12/2014

After you create a stand-alone VHD, as described in Create a Stand-Alone Virtual Hard Disk for Virtual CEPC, you prepare your virtual CEPC for stand-alone use by installing communication files used by Visual Studio, and any other files that you need for application development. When your VHD is ready, you can connect it to your virtual CEPC so that your virtual CEPC can boot and load your OS run-time image from the VHD.

Copying Files to Your VHD

You must copy communication files that your virtual CEPC requires to your VHD. To copy the files, attach your VHD to your host computer so that you can access it as would a physical drive. After you copy files to your VHD, detach the VHD from your host computer and attach it to your virtual CEPC.

To attach your VHD to your host computer

  1. On your host computer, click Start and then click Run.

  2. In the Open box, type diskmgmt.msc, and then press Enter. This command starts the Disk Management tool.

  3. On the Action menu, click Attach VHD.

  4. In the Attach Virtual Hard Disk dialog box, click Browse and navigate to the VHD image file that you created earlier; for example, to %_WINCEROOT%\OSDesigns\VIRTUAL CEPC\custom.vhd.

  5. Click OK.

  6. Click Start, and then click Computer to view the drives on your host computer. You should see your VHD attached to your host computer with a drive letter as shown in the following example:

    Attached VHD

    You may see a different drive letter depending on the number of other drives on your host computer. Remember the drive letter assigned to your VHD so that you can use it in the procedures in this topic. If you used DiskPrep to create your VHD, it should have the volume name "CE_BOOT" as shown in the previous figure. Note that DiskPrep sets this volume name after embedding the boot loader.

To add communications files to the VHD

  1. Click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.

  2. In the Command Prompt window, enter the following command to go to the folder that contains the Platform Builder connectivity files:

    chdir /D "%ProgramFiles%\Common Files\Microsoft Shared\CoreCon\1.0\Target\wce400\x86"
    
  3. Copy the following files to your VHD:

    • Clientshutdown.exe
    • ConmanClient2.exe
    • CMaccept.exe
    • eDbgTL.dll
    • TcpConnectionA.dll

    For example, if your VHD is using drive letter G:, enter the following commands:

    copy Clientshutdown.exe G:``copy ConmanClient2.exe G:``copy CMaccept.exe G:``copy eDbgTL.dll G:``copy TcpConnectionA.dll G:

At this point, you can copy any additional files to your VHD that you need for development. When your VHD is ready, detach it from your host computer as described in the next set of steps.

To detach the VHD from your host computer

  1. If the Command Prompt window that you used to copy files to your VHD is still open, close it.

  2. Locate the list of disks in the lower-left pane of the Disk Management tool.

  3. Find your VHD in the list of disks. It should have a FAT32 partition and the drive letter that you observed earlier, as shown in the following figure. If you used DiskPrep to create your disk, it will have the volume label "CE_BOOT."

    VHD in the Disk Management Tool

  4. Right-click this disk, and then select Detach VHD.

  5. When the Detach Virtual Hard Disk dialog box appears, clear the Delete the virtual hard disk file after removing the disk check box if it is selected, as shown in the following figure.

    Detach Virtual Hard Disk

  6. Click OK.

  7. To exit the Disk Management tool, click the File menu and click Exit.

Linking Your VHD to Your virtual CEPC

Before your virtual CEPC can boot from your VHD, you must link the VHD image file to your virtual CEPC. You link your VHD to your virtual CEPC by changing the Virtual PC hard disk settings and by using the boot loader configuration menu to change the boot source.

  1. If you have not yet created a Virtual CEPC virtual machine in Windows Virtual PC, create a virtual machine by using the instructions in Create and Run a Virtual CEPC.

  2. If your host computer is running Windows XP or Windows Vista, start Virtual PC 2007 and then, on the Virtual PC Console, click Settings. If your host computer is running Windows 7, right-click your .vmcx or .vmc file in your virtual machines folder (for example, VIRTUAL CEPC.vmcx), and then select Settings.

  3. In the Windows Virtual PC Settings dialog box, do the following:

    1. Under Setting on the left side of the dialog box, select Hard Disk 1, and then verify that Virtual hard disk file is selected on the right of the dialog box as shown in the following figure.
    2. Click Browse, and then navigate to the custom VHD that you created earlier.
    3. Click OK to link this VHD to your virtual CEPC.

Selecting the Custom Virtual Hard Disk

To change the boot source

  1. Start your virtual CEPC, as follows:

    1. If your host computer is running Windows XP or Windows Vista, start Virtual PC 2007.
    2. If your host computer is running Windows 7, start Virtual PC to open the Virtual Machines window, and then double-click the .vmcx file (for example, VIRTUAL CEPC.vmcx) for your virtual CEPC.
  2. When the configuration menu prompts appear on the Virtual PC console, press the spacebar immediately to open the configuration menu. The Main Menu appears with a set of configuration options:

    --------------------------------------------------------------`` Main Menu``--------------------------------------------------------------``[1] Show Current Settings``[2] Select Boot Source``[3] Select KITL Device``[4] Network Settings``[5] Display Settings``[6] Debug Port Settings``[7] Save Settings``[0] Exit and Continue

    Note

    If your VHD is not prepared correctly, the boot loader will not start and you will not see this menu. Instead, Virtual PC will display the following message in the console:

    Reboot and Select proper Boot device
    or Insert Boot Media in selected Boot device

    Typically, this error message occurs when the partition is not marked as active in the VHD. If you see this message, try creating your custom VHD again by using the steps described in Create a Stand-Alone Virtual Hard Disk for Virtual CEPC.

  3. Type 2 in the Main Menu to enter the Select Boot Source submenu.

  4. In the Select Boot Source submenu, type 1 to select Boot Drive. This option selects the boot drive as the boot source and exits the Boot Drive submenu.

  5. Type 1 in the Main Menu to show the current settings, and then verify that the boot source is set to Boot Drive.

  6. Type 7 in the Main Menu to save the settings.

In the Main Menu, you can type 0 to exit and continue the boot loading process. Or, if your stand-alone virtual CEPC must also work without a network, you can continue to use the configuration menu to prepare your virtual CEPC for off-network use as described in Use Virtual CEPC Without a Network.

When your virtual CEPC starts, it loads your OS image and displays the Windows Embedded Compact 7 desktop as shown in the following figure.

Stand Alone vCEPC

See Also

Concepts

Create a Stand-Alone Virtual CEPC