newtelligence poweredRSS 2.0
# Thursday, May 21, 2009

Some recent events have led me to do some experimenting with Windows Embedded Standard, or WES. This is an upgraded version of Windows XP embedded. WES adds support for .Net 3.5 and Software Update Services, which are the top two new features that caught my eye. One of the nice things of WES over say, WinCE, is that you have a much richer development ecosystem to work with. Everything from the Full .Net Framework, WPF, WCF, to a huge library of open source tools and utilities, and not to mention driver support.

I’ve done some WinCE development in the past, and one of the best tools you can have, is the WinCE emulator. So when it came to WES, I wanted something where I could test stuff out without needing any hardware. The following walk illustrates what is needed to get a basic (and I do mean basic) WES image created and running in a Hyper-V vitalization environment. The following instructions were created were created from with help of the the Windows Embedded Standard (WES) help files, and a video tutorial by SJJ Embedded Micro Solutions.

Each WES image must include 7 Core Components.

  • Computer Componet/HAL
  • Shell Component
  • Language Component
  • NT Loader Component
  • File System and format components
  • Logon Component

I am going to select two macro components (macro components are components that are only made up of other components) in order to get those 7 core components. One of the macro components is provided for us, the other is one that we will create in order to get a HAL for a Hyper-V based VM.

  1. Installed Windows Embedded Standard Trial edition on a Windows XP Pro SP3 Virtual Machine in Hyper-V
  2. Navigate to C:\Program Files\Windows Embedded\utilities and run Tap.exe as an administrator. This creates a devices.pmq file in the same directory as the Tap program
  3. Open Component Designer and from the File menu, choose Import. Select the .pmq file you created in step 2, then click start.
  4. After the import is complete, click Save from the file menu to save the .sld file
  5. From the tools menu, choose component database manager
  6. On the database tab, click import and browse to your .sld file created in step 4 and then import.
  7. Close Component Designer and component database manager
  8. Open target designer and create a new target named HyperV_Test (or whatever you want to name it)
  9. Your new component should be at the bottom of the components tree on the left hand side of the IDE, double click it to add it to your target
  10. Under Software\Test & Development, double click the Runtime Quick Start Helper marco. This adds the explorer shell, FAT, NTFS and a few other essentials
  11. Go to the Configuration menu option and click check dependencies. This will add additional components, such as all those required by the Component we created from the .pmq file.
  12. From the tools menu, click Build. According to the video by SJJ, you must select release, but I think they were using the previous version of Target Designer. I only tried release. Also, you will want to specify the exact destination that you want the “image” to be created. Target Designer will delete everything in the destination folder. I decided to use a folder structure like /WESBuilds/HyperVTest/
  13. Copy the resulting image to a bootable partition. I created a new VHD file and attached it to another VM running XP. From within the running VM, I used Disk Management to partition, format and mark the partition as active. Finally I copied my image files over to the root of the new partition.
  14. Attach VHD to a new VM and boot. The first time an image is booted, the First Boot Agent (FBA) runs and completes the creation of the image.

So what did I end up with? Well, I had a WES image running in Hyper-V that used 210MB of disk space. This is a very, very basic image. The shell has an empty start menu, there is no logon, no command prompt, no networking, pretty much the bare minimum. So while this would be a good start for a final production build depending on requirements, its not very functional for development. I hope to be able to expand on this image and add the following:

  • Hyper-V extensions?
  • .Net Framework 3.5 SP1?
  • Networking and Firewall?

One question I have is, if you leave something out of an image, is there anyway to add it at a later time? For example, if you have no requirements for a web browser, and a media player initially, but need to add support in the future, what is the best way to implement?

Lot’s of potential with WES, and I’m looking forward to learning more about it.

Thursday, May 21, 2009 10:00:00 AM (GMT Daylight Time, UTC+01:00)  #    Comments [2] -
Technology | Virtualization
# Friday, February 27, 2009

I went to RDP into one of my local Hyper-V virtual machines this morning, only to find out I wasn’t able to connect. Browsing to the Hyper-V manager I saw that none of my VM’s were running. At first I couldn’t figure out why this was, until I remembered that my desktop machine was powered off this morning, indicating we had a brief power outage. The laptop, which obviously has a battery, was able to withstand the power outage, but the external hard drive, which requires external power was not. While I do have a UPS, it’s a piece of crap that never worked. Maybe now would be a good time to pick up another UPS on closeout from Circuit City, I’ll have to run that one past my manager.

I tried starting my VM’s, but most of them wouldn’t start, giving an error stating that the VM couldn’t start in it’s current state (which appeared to be saved). I tried to delete the saved state, and got an error stating that the saved state could not be deleted in the current state. The common thing between the VM’s that would start, and those that wouldn’t, was that the VM config files were also on the external hard drive. Browsing to the external hard drive, showed that the folder that contained the VM config files was empty (not a good sign). I checked the event log to see if I could get some more information, and 100’s of warnings indicating a problem with my external hard drive. I figured the best thing to do at this point was to shut down my laptop, power cycle the external hard drive and double check all connections.

After the reboot, the drive was functional (well almost) again, and there were no more warnings in the event log. While the VM config files were back where they were supposed to be, I still couldn’t start the VM’s. I also could not delete the VM config files from within Hyper-V manager. I went back to the config folder and went to Cut/Paste (move) the config files someplace else thinking I would just recreate the VM config. However, I couldn’t cut, move, delete or do anything other then browse (read) the files and folders.

Jumping back to Server Manager, I opened up Disk Management utility and saw that my external hard drive was listed as read only. I looked in just about every place I could think of, but could not find a way to make the disk read/write again. A Google search yielded no usable results, as it seems this is a pretty obscure problem. Aside from the legitimate answer of “does your removable media have a write protect switch”, all the other answers seemed to focus around viruses and other seemingly unrelated solutions.

Finally I decided to try my the only option that wasn’t grayed out for the read only disk in Disk Manger, and that was to take the disk offline, then bring it online again. Wow, that fixed it, the disk was now back in the standard read/write mode, and finally my VM’s would start. It appears as if the VM config file on at least one of the VM’s was corrupted, as I had to reselect my network adapters, but that was an easy fix.

Friday, February 27, 2009 5:47:26 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Virtualization
Archive
<March 2010>
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Copyright 2010
Adam Salvo
Sign In
Statistics
Total Posts: 234
This Year: 13
This Month: 1
This Week: 1
Comments: 34
Themes
Pick a theme:
All Content 2010, Adam Salvo
DasBlog theme 'Business' created by Christoph De Baene (delarou)