4 - Needs to set net.link.tap.user_open sysctl in order to use /dev/tap*
5 networking as non-root. Don't forget to adjust device node permissions in
8 - slirp (usermode networking) is fixed now in cvs, on FreeSBIE 1.0 guests you
9 still have to manually do: echo nameserver 10.0.2.3 >/etc/resolv.conf but
10 i've been told that that's normal. (fixed on FreeSBIE 1.1.) And you have
11 to wait a bit for dhclient to do its thing; traffic to address 10.0.2.2 is
12 routed to 127.1 on the host.
14 - Expect timer problems when guest kernel HZ is > hosts, for example time
15 sleep 1 takes 49 seconds and booting sleeps for minutes at the acd0 probe
16 with a FreeSBIE 1.0 guest, thats because its kernel is built with HZ=5000,
17 and FreeBSD's default is 100... (no longer a problem with FreeSBIE 1.1.)
18 The linux 2.6 kernel uses 1000 by default btw. (changed to 250 later, and
19 recent linux kernels now no longer have a fixed HZ, aka `tickless
20 kernel'...) Enabling /dev/rtc doesn't seem to help either (not included
21 since it needs a patch to emulators/rtc.)
23 - Update: the above problem has gotten worse with FreeBSD guests
24 somewhere before 8.0, mainly since the kernel now usually wants
25 double or even quadruple number of timer irqs compared to HZ if
26 it detects an apic (and at least early versions of FreeBSD 8 had
27 a bug that essentially halved qemu's clock rate too); the only
28 reason you usually don't see symptoms of this with FreeBSD 8
29 guests is they automatically reduce their HZ to 100 when running
30 in a VM while the default for the host kernel is still HZ=1000.
31 Workaround: you can disable the apic clock in the guest by setting
35 in loader.conf(5) (or manually at the loader prompt), if that
36 doesn't work the only things you can do is either reduce the
37 guest's HZ to, say, 100 by setting e.g.
41 from the loader as above (which usually is a good idea in a VM
42 anyway and FreeBSD 8 now does by itself as mentioned), or otherwise
43 increase the host's HZ to 2000 or even 4000 from the loader in
46 - The -smb option (smb-export local dir to guest using the default
47 slirp networking) needs the net/samba36 port/package installed
48 in addition to qemu. (SAMBA knob.)
50 - If you want to use usb devices connected to the host in the guest
51 yot need either recent 10-current (not tested yet much) or you can
52 use usbredir over the network (see below); also unless you are
53 running qemu as root you then need to fix permissions for /dev/ugen*
54 device nodes: if you are on 5.x or later (devfs) put a rule in
55 /etc/devfs.rules, activate it in /etc/rc.conf and run /etc/rc.d/devfs
56 restart. Example devfs.rules:
59 add path 'ugen*' mode 660 group operator
61 corresponding rc.conf line:
63 devfs_system_ruleset="ugen_ruleset"
65 - If you want to test the new (in 0.15.0) usb network redirection (USBREDIR
66 option) see this thread by Hans de Goede <hdegoede <at> redhat.com>:
68 http://thread.gmane.org/gmane.comp.emulators.qemu/110176/focus=110183
74 1) Start usbredirserver for a usb device:
75 sudo usbredirserver 045e:0772
76 2) Start qemu with usb2 support + a chardev talking to usbredirserver +
77 a usb-redir device using this chardev:
79 -readconfig docs/ich9-ehci-uhci.cfg \
80 -chardev socket,id=usbredirchardev,host=localhost,port=4000 \
81 -device usb-redir,chardev=usbredirchardev,id=usbredirdev ...
83 [you would replace docs/ich9-ehci-uhci.cfg with e.g.
84 /usr/local/share/doc/qemu/docs/ich9-ehci-uhci.cfg, but turns out
85 ehci was broken for me here with FreeBSD guests and the previous
86 qemu version at least, I got:
88 FETCHENTRY: entry at 22C5484 is of type 2 which is not supported yet
89 processing error - resetting ehci HC
90 Assertion failed: (0), function ehci_advance_state, file /data/ports/emulators/qemu-devel/work/qemu-0.15.0/hw/usb-ehci.c, line 2045.
92 The new qemu version works better tho.]
94 - Still usb: since the hub is no longer attached to the uchi controller and
95 the wakeup mechanism, resume interrupt is not implemented yet linux guests
96 will suspend the bus, i.e. they wont see devices usb_add'ed after its
97 (linux') uhci module got loaded. Workaround: either add devices before
98 linux loads the module or rmmod and modprobe it afterwards. [Not sure
99 if this still applies to the new libusb host code used on recent
102 - If you get repeated `atapi_poll called!' console messages with FreeBSD
103 guests or other weird cdrom problems then thats probably because the guest
104 has atapicam loaded, which for reasons still to be determined has problems
105 with qemu's now by default enabled cdrom dma. You can build the port with
106 CDROM_DMA disabled to disable it. [Looks like this is fixed in recent
107 FreeBSD guest versions.]
109 - If you build qemu wihout SDL and then get crashes running it try passing it
110 -nographic. This should probably be default in that case...
112 - qemu's network boot roms (-boot n) have a bug when bootfiles sizes are a
113 multiple of blksize, if this affects you (like with FreeBSD's /boot/pxeboot)
116 cp /boot/pxeboot pxeboot-qemu && chmod +w pxeboot-qemu && echo >>pxeboot-qemu
118 and then use pxeboot-qemu. Actually you need recent btx code
119 (from after 7.0 was released) because of the real mode boot
120 problem, so use at least pxeboot from there. And I just did that
121 for the pxeboot extracted out of
123 ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/200805/7.0-STABLE-200805-i386-bootonly.iso
127 http://people.freebsd.org/~nox/qemu/pxeboot-qemu
129 - If you use slirp (usernet, the default) and want to mount nfs into the guest
130 and you are not running qemu as root, then mountd(8) on the exporting box
131 needs to be run with -n in order to accept requests from ports >= 1024.
133 - (not FreeBSD-specific:) There have been reports of qcow2 corruption with (at
134 least) win2k guests on recent kvm (which uses similar qcow2 code than qemu
135 now, see this thread:
137 http://lists.gnu.org/archive/html/qemu-devel/2009-02/msg00713.html -
139 the consensus on that thread seems to be that qcow(2) code has always been
140 experimental and you should use raw images if you want reliability; raw is
141 also usually faster.) You should be able to migrate existing images to raw
142 using qemu-img(1)'s convert function; raw doesn't support advanced features
143 like snapshots tho. [a few important qcow2 bugfixed have been committed in
144 the meantime so this _might_ be less of an issue now; and meanwhile there
145 also is the new qed format - I don't know how stable that one is.]
147 - (also not FreeBSD-specific:) It is recommended to pass raw images using the
148 new -drive syntax, specifying format=raw explicitly in order to avoid
149 malicious guests being able to exploit the format autodetection thats
150 otherwise getting used. (Not that you should run malicious guests anyway,
151 but this eleminates at least a known attack vector.)
153 - qemu now has improved physical cdrom support, but still there is at
154 least one known problem: you need to have the guest eject the disc if you
155 want to change it/take it out, or otherwise the guest may continue using
156 state (like size) of the old disc. (You can also do like `change ide1-cd0
157 /dev/acd0' in the monitor after taking out the disc if a guest cannot eject
160 - The default configuration location (qemu-ifup script etc.) has been changed
161 from /etc to PREFIX/etc (usually /usr/local/etc). Move your files
164 - The pcap code (-net nic... -net pcap,ifname=...) should work properly now,
165 with only one exception: Advanced features like TSO used on the host
166 interface can cause oversize packets which now do get truncated to avoid
167 confusing/panicing guests but of course still will cause retransmissions.
168 So if you see slow throughput and `pcap_send: packet size > ..., truncating'
169 messages on qemu's tty try disabling TSO etc on the host interface at least
172 - kqemu is no longer supported in qemu upstream after the 0.11 branch
173 was created, which means also not in this version. (Linux has moved
174 on to kvm now for qemu(-like) virtualization needs, so if you want qemu
175 to go faster and don't want to switch to virtualbox or stick to the older
176 emulators/qemu port which is at 0.11.1 atm and as such still supports
177 kqemu you should help getting the FreeBSD kvm port updated and
180 http://wiki.freebsd.org/FabioChecconi/PortingLinuxKVMToFreeBSD