Share via


Create a Virtual Machine for a Virtual CEPC (Compact 7)

3/12/2014

After you have built an OS run-time image for a virtual CEPC, you create a virtual machine with a virtual hard disk (VHD) image. In the following tasks, you use a VHD image that is included with Windows Embedded Compact 7. This VHD image includes a boot loader; you interact with this boot loader in the Virtual PC console to download and boot your OS image to Virtual PC.

If you want to create a custom VHD image with your own boot loader or you want to boot your OS image from your VHD (rather than downloading your OS image from Platform Builder), see Create a Stand-Alone Virtual Hard Disk for Virtual CEPC. If you want to use a custom VHD image that does not contain a boot loader, you can instead boot your virtual CEPC from a virtual floppy disk (VFD) image. For more about VFD booting, see Boot Virtual CEPC from Virtual Floppy Disk.

Tasks to Create a Virtual Machine for a Virtual CEPC

  1. Because the steps for configuring the VHD and virtual machine are different for Virtual PC 2007 (for Windows Vista and Windows XP) and Windows Virtual PC (for Windows 7), choose the appropriate set of instructions for your version of Virtual PC.
    1. For Virtual PC 2007, see Task 1a: Configure Virtual PC 2007 to Run a Virtual CEPC
    2. For Windows Virtual PC, see Task 1b: Configure Windows Virtual PC to Run a Virtual CEPC
  2. Task 2: Learn about the Virtual CEPC Boot Loader

Task 1a: Configure Virtual PC 2007 to Run a Virtual CEPC

If your computer is running Windows Vista or Windows XP, you use Virtual PC 2007 to run your virtual CEPC. To configure Virtual PC 2007 to run a virtual CEPC, you use the New Virtual Machine Wizard to create a new virtual machine, and then configure this virtual machine to use the VHD image included with Windows Embedded Compact 7.

To configure Virtual PC 2007 to run a virtual CEPC

  1. If you have not already done so, download and install Virtual PC 2007.

  2. Start Virtual PC 2007.

    The Virtual PC Console and the New Virtual Machine Wizard appear.

  3. If the New Virtual Machine Wizard does not appear, click the File menu of the Virtual PC Console, and then select New Virtual Machine Wizard.

  4. When the Welcome to the New Virtual Machine Wizard page appears, click Next.

  5. On the Options page, select Create a virtual machine, and then click Next.

  6. On the Virtual Machine Name and Location page, in the Name and Location box, type a name for your virtual machine file. If you restrict this name to sixteen characters or fewer, you can reuse this name later when you name your Platform Builder target device. In the following examples, we use "VCEPC" for the virtual machine name. The virtual machine file is automatically saved to the My Virtual Machines folder. To save it to a different location, use the Browse button. Click Next.

  7. On the Operating System page, in the Operating System list click Other. Click Next.

  8. On the Memory page, you can adjust the amount of RAM that the virtual machine will use or accept the default size of 128 MB. To accept the default size, click Using the recommended RAM. Click Next.

Before you can boot an OS on your virtual machine, you must add a new or existing VHD image. A VHD image is a .vhd file that is stored on your physical hard disk. The VHD typically contains a boot loader and may contain an OS, applications, and data files used by a virtual CEPC.

To create a virtual CEPC virtual machine with a virtual hard disk

  1. After you click Next in step 8 above, the New Virtual Machine Wizard displays the Virtual Hard Disk Options page. Under Do you want to use, select An existing virtual hard disk. Click Next.

  2. On the Virtual Hard Disk Location page, the wizard asks you for the location of the existing VHD image. Under Virtual hard disk location, click Browse, and navigate to the following location.

    %_WINCEROOT%\Platform\VirtualPC\VM\hd0_sample.vhd

  3. Click Next.

  4. After the Completing the New Virtual Machine Wizard page provides a summary of the attributes for your virtual machine, click Finish to close the New Virtual Machine Wizard and create this virtual machine.

When the wizard creates your virtual machine, the Virtual PC Console dialog box displays the name of your virtual machine followed by "Not running" as shown in this figure.

Virtual PC 2007 Console

For now, leave this console window open. A later section explains how to start and connect this virtual machine to Platform Builder for the purpose of downloading your OS image into Virtual PC 2007.

Task 1b: Configure Windows Virtual PC to Run a Virtual CEPC

If your computer is running Windows 7, you use Windows Virtual PC to run your virtual CEPC. To configure Windows Virtual PC to run a virtual CEPC, you create a new virtual machine and configure this virtual machine to use the virtual CEPC VHD included with Windows Embedded Compact.

