Look! - Over 40 Tutorials
RMPrepUSB - Site News

15 - How to emulate USB booting using Qemu Manager

Unique hits joomla site stats

Qemu is a generic and open source virtual machine emulator. Qemu Manager is a front-end GUI for this great tool. Qemu Manager is extremely easy to install and use. This is a quick introduction which allows you to test a bootable USB drive without needing to reboot your system and try it for real!

Note: RMPrepUSB v2.1.618  and later versions include QEMU - just press the F11 function key to boot from your USB drive!

1. First download and install Qemu Manager v7.0 from here. When installing choose the default answers only.

2. Now prepare your USB drive so it is ready to test and keep it in the computers USB port (do not 'Eject' it)

3. Once installed click on the + symbol   to create a virtual machine (see screenshots below)
4. Now go to the Drives tab and double-click on the Hard Disk 0 option and set this to the PhysicalDrive number of your USB drive (in my case #1). You can open the Disk Management console to check which drive number your USB drive is.

IMPORTANT NOTE: Qemu sets all drives that point to \\physicaldrive devices (as in this example) to READONLY. Any changes you make to the files on the USB drive itself when running under Qemu, will not actually take affect! If you have bootable DOS files on the USB drive, and it also has batch files or other programs which write to the drive, the writes won't actually take place when you boot it via Qemu! This means you can only emulate such DOS images when loaded into memory using for instance grub4dos. Linux and XP, etc. payloads will work as they have boot loaders which switch the OS to protected mode and they do not use the emulated BIOS that block DOS/BIOS sector writes.

As physical writes to the USB drive do not work under Qemu, I would advise you to set the following option in the Advanced section so that writes to the USB drive at least 'appear' to work whilst running under Qemu.

Do Not Apply Changes to VM Session  = Yes

Any disk/file writes to the USB drive under Qemu will not appear to work unless this option is set. Note that even when this option is set to 'Yes', all changes to the USB drive files are still temporary and the drive contents will be reset when you end the Qemu session, so the USB contents will be unchanged. As disk writes do not work unless this option is set, the grub4dos menu savedefault option will not appear to work unless you set this option to 'Yes'.

You can also change the boot order in the Qemu Drives menu if you want to, so that the HDD (your USB drive) boots first.

5. Now click on the run button  to start the session.

6. To use the keyboard and mouse within the virtual environment window, click the mouse cursor inside the Qemu black window - you should now be able to interact with the virtual machine just as if you had booted your USB drive from a real system.

7. When you have finished the emulation session, tap CTRL+ALT keys to release the mouse and keyboard back to your Windows computer and click on the red button   to stop the virtual machine.

Qemu is not the fastest emulator, but it is a very convenient. You can even boot to linux or WinPE with it to test that a USB drive is bootable or test your grub4dos menus. It is one of the easiest to use to test bootable USB drives.

There is a LOT more you can do with Qemu including loading PLOP or ISO files. It is also very convenient for taking screenshots of actual boot screens like the ones in these tutorials!

For more info on Qemu Manager read the pdf.

Updated on Feb 27, 2011 by Steve Si (Version 27)

Attachments (9)

QemuAdd1.png - on Nov 9, 2010 by Steve Si (Version 1)

QemuAdd.png - on Nov 9, 2010 by Steve Si (Version 2)

QemuInst.png - on Nov 9, 2010 by Steve Si (Version 1)

QemuStop.png - on Nov 9, 2010 by Steve Si (Version 1)

QemuRunExample.png - on Nov 9, 2010 by Steve Si (Version 1)

QemuRun.png - on Nov 9, 2010 by Steve Si (Version 1)

Qemu3.png - on Nov 9, 2010 by Steve Si (Version 1)

Qemu2.png - on Nov 9, 2010 by Steve Si (Version 1)

Qemu1.png - on Nov 9, 2010 by Steve Si (Version 1)