- Hi. Anyone here? / Please help me I need help now!!! / Can I ask a question?
- Unanswered questions
- Is it possible at all to get a RAM dump of Qemu?
- Is QEMU could simulate output device like LED or 7 segment display on ARM board?
- I have installed Qemu on Yellow Dog Linux 5.0.3 (with all updates installed) which is running on my PS3, but when I click on the Qemu exe file, nothing happens. What's going on?
- What is the cpu command in monitor mode used for?
- Is it possible to use my wireless network connection with a windows host machine for internet? I'm using the pre-made DSL (http://damnsmalllinux.org/) zip file.
- Is it or will it be possible with QEMU to run Solaris (sparc CPU) on windows or linux hosts?
- How does Qemu know to exit? I am emulating Linux on Linux, and no matter how I shutdown, Qemu doesn't exit on its own.
- Can one run a Linux Guest os onto a Linux Host?
- How do I load a USB flash drive emulating it as the HDA so I can boot from it? (in Windows)
- How can I convert .hdd files from Parallels software to .qcow2 files to run in QEMU?
- How do I use loadvm, -loadvm and savevm in QEMU 0.8.0? What do I need to do to keep the disk images consistent with the vm states?
- Is multiprocessor simulation still in development?
- Windows (XP) guest and TAP networking on a XP host
- QEMU user space
- Is it anywhere near development interests or even possible for qemu to be ported as an "app" to the iphone?
- Where can I report bugs?
- KQEMU, KVM and QVM86 questions
- Is KQEMU open source yet? When will it be made open source? How much can I pay to make it open source?
- I'm allergic to installers. Is there any way to get KQEMU working (on WinXP) without actually installing it as a Windows service?
- I need help getting KQEMU to work, are there any guides?
- I tried to compile KQEMU using GCC 3, but my kernel is compiled under GCC 4 so that doesn't work. I demand that you fix this compiler dependency so I can run a GCC 4 compiled KQEMU with my GCC 4 kernel.
- Why has KQEMU not improved the speed of QEMU on my Linux system?
- What about QVM86?
- Can QEMU use hardware virtualization extensions - Intel's VT or AMD's SVM?
- My Windows XP/2000 guest is BSOD'ing when using the KQEMU accelerator. What can I do?
- Networking questions
- I am using QEMU 0.6.1 from the Debian or Ubuntu packages and networking doesn't work. I set up everything exactly like the QEMU Network HOWTO said but it doesn't work. What's wrong?
- I set up QEMU to use the tuntap network mode but I don't see any /dev/tap0 or /dev/net/tap0! What happened?
- Why does QEMU use tun0 instead of tap0 like VDE? Shouldn't QEMU be using Ethernet frames instead of IP frames?
- How do I set up tuntap networking on Windows hosts?
- How do I set up my network using tuntap without using VDE?
- I'm using a kernel >=2.6.18 and am having problems with tun/tap and QEMU
- Making a bridge for QEMU makes my firewall useless in Linux
- How do the new -net options work? Why doesn't -net user work like -user-net used to?
- What is VDE?
- How do I get the network card to work with Windows 2003 Server?
- I'm using QEMU 0.7.1 or older, and I am running an amd64 host in 64-bit mode. Slirp is not working. No DNS, no DHCP packets even. What happened?
- I am using QEMU to run Windows 2000 on Linux. I can't access the user mode networking SMB server when my Linux window manager starts QEMU, e.g. "qemu -smb share win2k.img". How do I fix this?
- I am using QEMU to run Windows 2000 on Linux. After I create a file in the SMB Shared Folder (on Windows), the file attributes keep changing to read-only. How can I stop this from happening?
- I am using QEMU to run Windows 2000 on Linux & I have set up the SMB server successfully. How do I map My Documents to the Linux file system?
- I am using QEMU to run Windows 2000 on Linux & I have a HP LaserJet compatible printer connected to the parallel port of the Linux host. How do I get Windows printing to this printer?
- I tried running QEMU with a CD-ROM but it says it can't boot!
- How is QEMU pronounced?
- Why the name QEMU?
- How can I use multiple CD-ROM drives with QEMU?
- How do I get to the monitor?
- If I use -nographic mode, where does the output go?
- Do I need to install sdl-devel packages (e.g. the SDL header files)?
- How do I eject/change a floppy disk/cdrom in QEMU?
- How do I use vvfat?
- When I start QEMU, I don't get any output! It just sits there doing nothing and taking up CPU. What's wrong?
- I tried to compile QEMU with GCC 4 but I get a lot of weird compiler errors. Same happens if I try to use GCC 2. How can I fix this?
- How to switch between emulated system mouse and local system mouse?
- Is it possible to remap the hotkeys, such as Ctrl-Alt, to something else?
- When I run QEMU, the mouse doesn't work. I set everything else right, and everything else works, but the mouse doesn't. The mouse pointer is either not there, frozen, stuck at the right border or hidden in the bottom right corner of the screen. I am using SDL-1.2.8 with QEMU.
- How can I get Windows keys in QEMU? Such as the Start Menu key or the Right-Click-Menu key?
- How do I resize a disk image?
- How can I loopback mount a qemu created disc image (raw format)? How should I mount the second partition?
- Can I run my OS on /dev/hda1 in QEMU?
- Can I run my Windows on my /dev/hda in QEMU?
- Can I use my USB devices with the guest operating system in QEMU?
- I try usb_add with a valid device but the console prints "Could not add USB device 'host:x.xx'"
- In reference to http://www.qemu.org/qemu-doc.html#SEC30: When will the bug in QEMU be fixed so I can use my Win XP?
- Can I run X86 Mac OS X in QEMU?
- Can I run Mac OS X in qemu-system-ppc?
- Does any PPC Mac OS prior to Mac OS X work in QEMU?
- Where can I find drivers for the graphics card for Windows NT 3.51?
- How do I create a hard disk image? Do I have to know about cylinders/heads/sectors per track?
- How can I access COM1 (host device /dev/ttyS0)? I'd like to use my external modem from within QEMU.
- How can I access my PRiNter (host device /dev/lp0 or /dev/parport0)? I'd like to use my LPT scanner, but it requires Windows software so I have to use it from inside of QEMU.
- Why does QEMU not compile on my hardened GCC?
- How can I transfer files between host and guest OS?
- How can I copy/paste text or small files to/from the host/guest?
- Can I use QEMU to install a Linux distro onto the hard drive (e.g. /dev/hda1) using the install iso files?
- Help! /usr/bin/ld: qemu-i386: Not enough room for program headers
- How do I read the man pages from Windows?
- How do I use the new USB tablet support (grabless mouse)?
- Can I use my PCI devices with the guest operating system in QEMU?
- I run QEMU in Xgl and QEMU is transparent!!! What the heck is going on?
- Sound is terrible/broken when playing games in Win9X!
- I'm having trouble getting sound to work with ALSA output method
- Is it possible to use 3D-acceleration in the guest OS?
- SUSE Linux installation and "Error no proposal" while attempting to locate the package collection
- Is there any way to mount a qcow2 disk directly under Linux?
- Can I run QEMU on Mac OS X?
- Why isn't full-screen mode "full screen"? The only thing I get is an original sized output with a full-screen border.
- Is it possible to install QEMU under Linux if you don't have root password?
- Can you change the path in a QCOW image based on another disk image?
- Is it possible to control QEMU remotely (remote QEMU monitor access)?
- Is it possible to slow down the emulation (for running DOS games on recent hardware)?
- Is it possible to get KQEMU 1.3.0pre9 working in Ubuntu 6.10 (Edgy Eft) on AMD64?
- Is it possible to get a VM with >= 2 GB RAM?
- Will QEMU ever leverage my multi-core host CPU?
- Opcode histogram
- Virtual clock regularization
- Is it possible to port Z80 as a guest processor?
- When QEMU exits abruptly when the mouse is locked, it stays locked, how can I recover mouse functionality?
- When QEMU is running with sound, Linux sounds won't work
- QEMU is hanging. Is there any guide to how I can diagnose the problem myself?
- Is it possible to boot from a hard disk besides hda?
- When I tried to compile QEMU, I got the error "./configure: 372: Syntax error: Bad fd number".
- When I use the sendkey command from the QEMU monitor, I get an error message.
- I have a VMware virtual machine that's using a flat disk image. I'd love to convert it to a QEMU flat image.
- How do I get std-vga (VESA) working with Windows 2000?
- How can I make it so I have a read-only image on one disk and another image with the changed files on it?
- MSDOS Questions
Hi. Anyone here? / Please help me I need help now!!! / Can I ask a question?
If you have something to ask that's not covered here or elsewhere, then go ahead and ask. Don't bother checking to see if someone is awake or not.
In fact, if no one is around to answer your question for you, but you ask it anyways, there is a good chance that someone will wake up later and write the answer in this FAQ. I've seen lots of people, 10 minutes after they left, who have joined the channel desperately asking for help but never saying what the problem was.
Unanswered questions
How can i host QEMU on window Vista? When i run the qemu-win .bat qemu exits with a flash.Any suggestions?
Is it possible at all to get a RAM dump of Qemu?
Is QEMU could simulate output device like LED or 7 segment display on ARM board?
I have installed Qemu on Yellow Dog Linux 5.0.3 (with all updates installed) which is running on my PS3, but when I click on the Qemu exe file, nothing happens. What's going on?
What is the cpu command in monitor mode used for?
Hello, In monitor mode, there is a "cpu" command, but it is undocumented in qemu-doc.html. On-line help only says: "cpu index -- set the default CPU", and I can't figure out what it is used for. Thanks for you help!
Is it possible to use my wireless network connection with a windows host machine for internet? I'm using the pre-made DSL (http://damnsmalllinux.org/) zip file.
Is it or will it be possible with QEMU to run Solaris (sparc CPU) on windows or linux hosts?
I need somehow to execute old Solaris programms on Intel platforms and do not have sources to recompile them.
How does Qemu know to exit? I am emulating Linux on Linux, and no matter how I shutdown, Qemu doesn't exit on its own.
Qemu is like a PC without an OS. You need to provide a boot media such as a hard disk or a CD (real or virtual) for Qemu to do more than POST. Qemu does not come with a built in interface to configure settings or create machines like VMWare or Bochs or other virtual machines. Qemu behaves similarly to a service, not a program in this respect.
Can one run a Linux Guest os onto a Linux Host?
Like installing/running a Fedora7 iso on a linux host running Fedora4 + qemu for example?
How do I load a USB flash drive emulating it as the HDA so I can boot from it? (in Windows)
On Windows XP/2K you can try to boot from the flash drive like so: qemu -hda //./PhysicalDriveN ... where N is the drive number found in the disk manager.
How can I convert .hdd files from Parallels software to .qcow2 files to run in QEMU?
Run 'file' on the .hdd image. Is it in raw format? If it is then you can use qemu-img to do the conversion. Please edit this and move it elsewhere if it indeed answers the question.
How do I use loadvm, -loadvm and savevm in QEMU 0.8.0? What do I need to do to keep the disk images consistent with the vm states?
UNANSWERED
Is multiprocessor simulation still in development?
There are a number of oddities with the TSC, clock interrupts, and waking up secondaries that seem to make booting Linux 2.6.21-rc2 on QEMU 0.8.2's simulated i386 SMP systems significantly more difficult than expected, such as requiring kernel or QEMU patches I've not started writing yet.
Windows (XP) guest and TAP networking on a XP host
If I install WindowsXP as a guest on an XP system, and use TAP networking (bridging the OpenVPN TAP device and the physical ethernet device), I have some strange behaviour. 1. When using DHCP to configure the guest's NIC, either the host or the guest will tell me that there is an IP conflict on my network. 2. If the firewall is enabled on the guest, I can't ping it, or browse its shared folders. 3. If the firewall is disabled on the guest, and I try to browse its shared folders, It asks me to login as "guest" and waits for a password. If the guest is Linux there doesn't seem any problem at all... Does anyone recognize this and knows about the reason and a possible solution? Does this also happen if the HOST is Linux?
W2K and Microsoft Office 97
I'm having trouble installing Microsoft Office 97 onto W2K under QEMU. The W2K installation seems to be fine but any attempt to install Office 97 gets me a dialogue box that says:
Inf Parser Object
Your setup files may be damaged...
Anyone else see this? If so any solution? If not, anyone have a spare Office 97 cd lying around?
QEMU user space
I want to run Linux i386 binaries on a Linux powerpc machine. I am running Debian. The User documentation mentions a file qemu-runtime-i386-XXX-.tar.gz that I should be able to find. Where can I find this file? Where can I find Debian etch (4.0) information?
Is it anywhere near development interests or even possible for qemu to be ported as an "app" to the iphone?
Where can I report bugs?
Please do NOT report bugs in this wiki, as the developers are not looking for bugs here (so there is no reason to put them here). If you have a bug to report, the best place is the qemu-devel mailing list. Note that Savannah QEMU project page is not looked at - bug reports sent there will not reach any of the developers. Also some of the older bugs there have since been fixed but never have been closed on that site (because the developers don't have access to close bugs on there).
KQEMU, KVM and QVM86 questions
Is KQEMU open source yet? When will it be made open source? How much can I pay to make it open source?
KQEMU 1.3.0pre10 (the official QEMU Acceleration module) is open source as of Monday February 5, 2007. It can be found at the official QEMU site along with a nice technical doc.
Before pre10, KQEMU was a closed source proprietary binary with a few public wrappers.
KQEMU, the official QEMU Accelerator, should not be confused with KQEMU, a KDE-based GUI front-end to QEMU, which is based on KRDesktop. Note that the GUI front-end existed before the QEMU Accelerator, and Fabrice Bellard likely took the name without realizing that there was a GUI project by the same name.
I'm allergic to installers. Is there any way to get KQEMU working (on WinXP) without actually installing it as a Windows service?
No. KQEMU requires direct privileged access to the CPU, so must be installed as a kernel module/service.
I need help getting KQEMU to work, are there any guides?
Yes, there are:
official installation instructions
I tried to compile KQEMU using GCC 3, but my kernel is compiled under GCC 4 so that doesn't work. I demand that you fix this compiler dependency so I can run a GCC 4 compiled KQEMU with my GCC 4 kernel.
Already done. KQEMU work fine with GCC 4. As explained in another entry, only the dynamic translator has an issue with compilers that are not GCC 3. Since KQEMU does not do any translation, this bug doesn't affect it.
You can get away with compiling main QEMU with GCC 3 and an accelerator with GCC 4. That works fine. Note that this may require a bit of ./configure trickery - details needed.
Why has KQEMU not improved the speed of QEMU on my Linux system?
You probably have not set up the ramdisk in /dev/shm. Add the following line to /etc/fstab:
tmpfs /dev/shm tmpfs defaults 0 0
and then mount it with
mount /dev/shm
What about QVM86?
QVM86 was a drop in replacement for KQEMU. QVM86 does not support the new -kernel-kqemu feature, and requires patching to be compatible with QEMU >= 0.8.1. It has been officially abandoned by the author now that KQEMU and VirtualBox are GPL.
Can QEMU use hardware virtualization extensions - Intel's VT or AMD's SVM?
At present, no. A separate project named Kernel Virtual Machine currently uses a modified QEMU to provide this ability for Intel's VT and AMD's SVM technologies. On VT capable Intel processors the 'vmx' cpuflag will show up in /proc/cpuinfo. 'svm' is shown for AMD-V enabled processors. VT is usually disabled by the BIOS - some vendors allow you to enable it from the BIOS menu. AMD-V can not be disabled by the BIOS.
It is expected that once KVM matures it will be submitted for inclusion in QEMU. KVM web site is linkedhere. The kernel parts have already been merged into Linux 2.6.20.
My Windows XP/2000 guest is BSOD'ing when using the KQEMU accelerator. What can I do?
The release of QEMU 0.8.2 comes with ACPI support enabled by default. Unfortunately this seems to be unstable for these Windows based guests. This is especially true when using the -kernel-kqemu feature.
The good news is that the system can be installed or converted into what Microsoft terms a "Standard PC". What do you lose by doing this? Mainly you will lose initially the ability for the guest to power itself off (close QEMU) on shutdown - this can be resolved later by installing the NT Legacy/APM device.
When installing Windows it is possible to tell the installer not to use ACPI - however it is probably easier to start the install with the -no-acpi flag specified to QEMU. This will disable ACPI in QEMU and hence the installer will not enable ACPI support for the guest.
To convert an existing Windows guest first boot it in QEMU without the -kernel-kqemu switch. Then go into the Device Manager and expand the "Computer" field - it should be listed at or near the top of the device manager window. You'll see a listing for an "ACPI Uniprocessor" machine. Right click on this listing and choose to upgrade the driver. At this point you want to manually specify what device it should be - choose to install the device manually yourself (don't let Windows search for a better driver). You should now see a list of ACPI related system categories - choose near the bottom the "Standard PC" entry. Once it is installed shutdown your guest. You can now start it again using the -kernel-kqemu switch. Note: the device manager may list two "Standard PC" entries under the Computer field - you can safely remove one of them.
Networking questions
I am using QEMU 0.6.1 from the Debian or Ubuntu packages and networking doesn't work. I set up everything exactly like the QEMU Network HOWTO said but it doesn't work. What's wrong?
Debian 3.1 ('Sarge') ships QEMU packages with their own custom BIOS. The Ubuntu packages use the Debian BIOS. This BIOS is known to be incompatible with regards to networking for QEMU versions prior to 0.7.0 (the technical reason is that QEMU and the BIOS can not agree on an IRQ for the emulated network card). Get QEMU from a source code release.
Also, Debian 4.0 ('Etch') has a qemu-0.8.2 package. Ubuntu now has 0.8.2 packages. 0.7.0 and all future versions should work.
Qemu -smb option does not work on Debian because of a bug in Samba package (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=249873). Rebuild the Samba package without the --with-fhs option to work around it.
I set up QEMU to use the tuntap network mode but I don't see any /dev/tap0 or /dev/net/tap0! What happened?
It will be in "ifconfig -a". There is no /dev/eth0 under Linux, the same applies for tap0. Furthermore, tun0 or tap0 will not exist unless QEMU is actually running. When QEMU finishes running, it removes the devices on its own (technically it is the kernel which removes any unused tuntap devices).
Why does QEMU use tun0 instead of tap0 like VDE? Shouldn't QEMU be using Ethernet frames instead of IP frames?
QEMU already does. Like VDE, QEMU uses a tap device (not a tun device) but the kernel allows you to create a tap device with the name "tun0" (and conversely, a tun device with the name "tap0"). QEMU just uses confusing names, but it always uses a tap device. Thus, it always uses Ethernet frames.
Note: As of version 0.8.0, QEMU now uses tap names by default.
How do I set up tuntap networking on Windows hosts?
Visit ... http://www.h7.dion.ne.jp/~qemu-win/TapWin32-en.html, a web page that describes a patched version of QEMU that uses OpenVPN to simulate the tuntap layer. It tells you how to set it up, and if you link on the link to the home page, you'll find a patch for QEMU sources as well as a patched binary.
It works well in Windows XP Pro SP2. You may bridge the TAP driver to your local area connection in order to access your LAN from the system inside QEMU.
How do I set up my network using tuntap without using VDE?
See QEMU Network HOWTO. The VDE stuff in the HOWTO is not correct (as the author of the HOWTO does not use VDE), but the rest of it has exactly what you are looking for.
NOTE: As of QEMU 0.8.0, the syntax is completely backwards incompatible. The network HOWTO needs to be rewritten with the new syntax.
Note: if you want to use bridging, you can use nameif or ifrename to name the bridge eth0 instead of br0 (thus potentially saving you from having to edit countless configuration files of various daemons).
For more info on tuntap, see QemuAndTuntap.
I'm using a kernel >=2.6.18 and am having problems with tun/tap and QEMU
Starting with Linux 2.6.18, the kernel now requires that a user process has CAP_NET_ADMIN capability associated with it to set persistent tap interfaces. This a problem since most people do not run qemu as root - nor should they. A few suggestions:
Use the POSIX capabilities framework to give QEMU proper access - see this link
Use tunctl to bring up a tap interface and give its name to qemu with -net tap,ifname=
Another way to make QEMU behave as before is to wrap the process in a script that manages the interface:
qemu-tap
#!/bin/sh
# script to manage tap interface allocation
# for linux kernels >= 2.6.18
# set up a tap interface for qemu
# USERID - uid qemu is being run under.
USERID=`whoami`
iface=`sudo tunctl -b -u $USERID`
# generate a random mac address for the qemu nic
# shell script borrowed from user pheldens @ qemu forum
ranmac=$(echo -n DE:AD:BE:EF ; for i in `seq 1 2` ; \
do echo -n `echo ":$RANDOM$RANDOM" | cut -n -c -3` ;done)
# specify which NIC to use - see qemu.org for others
model=ne2k_pci
# model=ne2k_isa
# start qemu with our parameters
qemu $@ -net nic,vlan=0,macaddr=$ranmac,model=$model \
-net tap,vlan=0,ifname=$iface
# qemu has stopped - no longer using tap interface
sudo tunctl -d $iface &> /dev/null
You would then start QEMU using this wrapper: ./qemu-tap -hda deb-sid.img -localtime
You need tunctl, a program from the User-mode Linux project, to make this work. On Debian the package is called uml-utilities.
Please feel free to modify the script.
Making a bridge for QEMU makes my firewall useless in Linux
For you to build a bridge your existent firewall rules in eth? are now useless, you have to change your configuration to setup a firewall in the br? device you created instead.
Many times, after this, you will lose network connection to the QEMU virtual machines, because most of the firewalls will block also traffic that isn't for the machine IP address... and so breaks the packages going to the virtual machines inside it.
To enable a firewall on the HOST network, but allow all traffic for the servers, you need to configure 2 rules for each client IP address:
# allow incoming packets for qemu IPTABLES -A FORWARD -d $IPADDR_FROM_CLIENT_OS -j ACCEPT # allow outgoing packets from qemu IPTABLES -A FORWARD -s $IPADDR_FROM_CLIENT_OS -j ACCEPT
this will make the firewall accept also traffic to the virtual machine's IP address. if you want, tune the iptables rules to accept a network range instead of a single IP address, just add the network address and the netmask.
Note: if you set up the bridge at boot time, before the firewall is started, and you use nameif or ifrename, this issue should go away.
How do the new -net options work? Why doesn't -net user work like -user-net used to?
As of QEMU 0.8.0 the command-line options controlling network emulation have been rewritten. The new options are much more flexible and powerful, but can cause some confusion when converting old command-lines to the new scheme.
A QEMU "vlan" is like a virtual Ethernet hub. QEMU vlans are local to each QEMU instance. They are not related to 802.1Q VLANs. Each -net option plugs a device into that hub (vlan0 by default). New vlans are created automatically as required.
-net nic creates an emulated NIC in the guest. -net tap creates an interface on the host machine. -net user creates a magical firewall router. -net socket creates a virtual patch cable that can be used to connect multiple QEMU instances.
The old 0.7.x -user-net option is equivalent to -net nic -net user.
-net nic -net tap creates an emulated NIC and a host TAP interface, and connects them both to the virtual hub. This is roughly equivalent to the old -tap option.
What is VDE?
Virtual Distributed Ethernet. See vde.sf.net, this is a way to have multiple QEMU guests communicate together over a network. You can use VDE on top of tuntap to allow outside workstations to communicate to the virtual network, or you can use VDE's Slirp mode, which acts like a superfirewall. See the QEMU VDE HOWTO for more information.
Note: Latest version of VDE has been updated to use the new QEMU 0.8.0 network syntax.
How do I get the network card to work with Windows 2003 Server?
Here. This is for PCI mode.
I'm using QEMU 0.7.1 or older, and I am running an amd64 host in 64-bit mode. Slirp is not working. No DNS, no DHCP packets even. What happened?
Upgrade to 0.7.2 or newer. Older versions have a bug in Slirp caused by a 64/32 bit mismatch. Newer versions have a workaround for this, though the Slirp code really needs to be cleaned up at some point.
I am using QEMU to run Windows 2000 on Linux. I can't access the user mode networking SMB server when my Linux window manager starts QEMU, e.g. "qemu -smb share win2k.img". How do I fix this?
Your window manager needs to start it like this:
qemu -smb $HOME/share win2k.img
(assuming that you have created a dir called "share" in your home dir)
More Tips:
* Make sure your LMHOSTS file on Windows has the line:
10.0.2.4 smbserver
* If you can't find smbserver in My Network Places, try searching for it, e.g. (on Windows 2000) Start -> Search -> Files or folders -> Computers, then search for "smbserver". When found, double click "smbserver", right click "qemu" and map it to a drive letter. You will then be able to access the shared drive from My Computer.
* To access the Linux root (/) filesystem from Windows, create a symbolic link inside your "share" dir, e.g. (on Linux):
ln -s / $HOME/share/root
Or just do a '-smb /'
Both methods are potentially insecure. It is not recommended to share one's root filesystem unless there is a really good reason to do so.
* The program "/usr/sbin/smbd" must exist on your Linux system for the -smb feature to work. Install the "Samba" package if you don't have this on your system.
Running XP I found http://wiki.archlinux.org/index.php/Qemu#Samba to have very helpful information. Although the IP address needed to be 10.0.2.4 for me. lmhosts is at %SystemRoot%\system32\drivers\etc and in XP there is is also called lmhosts.
I am using QEMU to run Windows 2000 on Linux. After I create a file in the SMB Shared Folder (on Windows), the file attributes keep changing to read-only. How can I stop this from happening?
This can be solved by running your own Samba server (that requires users to login) & starting QEMU (on Linux) without the -smb option, e.g. "qemu win2k.img".
Here is a Samba config file (smb.conf) that will share a directory named "share" in the users home directory to the QEMU Windows 2000 session (once the user has logged in to the Samba server via Windows).
[global]
workgroup = WORKGROUP
wins support = yes
encrypt passwords = yes
hosts allow = 10. 127.
[qemu]
path = /home/%U/share
valid users = %U
public = no
writable = yes
printable = no
Tips (for those running their own Samba server):
* You need to add the Linux user (e.g. fred) to the Samba user password database:
smbpasswd -a fred
* Use the same username & password for Linux user, Samba user & Windows 2000 user. If you do this, Windows will not ask you for the username & password when you access the SMB Shared Folder.
* You can find the Samba server (and QEMU shared folder) in Windows 2000 by searching for a computer named "10.0.2.2" (as long as the Samba server is on the QEMU Linux host), e.g. Start -> Search -> Files or folders -> Computers, then search for "10.0.2.2". Alternatively, if the Linux host has a configured network card, you can search for the IP address of the card. If the Samba server is on a different box, search for the IP address of that box.
I am using QEMU to run Windows 2000 on Linux & I have set up the SMB server successfully. How do I map My Documents to the Linux file system?
* Create a dir inside your SMB shared dir (on Linux), e.g.:
mkdir $HOME/share/mydocs
* Map your QEMU shared folder (in Windows) to a drive letter (e.g. E:).
* Right click My Documents (in Windows), click Properties, in Target enter "E:\mydocs", click OK.
I am using QEMU to run Windows 2000 on Linux & I have a HP LaserJet compatible printer connected to the parallel port of the Linux host. How do I get Windows printing to this printer?
Just share the Printer on Linux and set up a networked printer on Windows. Same way as you would share any networked printer.
Specific step by step instructions using CUPS below (even though this doesn't belong here):
* Make sure the CUPS package is installed on your Linux system. For lots of extra print drivers, also install the packages: GIMP-Print & Foomatic/hpijs.
* Edit the file "cupsd.conf" on the Linux system (this may be in /etc/cups on some systems) and modify the <Location /> section as follows:
<Location /> Order Deny,Allow Deny From All Allow From 127.0.0.1 Allow From 10.* </Location>
* Enable the CUPS server using your Linux services admin program.
* Reboot.
* Using a web browser on the Linux system, go to the following URL: http://localhost:631/
* Click Administration (enter the username & password for "root"), Click Add Printer, Enter Name (e.g. "HPLJ"), Click Continue, Select "Parallel Port #1", Click Continue, Select Make (e.g. "HP"), Click Continue, Select Model (e.g. "HP LaserJet Series CUPS v1.1 (en)"), Click Continue. Exit web browser.
* Start Windows 2000 (e.g. "qemu win2k.img")
* Click Start -> Settings -> Printers. Double Click Add Printer. Click Next. Select "Network Printer", Click Next, Select "Connect to a Printer on the Internet or your intranet", Enter URL (e.g. "http://10.0.2.2:631/printers/HPLJ"), Click Next, Click OK, Select a PostScript printer (e.g. "Apple LaserWriter v23.0"), Click OK, Click Finish.
Note: CUPS accepts print jobs in the PostScript format & converts them to the format that your printer understands. This is why the print driver in Windows must be for a PostScript printer. Apple LaserWriter is usually a safe choice for this.
I tried running QEMU with a CD-ROM but it says it can't boot!
Linux/BSD hosts
The correct syntax for booting a CD-ROM with QEMU is documented, and also in the qemu man page. To avoid seeing this question repeated in the channel, we'll give the answer here.
If your CD-ROM device is /dev/cdrom, use:
-cdrom /dev/cdrom -boot d
Make sure you aren't mounting the CD-ROM. Use the device file, not a directory.
If using an image of a CD-ROM, make sure it's an ISO. Other CD-ROM image formats such as bin/cue aren't supported. The bchunk tool can convert bin/cue to ISO. Trying to boot from an image that is accessed through a network can also cause problems, it's safer to copy the image first.
If using a raw device file, make sure the permissions are set so that you're able to get read access to the device. Or, run QEMU as root if you're too lazy to do that.
Windows host
The format to access the CD-ROM for Windows hosts is not officially documented. Please include information here if you have any. For the device name, use the name of the drive without the trailing backslash.
As statedhere, the author speaks of calling the option
-cdrom "\\.\<LETTER_OF_DEVICE>"
So for example, when Your host computer is Windows XP and your CD-ROM has the letter D: You want to start QEMU with an existing hda image (called hda.img) and boot of CD in CD-ROM, use the following command:
qemu.exe -L . -hda hda.img -cdrom "\\.\D:" -boot d
That's it. Don't forget to use the quotation marks around the option.
If you receive the error "qemu: could not open disk image \.<LETTER_OF_DEVICE>:", then try formatting the above command like so:
qemu.exe -L . -hda hda.img -cdrom "D:" -boot d
Note: don't forget the -m option to give your virtual machine enough memory. Many modern Linux installers require at least 384MB.
How is QEMU pronounced?
Quem, Q-M, Q-M-U,
Why the name QEMU?
QEMU apparently stands for Quick Emulator.
How can I use multiple CD-ROM drives with QEMU?
Hopefully you wouldn't need to. Just eject the CD-ROM from inside of QEMU and change it.
A workaround for those who must have 2 CD-ROMs visible at the same time is to use vvfat. Mount one of the CD-ROMs, and pass it as a hard disk via -hdd fat:/mnt-point. These will look like hard disks to the guest OS, and thus are not removable.
If you must have multiple real CD-ROM drives in QEMU, a patch for that can be found here.
How do I get to the monitor?
This is documented elsewhere. Press Ctrl-Alt-2 to get there, and Ctrl-Alt-1 to get back. If the host OS is not Windows, it is recommended that you pass "-monitor stdio" to QEMU which makes this unnecessary.
If I use -nographic mode, where does the output go?
This is actually documented elsewhere, but the documentation isn't very clear on this point (hard to understand), so I'll repeat it here.
It goes into the bit bucket. Into /dev/null. Into the black void of outer space. Yes, the output gets thrown away and doesn't go anywhere.
-nographic mode is intended to be used for debugging OSes (mainly Linux kernels or Linux/GNU systems) which would run the system console on the serial port if they were running on real hardware.
In other words, if the OS doesn't use a serial console, you don't want -nographic. (One person attempted to run a graphical (GUI) OS in -nographic mode by taking snapshots of it every minute to see where things were and the sendkey command in order to interact with it. This is not recommended.)
If you don't have graphics available (for example via ssh), there is an unofficial patch that provides a curses alternative to SDL. Another option, if you have a Unix-like operating system (Linux, *BSD) and don't want to patch QEMU, is to configure it to redirect its output to the serial console. A HOWTO is available at http://www.tldp.org/HOWTO/Remote-Serial-Console-HOWTO/.
Do I need to install sdl-devel packages (e.g. the SDL header files)?
If you want to compile QEMU from source, then you must. This is required. If you are using a binary package however, then it's not necessary (but it doesn't hurt either).
How do I eject/change a floppy disk/cdrom in QEMU?
In the monitor, the "eject" command will remove the disk. The "change" command will insert a new one.
If you are changing real disks (e.g. QEMU is using the host CD-ROM drive and you are changing physical CD-ROM disks) then it is recommended that you eject the CD-ROM from QEMU, and then change physical CD-ROM disks, and then use the "change" command in the monitor to reinsert the host CD-ROM disk. Example:
eject ide1-cd0 (swap disk) change ide1-cd0 /dev/cdrom
If you are using Windows and the above doesn't work try this: Open up My Computer. Right click on CD Drive(D:) and click Eject. Now double click on CD Drive(D:). It will ask you to insert a CD. Switch to the QEMU monitor and eject your old CD and load the new one:
eject ide1-cd0 (change physical cd if you're using one) change ide1-cd0 <iso file or /dev/cdrom>
Now Windows should load the new CD. For QEMU 0.9.0 and older, the CD-ROM device is named cdrom. For a list of name of the available block devices, use the "info block" command.
How do I use vvfat?
Specify "fat:[directory_name]" in place of a file name for one of the emulated hard disks. E.g.
qemu -hda boot.img -hdb fat:/tmp/sambafs
When I start QEMU, I don't get any output! It just sits there doing nothing and taking up CPU. What's wrong?
Make sure that you had the SDL development packages installed when you first compiled QEMU, or else there will be no graphical output. (The output from the configure script should include a line such as "SDL Support Yes"). If this is from a binary package you downloaded, notify the package maintainer.
I tried to compile QEMU with GCC 4 but I get a lot of weird compiler errors. Same happens if I try to use GCC 2. How can I fix this?
Good luck. GCC 2 should work fine but some older versions have problems with register allocation. It is recommended to use GCC 3 (specifically GCC 3.3 or 3.4) to compile QEMU. GCC 4 has significant changes to the way it structures the code it generates. This makes it incompatible with the way QEMU handles dynamic translation of guest machine codes, and this is really difficult to work around. A long term solution known as qop is in the works, but for now just use GCC 3 to compile QEMU.
If you really want to try making GCC 4 work with QEMU, see this thread, which includes several patches that you can use to try make this work. Note that GCC 4 may still have register allocation problems (amd64 should have no issues but 32-bit x86 will). See this bug for more information. This can be worked around by disabling the use of global register variables in QEMU, but this has a significant performance hit. Using GCC 3 is strongly recommended.
A collection QEMU/GCC 4 patches is available here.
A more recent work in progress in proposed here, which tries to force GCC 4 to behave more like GCC 3.
How to switch between emulated system mouse and local system mouse?
Clic on the QEMU window to control the emulated system mouse. To exit, hit "Control+Alt" keys.
Is it possible to remap the hotkeys, such as Ctrl-Alt, to something else?
You can start qemu with the -altgrab parameter. This will change the Ctrl-Alt hotkey to the Ctrl-Shift-Alt hotkey. This is usually enough for context switching from X11 to a VTY in a guest.
When I run QEMU, the mouse doesn't work. I set everything else right, and everything else works, but the mouse doesn't. The mouse pointer is either not there, frozen, stuck at the right border or hidden in the bottom right corner of the screen. I am using SDL-1.2.8 with QEMU.
Try doing "SDL_VIDEO_X11_DGAMOUSE=0 qemu [parameters]", or doing "export SDL_VIDEO_X11_DGAMOUSE=0" or "setenv SDL_VIDEO_X11_DGAMOUSE 0" (depending on if you use the bash shell or the C shell) before running QEMU.
How can I get Windows keys in QEMU? Such as the Start Menu key or the Right-Click-Menu key?
QEMU doesn't support this by default. Note that you can use Ctrl-Esc for the Start Menu instead, and you can use "sendkey menu" in the monitor to get the Right-Click Menu button. If you can not live without these keys, you can try this patch. A patch that will allow you to send the Start Menu key via the sendkey command in the monitor is here. The key is called "windows", so you invoke it as "sendkey windows".
How do I resize a disk image?
!!! Back up your disk image before trying the below !!!
If you are using a sparse raw image, then do "dd if=/dev/zero of=hdd.img seek=N obs=1MB count=0"
where hdd.img is the raw format image that you want to resize and N is the new size that you want the image to be, in megabytes. To change the units of N, change obs to something else such as 1GB for units in gigabytes (1000x1000x1000).
If you want to resize a raw image but you do not want it to become sparse (you actually want those zeros in the file) then do "dd if=/dev/zero of=image seek=S count=N-S obs=1" instead, where N is the new size and S is the old size (in bytes).
If you want to resize a qcow2 image, this is not yet supported.
this email shows some experimenting with resizing qcow images with a hex editor.
Resizing or growing images in other formats (VMware, Bochs, cow, or cloop) is not supported to the best of my knowledge.
On a Windows host it is possible to resize a raw format disk image using the 'copy' command. You can use qemu-img to convert your existing image to raw format if need be. We will use a temporary raw format disk image that will be appended on to the end of your existing raw format disk image. The size of this temporary image is the size the existing image will be expanded by:
qemu-img create -f raw temp.img 300M
You should then issue the below command - orig.img is your existing raw format image that you want to make larger, temp.img is the temporary image file created earlier, and new.img is the resized resultant image:
copy /b orig.img+temp.img new.img
You will then need to repartition and resize the existing partition(s) and filesystem(s) on the new image. One method of doing this is to boot gparted in QEMU with the gparted livecd iso and the new disk image.
NTFS Users:There is an excellent walkthrough that explains resolving around boundary limit issues (i.e., extending through 1, 2, 4, and 8GB boundaries) atFugitive Thought. If you are resizing images containing NTFS partitions, this walkthrough will save you quite a bit of time.
How can I loopback mount a qemu created disc image (raw format)? How should I mount the second partition?
There are several ways of achieving this. The easiest is to use the tool kpartx which will map the included paritions onto several device-mapper targets. A quick introduction into using this tool can be found at Mounting a disk image containing several partitions.
Can I run my OS on /dev/hda1 in QEMU?
Short answer: No. QEMU does not support creating a partition table/MBR on the fly. You need to use "/dev/hda" (e.g. the entire hard disk).
Note: An experimental patch has been released that adds this functionality. You need to pass "-hda part:/dev/hda1" instead of "-hda /dev/hda". QEMU will then create an MBR and partition table on the fly for /dev/hda1. Changes to the MBR or partition table are lost when restarting QEMU.
Long answer: It is possible to run an OS from /dev/hda1 but this is only for the advanced user who understands what a partition table looks like. Basically, this means you have to use /dev/hda1 as a disk image and set up an MBR and a partition table on it. Naturally, this means you can not use run this OS when booting your computer for real. Also, some OSes may be able to boot off of a hard disk directly, instead of just a hard disk partition (e.g. Linux with "root=/dev/hda").
Can I run my Windows on my /dev/hda in QEMU?
Short answer: Probably not.
Long answer: Once installed, Windows has only the minimal drivers required to boot the hardware on your computer - which happens to be completely different from what QEMU emulates. Windows 9x has enough problems with this, but Windows NT is especially fickle. You may be able to boot Windows 95 or 98 work from QEMU this way (there have been a few reports of success), but if you want to try we can not help you. You are better off installing Windows into a disk image. Windows XP Home or Windows XP Professional also has issues related to hardware activation.
If you really really want to try to set up Windows XP or Windows 2000 to be able to boot on both your real hardware and on QEMU, try looking at You receive a Stop 0x0000007B error after you move the Windows XP system disk to another computer and How to Move a Hard Disk with Windows 2000 Installed to Another Computer, which explains part of the problem in greater detail as well as some possible workarounds. This is for really advanced users only. If you don't understand what this article says, or if you follow its instructions but they don't work for you, do not come to us for help. We probably won't know any more about the problem than you. Note: If you try this with XP Home or XP Professional, you will be required to re-activate XP.
Graham ( kidsquid@grahams.idps.co.uk ): Actually, I have success in running all but XP (including NT and 2000). The trick is to run up the OS as normal (not in QEMU) then add a hardware profile (in system properties somewhere) maybe call it QEMU. Now shutdown and boot the host OS, then run up QEMU (in -snapshot to start just in case) pointing to the guest hdd (/dev/hda in this case). You get an extra screen during boot which allows you to select a hardware profile (the QEMU named one) and boot normally.
You can now boot either direct from powerup or inside QEMU selecting the correct profile.
The only trick I haven't tried is to install XP inside QEMU but onto the HDD then doing the trick the other way round.
adrian15 ( adrian15 THEROUNDTHING raulete DOT net ). I've tried to migrate a real w2k pro disk to a QEMU one. I've tried the "Add a Hardware profile" method, nothing. I've tried the "Remove all the devices except ide one" method, nothing. I haven't tried the Microsoft recommendations because they are Windows XP specific. If anyone has any other workaround to make the moving of w2k disk possible please tell it.
Can I use my USB devices with the guest operating system in QEMU?
It depends. Initial support for USB device proxy and emulation is now available in QEMU 0.8.0. From Fabrice Bellard's email to the QEMU developers list:
I just committed an initial USB support for QEMU. This USB layer will ultimately enable QEMU to use some host USB devices and to simulate USB devices. WARNING: the current USB support is for USB hackers only - it is not meant to be fully usable yet.
Please see: http://lists.gnu.org/archive/html/qemu-devel/2005-11/msg00062.html
Flash drives have been reported to work. Things such as USB cameras will not work yet, as the USB support does not relay isochronous operations yet (but this is pending).
Experimental patches for Windows and FreeBSD host USB device support at:
If your guest OS is Windows, Keyspan makes a USB hub that is accessible via Ethernet. In the real world, you would use this to let your PC use a USB device that is located elsewhere in your building via Ethernet instead of running USB cables (and repeaters) down the hall. I'm just guessing here, but a Windows guest ought to see this device and its connected USB devices if you bridge your virtual LAN to your real LAN. (If you try this and it works, please post the info here!)
I try usb_add with a valid device but the console prints "Could not add USB device 'host:x.xx'"
There are two possible reasons for this happening. One being that QEMU only binds to a single interface on a host USB device at the moment. To tell if this is the case launch QEMU from a terminal and perform the usb_add command. If you see "usb_host: only one interface supported" then this is the case. One method of bypassing this is to allow QEMU to bind all available interfaces on USB devices. A patch for this is linked here:
http://gnome.dnsalias.net/patches/qemu-multi-configs.diff
The second reason has to do with permissions. Your user must be able to access usbfs which is typically mounted at /proc/bus/usb. Please see this linked article on the QEMU user forums:
http://qemu-forum.ipi.fi/viewtopic.php?t=1434
In reference to http://www.qemu.org/qemu-doc.html#SEC30: When will the bug in QEMU be fixed so I can use my Win XP?
The cause of the bug itself is not yet known, so that is hard to say. However, a workaround already exists. In safe mode, you need to install a service pack for XP. Then reboot, and the problem should go away. Since there is no network while in safe mode, it's recommended to download the full installation of SP1 or SP2 and transfer that via an ISO or using the vvfat block device ("-hdb fat:directory_which_holds_the_SP").
How do I load a USB flash drive emulating it as the HDA so I can boot from it? (in Windows)
On Windows XP/2K you can try to boot from the flash drive like so: qemu -hda //./PhysicalDriveN ... where N is the drive number found in the disk manager.
Can I run X86 Mac OS X in QEMU?
Sort-of. Doing so will likely violate The Mac OS X End User License. QEMU does not emulate X86 Mac hardware, however some people have reported success hacking OS X to run on regular PC hardware (ie. qemu).
Can I run Mac OS X in qemu-system-ppc?
At the time of this writing, it doesn't completely work yet. Darwin/PPC does work. Note that this has the same legal issues as X86 OS X.
Does any PPC Mac OS prior to Mac OS X work in QEMU?
No. Try PearPC.
Where can I find drivers for the graphics card for Windows NT 3.51?
Here. These also include drivers for Windows NT 4.0 I'm told.
Thanks to "Payphone Ed" for locating the above link.
How do I create a hard disk image? Do I have to know about cylinders/heads/sectors per track?
Generally, no. qemu-img should allow you to easily create a new disk image for use with QEMU (or other virtual machines). See also "man qemu-img" for information on its use and for information about alternative disk image formats.
For those who are inquisitive see this link. It is a step by step tutorial for creating raw floppy and hard disk images, including an explanation on how to calculate the size from a given cylinder/head/sector combination or vice versa. This should apply to any format QEMU supports, not just raw format disk images.
How can I access COM1 (host device /dev/ttyS0)? I'd like to use my external modem from within QEMU.
This works fine since QEMU 0.8.0, see the man page (or just see below - it wasn't changed from the original patch) for the syntax.
For Windows based hosts this support was not added until QEMU 0.8.1. Please see this for the syntax to use on Windows host.
Linux/BSD host - if you are having problems with serial data being corrupted please try the linked patch here. afaik it has not been applied as of yet.
For older versions of QEMU: The guest serial port is emulated: the output goes into the console or a pseudotty. You can use this to your advantage, by writing a program that feeds what comes out of the pty into the host serial port and what comes out of the port into the pty. No one has publicly contributed such a program (that we're aware of) but it is fairly trivial to write.
If you insist on making QEMU do all the dirty work, see this message. This makes "-serial /dev/ttyS0" actually do what you'd expect (only for Linux hosts now). Note that this isn't the only available serial port patch, there are several others in the qemu-devel archives.
How can I access my PRiNter (host device /dev/lp0 or /dev/parport0)? I'd like to use my LPT scanner, but it requires Windows software so I have to use it from inside of QEMU.
Versions of QEMU since 0.8.0 support host parallel port access, but they expect to use /dev/parportN. From the qemu man page:
/dev/parportN [Linux only, parallel port only] Use host parallel port N. Currently only SPP parallel port features can be used.
The name of the device is important.
Why does QEMU not compile on my hardened GCC?
Many "hardened" systems (eg. SSP/ProPolice) interfere with the way QEMU does dynamic code generation. The general solution is to disable these systems for QEMU. The QEMU design involves generating and running code on the fly, so it's unlikely these would provide any meaningful protection anyway.
For example on a hardened Gentoo box (hardened toolchain, pie/ssp).
Dyngen failed with this error: dyngen: unsupported i386 relocation (10)
To work around this, you'll have to switch to a non-hardened GCC. In Gentoo this can be done with:
gcc-config -l (shows you a list of available cc) gcc-config i686-pc-linux-gnu-3.3.6-hardenednopiessp (use the correct version) source /etc/profile emerge qemu-cvs gcc-config i686-pc-linux-gnu-3.3.6 (use the correct version) source /etc/profile
It might be necessary to exclude the QEMU executables from PaX-protection, too.
Similar problems (and solutions) have been experience on OpenBSD.
How can I transfer files between host and guest OS?
Using TFTP
You can transfer files to a QEMU guest from the host with the built in TFTP server. Run QEMU as so :
qemu -hda hdd.img -m 256 -tftp /
Now, in you guest OS, install a TFTP client. You can connect to the QEMU TFTP server at 10.0.2.2 in the guest. Make sure you use binary mode.
If you are using a GNU/Linux system, install the TFTP client and issue the following command :
cd [directory you want to download files to] tftp -m binary 10.0.2.2
tftp> get [path to file to download]
Files are limited to 32 MB, and you cannot upload files via TFTP from the guest OS to the host.
Using mtools to modify FAT filesystem images
When your target OS runs with a FAT filesystem (including VFAT32) and you use a raw disk-image format you can use mtools.
ATTENTION: Never use the mtools, while QEMU is running! Use it only before or after the system was running!
Use something like the following line in your /etc/mtool.conf:
drive h: file="/var/local/img/FreeDos.img" partition=1
(The drive letter needn't be the same as used in the system, but it has to be unique in the config file.)
Then you can use the mtools commands like this:
mcd h: mdir mcd temp mcopy * h: mcopy "h:*.*" .
and so on...
Using lomount
Note: This section is incomplete, look for documentation for "lomount" on the web.
If the filesystem of the guest is NTFS, you have several different options when using lomount. The current Linux kernel driver for NTFS supports full reading, so you can copy files from the guest to the host easily. Write support is limited (can't change the file size as of yet, no renaming etc w/o use of special utilities). ntfsmount, a FUSE driver, is included in ntfs-progs (written by the same hackers who write the kernel driver), which has significantly better support for writing. (something like 90% chance of success for renaming, 50% for enlarging a file, etc)
Using fsimage
As an alternative to using mtools (which requires MS-DOS filesystems) or lomount (which requires loopback support and root permissions), one can try fsimage, which is a tool that allows one to copy files from a disk image to the host or from the host to the disk image. Additionally, fsimage supports qcow, VMware disk formats, and every other disk image format supported by QEMU.
Note: captive-ntfs supports full read/writing, but requires MS Windows drivers.
How can I copy/paste text or small files to/from the host/guest?
Most methods for doing this work via the network - perhaps one of the best so far is QEMU guest tools. It supports Linux or Windows guests on a Linux host machine - see here. To use this make sure in the guest you give as the IP 10.0.2.2 if you're using user-net networking (the default) and for the host-linux client give as the IP the loopback interface (127.0.0.1).
Another network based copy/paste tool is called Share Clip which can be found here. It claims to support Unicode characters among other things.
A third network based copy/paste tool is called The Network Clipboard found here.
Finally, for those without network access in the guest, there is this. It allows you to copy the current guest console (text only) to a text file on the host via a hotkey (Ctrl-Ins). The parent poster implemented a method for copying the console text to a Windows host's clipboard.
Can I use QEMU to install a Linux distro onto the hard drive (e.g. /dev/hda1) using the install iso files?
Yes.
Remember to use -hda /dev/hda and not -hda /dev/hda1 (unless you that is what you want - but if you are not sure, then it is definitely not what you want).
Help! /usr/bin/ld: qemu-i386: Not enough room for program headers
This has been fixed in recent versions of binutils (2.18, maybe 2.17).
See http://lists.gnu.org/archive/html/qemu-devel/2005-11/msg00317.html for a workaround for older linkers.
If you get an error about undefined reference to `_SDA_BASE_' then you also need to get a patch for the ld linkder script. 50_ppc_ldscript.patch for 0.7.0 and http://debian.fastweb.it/debian/pool/main/q/qemu/qemu_0.8.0-1.diff.gz for 0.8.0
How do I read the man pages from Windows?
Get man2html and convert them yourself. Or see linux.com.hk/penguin/man/1/qemu.html for an online version.
How do I use the new USB tablet support (grabless mouse)?
The options "-usb -usbdevice tablet" are enough to make this work. Windows guests should detect the USB device and automatically install the correct hardware.
For guests that use XFree86/X.Org you will need to get the evtouch driver. A modified version exists that supports the middle button as well as scrolling. These will also be available in the next official release of the evtouch driver. See this link for more details.
Can I use my PCI devices with the guest operating system in QEMU?
Short answer: No.
Long answer: This generally requires cooperation from the guest OS/drivers (Like with Xen). Developers might be interested in the patch posted to the qemu-devel mailing list a while back which allowed for limited PCI proxy support on Linux hosts. You can find this here:
http://lists.gnu.org/archive/html/qemu-devel/2004-06/msg00360.html
more discussion here: http://lists.gnu.org/archive/html/qemu-devel/2005-03/msg00301.html and here: http://lists.gnu.org/archive/html/qemu-devel/2006-01/msg00082.html
I run QEMU in Xgl and QEMU is transparent!!! What the heck is going on?
This is an SDL bug. Specifically, SDL is using a 32-bit visual provided by Xgl, which causes pixels to be specified in RGBA format. SDL has a bug that makes it (wrongly) specify alpha blending for its windows.
You can work around this by doing 'XLIB_SKIP_ARGB_VISUALS=1; export XLIB_SKIP_ARGB_VISUALS' before running QEMU. This uses an Xlib hack that hides the 32-bit visuals from SDL, forcing it to pick a 24-bit visual instead (these don't support alpha blending so the window can not be made transparent).
Alternatively one can choose to use a GTK patch with QEMU. QEMU on GTK does not have this problem.
Sound is terrible/broken when playing games in Win9X!
The best hardware emulator for games seems to be the 1370. Run qemu with "-soundhw es1370", and install the driver from here. (To Install - go to Start/Settings/Control Panel/System/Device Manager, double click on the ailing PCI audio device, and Reinstall Driver. Now breathe.)
The default settings don't work, so you need to go back into Control Panel/Multimedia, and hidden in playback's Advanced Properties button, there's a Performance tab that lets you turn down Hardware Acceleration. Drop that to the floor!
It's also a good idea to go back into Device Manager and disable the Sound Blaster that you probably still have hanging around.
I'm having trouble getting sound to work with ALSA output method
Make sure you have a sane asound.conf and/or ~/.asoundrc file for your host system.
You might see error messages like:
alsa: Could not initialize DAC alsa: Failed to set period size 1024 alsa: Reason: Invalid argument alsa: Could not initialize DAC alsa: Failed to set period size 1024 alsa: Reason: Invalid argument audio: Failed to create voice `es1370.dac2' alsa: Could not initialize ADC alsa: Failed to set period size 1024 alsa: Reason: Invalid argument Could not initialize ADC alsa: Failed to set period size 1024 alsa: Reason: Invalid argument audio: Failed to create voice `es1370.adc'
if you don't have a proper configuration set up for your sound card. Can also try tweaking the QEMU audio options for ALSA. These are environment variables that you can find from the qemu -audio-help listing.
See the example asound configuration files at the soundcard configuration matrix and the ALSA wiki.
An example run of QEMU with audio support:
export QEMU_AUDIO_DRV=alsa export QEMU_ALSA_DAC_PERIOD_SIZE=1024 qemu -hda winxp.img -kernel-kqemu -no-acpi -localtime -soundhw es1370
Is it possible to use 3D-acceleration in the guest OS?
Currently not. Recently, work has been done on an OpenGL proxy that works with a Linux host and Linux guest/Windows guest configuration. See:
http://lists.gnu.org/archive/html/qemu-devel/2006-11/msg00144.html
This code is now being posted in the "Patches" section of the QEMU user forums. It is still considered experimental, but is able to run Google Earth with reasonable performance.
These are some possible solutions for the problem, but they have to be implemented by someone:
* you code a Direct3D to OpenGL converter for the guest OS and add an interface to QEMU which can pipe the OpenGL commands to the SDL layer of the host (you could somehow borrow on the Wine code base for this)
One such example is the DXGL Wrapper (Supports only DirectX 8.1):