To configure Windows Virtual PC to run a virtual CEPC

  1. If you have not already done so, download and install Windows Virtual PC.

  2. Start Windows Virtual PC. When Windows Virtual PC starts, it opens and displays your Virtual Machines folder.

  3. On the menu bar of the Virtual Machines folder window, click Create virtual machine.

  4. In the Create a virtual machine wizard, on the Specify a name and location for this virtual machine page, do the following:

    1. Type a name for your virtual machine in the Name box. If you restrict this name to sixteen characters or fewer, you can reuse this name later when you name your Platform Builder target device. In the following examples, we use "VCEPC" for the virtual machine name.

    2. In the Location box, you can accept the default location for your virtual machine file or click Browse to navigate to a different location. The default location is the Virtual Machines folder, which is located at:

      C:\Users\<user name>\AppData\Local\Microsoft\Windows Virtual PC\Virtual Machines

    3. Click Next.

  5. On the Specify memory and networking options page, you can adjust the amount of RAM that the virtual machine will use or you can accept the default size of 512 MB. To change the amount of memory, type the number of megabytes in the RAM box. Leave the Use computer network connections check box selected and click Next.

Before you can boot an OS on your virtual machine, you must add a new or existing VHD image. A VHD image is a .vhd file that is stored on your physical hard disk. The VHD typically contains a boot loader and may also contain an OS, applications, and data files that are used by your virtual CEPC.

To create a virtual CEPC virtual machine with a virtual hard disk

  1. After step 5 above, the wizard displays the Add a virtual hard disk page. On this page, do the following:

    1. Select Use an existing virtual hard disk.

    2. In the Location box, type the following path. Alternately, you can click Browse, navigate to this location, and then click Open.

      %_WINCEROOT%\Platform\VirtualPC\VM\hd0_sample.vhd

    3. Click Create. If you chose the name "VCEPC" for your virtual machine, the file VCEPC.vmcx appears in the Virtual Machines folder, as shown in the following image

    Virtual Machines Folder

A later section explains how to start and connect this virtual machine to Platform Builder for the purpose of downloading your OS image into Virtual PC.

Task 2: Learn about the Virtual CEPC Boot Loader

The virtual hard disk image included with Windows Embedded Compact includes a boot loader that you can use to download your OS image into your virtual machine. This boot loader runs immediately after you start your virtual machine, and you interact with this boot loader through the Virtual PC console. Before you begin the process of downloading your OS image to the boot loader, you should become familiar with how the boot loader works as described in this section.

After you start your virtual CEPC, the boot loader begins execution and progresses through three stages:

  1. Configuration Menu Stage
  2. Network Connection Stage
  3. BOOTME Stage

Configuration Menu Stage

During this stage, the boot loader provides you with an opportunity to enter the configuration menu so you can change virtual CEPC settings. The boot loader displays the following lines (spaced by one-second intervals) before it progresses to the network connection stage:

Hit space to enter configuration menu 5...``Hit space to enter configuration menu 4...``Hit space to enter configuration menu 3...``Hit space to enter configuration menu 2...``Hit space to enter configuration menu 1...

If you press the space bar before the boot loader displays the final prompt, which is "Hit space to enter configuration menu 1...", the boot loader enters the configuration menu.

Configuration Menu Stage

You can use the configuration menu to select a different boot source, change network settings, change display settings, or modify debug port settings. For more information about the configuration menu, see "Modifying Configuration Settings" in Advanced Virtual CEPC.

Network Connection Stage

After it completes the configuration menu stage, the boot loader enters the network connection stage. During the network connection stage, the boot loader attempts to contact a Dynamic Host Configuration Protocol (DHCP) server on your local network to request an IP address to use for your virtual CEPC session as shown in this figure.

Network Address Stage

If the boot loader displays an error message after the last configuration menu prompt, (instead of "Send DHCP Discover Message …") then your boot loader might be configured incorrectly. For a description of this problem and a solution, see Troubleshoot Virtual CEPC Downloads.

If your computer is not connected to a network with a DHCP server, the boot loader will be unable to acquire an IP address for communication with Platform Builder. In this case, you can configure your virtual CEPC to connect to Platform Builder and boot without a network. See Use Virtual CEPC Without a Network.

BOOTME Stage

When the boot loader acquires an IP address from a DHCP server, it attempts to connect to the Platform Builder session order to download the OS run-time image. The boot loader displays a series of status messages on the console as it sends BOOTME messages on the network, as shown in the following example.

BOOTME Stage

Each line reveals the unique device name (in this case PC-0003FF17EB16) of the virtual CEPC on the network. When you request Platform Builder to attach to the virtual CEPC, Platform Builder displays this name and you select it. For more information, see Download and Run a Virtual CEPC OS Run-Time Image.

Next Steps

Download and Run a Virtual CEPC OS Run-Time Image

See Also

Concepts

Create and Run a Virtual CEPC