Resources



Windows Server 2003 on Fedora Core 6 [Qemu] V.1.1

Click for a printer friendly version of this document Printer Friendly Save to del.icio.us
Average Review:

Windows Server 2003 (time-limited trial edition) running on Qemu & Fedora Core 6

Submitted By: enomaly  
AMI ID: ami-2c28cd45
AMI Manifest: khaz_win2003serverEE6/image.manifest.xml

About this AMI

This image was done using Fedora Core 6 Lite Base Image + nano, tar, bzip2, unzip, zip, fileutils, rsync, ec2-ami-tools, ruby, qemu 0.82.

A repository of Qemu images and overlays, that provide pre-configured setup of different Windows applications & components.


Windows access credentials are - username: Administrator, password: khazrocks99
Quickstart: (given you've started an instance off our public image)
  • win2003 Starts on boot
  • connect to your instance from your PC' using remote desktop connection
 ** To connect via ssh use id file:
You will be running an instance of a public AMI. Since it has no password you will need a public/private keypair to login to the instance. One half of this keypair will be embedded into your instance, allowing you to login securely without a password using the other half of the keypair. Once you learn to create your own images, you can choose other mechanisms to allow you to securely login to your new instances. Every keypair you generate requires
<hr />
Windows Activation procedure (if ever encountered):
1) Let's activate windows. Do you want to activate Windows now ?
Choose 'Yes, let's activate windows over internet now' option and hit
Next button

2) Do you want to register while you are activating windows ?

Choose 'No, I don't want to register, let's just activate Windows'
option, then hit Next button

3) You should see  'Thank you ! You have successfully activated your
copy of windows.', click OK button to proceed.

You have 15 day trial.
<hr />

Overview

QEMU is free software written by Fabrice Bellard that implements a fast processor emulator, allowing a user to simulate a complete PC system within another one. It is similar to projects such as Bochs, VMware Workstation and PearPC,but has several features these lack, including increased speed on x86,and support for multiple architectures in-progress. By using dynamic translation it achieves a reasonable speed while being easy to port on new host CPUs.

Some of the benefits of QEMU running within an AMI;

  • Able to track usage variables. This would be ideal for web hosting and other various utility models.
  • Significantly lower per/hour costs by running several additional Virtual Machines per AMI. This would require a Qemu abstraction / accelerator.

You could foresee up to 10+ addition concurrent operation systems.

  • Able to more effectively simulate varied operating/hardware environments for easy migration from legacy systems.
  • Backups to S3 - Using the Qemu-img tool, instant snapshots can be saved to S3. Used with a versioning system, this could provide for unlimited roll backs.
  • VMware compatible - Qemu-img supports vmdk conversion as well as several other formats enabling easy migration from existing virtualized server environments.

One of the main hurdles that needs to be over come is in regards to the performance and overall speed of the emulated systems. To overcome this, a Qemu abstraction / accelerator will need to developed. This could be developed by us or any ambitious AMI user.

Another option for getting windows running, might be using a combo of para-virtualization (Xen) with a system abstraction layer tailored for optimal Windows performance. I should note, the new version of Xen supports Windows, but only with specific BIOS & CPU such as Intel VT.

A separate para-virtualized abstraction layer would allow you to compile an AMI image rather then a Qemu image. This would need to be developed by someone with internal access to EC2 and would require very new hardware.

Advantages of QEMU

  • Supports emulating IA-32 (x86) PCs, AMD64 PCs, MIPS R4000, Sun's SPARC sun4m, Sun's SPARC sun4u, ARM development boards (Integrator/CP and Versatile/PB), SH4 SHIX board, and PowerPC (PReP and Power Macintosh) architectures.
  • Support for other architectures in both host and emulated systems (see homepage for complete list).
  • Increased speed — some applications can run in close to real time.
  • Implement Copy-On-Write disk image formats. You can declare a multi-gigabyte virtual drive, the disk image will only be as large as what is actually used.
  • Also implement overlay images. You can keep a snapshot of the guest system, and write changes to a separate image file. If the guest system breaks, it's simple to roll back to the snapshot.
  • Support for running Linux binaries for other architectures.
  • Can save and restore the state of the machine (programs running, etc.).
  • Virtual network card emulation.
  • SMP support.
  • Guest OS does not need to be modified/patched
  • Performance is improved when the "free but closed source" kqemu kernel module is used.
  • Command line tools allow a full control of Qemu without having to run X11.
  • Remote control of emulated machine via integrated VNC server
  • USB tablet support - this provides "grabless" mouse control. Activated with "-usb -usbdevice tablet".

Disadvantages of QEMU

  • Incomplete support for Microsoft Windows and other host operating systems (emulation of these systems is just fine).
  • Incomplete support for less frequently-used architectures.
  • No special device drivers (graphics, sound, IO) for guests are available thus quite large overhead for multimedia applications. It does emulate a Cirrus Logic graphics chip and several existing soundcards though, so using existing drivers for those does accomplish a similar task.
  • Supports only SDL or Cocoa video output libraries although a patch for GGI support exists[1]

Example of QEMU's usage

This command will create a 500MB hard disk image in QEMU's "qcow" format

qemu-img create -f qcow c.img 500M

In this command the -f option is for the disk image format. The following formats are supported: vfat, vpc, bochs, dmg, cloop, vmdk, cow, qcow, and raw, depending on the OS. See also: .img and .iso. The supported filesystem formats are abbreviations for:

  • vfat - Virtual VFAT
  • vpc - Virtual PC
  • bochs - BOCHS filesystem
  • dmg - macintosh Disk iMaGe
  • cloop - linux Compressed LOOP
  • vmdk - vmware Virtual Machine DisK format
  • qcow - Qemu Copy-On-Write
  • raw - RAW filesystem (no special format)
  • cow - user mode linux Copy-On-Write

The following command will start a virtual machine with 128MB of memory, using the c.img file created with the previous command and booting from a CD-ROM image linux.iso.The virtual machine will have audio support and use the system's clockto run in "real time." Note that one could also replace the -cdrom linux.iso parameter with -cdrom /dev/cdrom or whatever one's CD-ROM device is, and physically boot from installation medium and install to the image specified after -hda, in this case c.img.

qemu -hda c.img -cdrom linux.iso -boot d -m 128 -soundhw sb16 -localtime

While a virtual machine is running, press Ctrl-Alt-2 toaccess the "QEMU console", which lets one control the virtual machine(for example, changing disk images, rebooting, quitting QEMU, etc.) andCtrl-Alt-1 to switch back to your emulation. Ctrl-Alt-F toggles between full-screen and windowed mode.

Other Cool Stuff

Forget system restore and backup under XP. QEMU uses a concept called 'overlay images'. Once you have done your initial install, you can create an overlay image and run QEMU off this. The overlay image is very much smaller than the original image and will only contain changes made since the original install. If you trash your XP installation, you can simply delete the overlay image and create a new one from the original image. This is an ideal use in conjunction to Amazon's S3 storage services.

To create an overlay image, use the qemu-image program which is installed with QEMU. To create an image winxp.ovl from winxp.img, issue the following:

qemu-img create -b winxp.img -f qcow winxp.ovl

How to convert a VMWare virtual appliance to work with Qemu

The process is actually pretty easy.

  1. Download and extract the virtual appliance that you want to convert. [ http://www.vmware.com/vmtn/appliances/directory/ ]
  2. Verify that the disk format for the appliance will work with Qemu
  3. Convert the image from VMWare format to a qcow hard disk image .
    qemu-img convert appliance-harddrive-name.vmdk -O qcow appliance-harddrive-name-raw.img
  4. Make sure you give it the .img extension or Qemu won't open it.
  5. Boot the machine to see if it works. See > http://fabrice.bellard.free.fr/qemu/qemu-doc.html#SEC9
Having Trouble with Qemu? Try the support thread at: http://developer.amazonwebservices.com/connect/thread.jspa?messageID=51594&#51594

FAQ

Q.  (qemu) Could not open '/dev/kqemu' - QEMU acceleration layer not activated
A.  This message doesn't seem to effect the operation of Qemu. Itappears to be only a notice. Just disregard the message oruse -no-kqemu.

Licensing

Your Windows license only allows one install of Windows at a time. Installing Windows on a virtual machine while simultaneously having the same copy on another partition or machine will break that license.

http://www.microsoft.com/windowsserver2003/eulas/default.mspx

<hr />

** Footnote > http://en.wikipedia.org/wiki/KQEMU


Discussion
Click to start a discussion on this document Create a New Discussion
No discussion has been created for this document.

Reviews
Create Review Write a Review

Cannot login to the image, Jan 9, 2007 1:23 PM
Reviewer: bramwithaar
I'm able to start the image, but i'm unable to connect. Putty via putty gives me a "Server refused our key", while logging in to other public ami's with the same key is no problem. How can i solve this?

Get Help, Jan 11, 2007 3:41 PM
Reviewer: enomaly
You can get support here > http://developer.amazonwebservices.com/connect/thread.jspa?threadID=13446&tstart=0

use newer version, Jan 16, 2007 1:57 PM
Reviewer: khazsapenov
recent version should work ok

Brilliant, Apr 11, 2007 12:06 AM
Reviewer: Matt Bradley
Nice work guys! Works great, just be sure to open port 3389 for your ec2 group.

evaluation over, Jun 24, 2007 6:54 PM
Reviewer: billy
everything worked fine -- but when I logged in it said the evaluation was over and closed me remote desktop connection! So it's unusable. Still giving you 3 stars though because everything else is fine

Expired Version, Jun 30, 2007 8:49 AM
Reviewer: kcseattle
Version of windows is expired and doesn't work.

Cannot connect, Dec 28, 2007 10:20 AM
Reviewer: D. C Smith
I have been unable to connect via Remote Desktop. I submitted several requests for help in the help thread, and received one response asking if my ports were open (which they were), and have not heard anything since. I waited a week, tried again, and still no luck. I have tried from several of my computers both on and off VPN, no luck. I know I am using the correct login info. Oh well. So much for using Windows on EC2.

Cannot connecti via remote desktop, Jan 9, 2008 7:06 PM
Reviewer: saywhat123
I could get the instance running, but cannot connect to it with remote desktop either. cannot ping it either. Any ideas? Regards,

Works but the password is wrong, Mar 28, 2008 8:20 PM
Reviewer: mitchua
The password on this page is wrong I think. I had to use the password "khazsapenov" that I found here: http://developer.amazonwebservices.com/connect/thread.jspa?threadID=13446&start=135&tstart=0

evaluation period ended, Oct 4, 2008 3:00 AM
Reviewer: kh18965
When starting it says: "The evaluation period for this copy of windows has ended. Windows cannot start." So there is no use of this image (any longer), but I like the idea.

Expired, Oct 8, 2008 1:34 PM
Reviewer: rowitltd
Windows has expired so no use. Shame as I just wanted a windows share on the internet for a few hours, so the terrible performance would not have mattered. I guess I will have to wait till Amazon release the "real thing" in a few weeks/months.
Welcome, Guest Help
Login Login