Gentoo Archives: gentoo-user

From: Bill Kenworthy <billk@×××××××××.au>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: qemu not working on a P3M
Date: Mon, 09 Jul 2012 05:52:41
Message-Id: 1341813060.3053.16.camel@troll
In Reply to: Re: [gentoo-user] Re: qemu not working on a P3M by "wdk@moriah"
1 On Sun, 2012-07-08 at 07:19 +0800, wdk@moriah wrote:
2 > if I try and use qemu-386 it has limited cmd line options according to -h, and barfs on any of the normal options such as -cdrom - hence my feeling its missing a wrapper.
3 >
4 > thanks, might have to do git to see if its different.
5 > BillK
6 >
7 > On 07/07/2012, at 22:32, walt <w41ter@×××××.com> wrote:
8 >
9 > > On 07/07/2012 07:14 AM, walt wrote:
10 > >> Qemu supplies two different binaries: one you can run as an unprivileged
11 > >> user (usually named qemu-i386 or whatever) and another that needs special
12 > >> privileges (usually named gemu-system-i386 or whatever).
13 > >
14 > > I just remembered that installing the git version actually does give you
15 > > a binary named 'qemu' but I never understood how that relates to the other
16 > > two binaries, so I've never used that one either :)
17 > >
18 Solved - might help others ...
19
20 Thanks Walt for the hints.
21
22 Most of the gentoo/qemu guides are seriously out of date and
23 semi-useless.
24
25 You need certain kernel features enabled, otherwise qemu will just
26 silently give you very limited set of options and basically wont run,
27 and wont tell you why. Which options ... I just turned on everything
28 with VM in it.
29
30 You need the following in make.conf:
31 QEMU_SOFTMMU_TARGETS="i386"
32 QEMU_USER_TARGETS="i386"
33 to build x86 only
34
35 qemu-kvm has simple script to start it up:
36 moriah qemu # cat `which qemu-kvm`
37 #!/bin/sh
38 exec /usr/bin/qemu-system-x86_64 --enable-kvm "$@"
39 moriah qemu #
40
41 Other qemu ebuilds dont install a similar script. The qemu-user ebuild
42 installs static builds (or at least they have static in the name - why?)
43 You need to run qemu-system-i386 to start the emulator.
44
45 On a P3M I am using the app-emulation/qemu and app-emulation/kqemu
46 ebuilds - not sure if I need kqemu so that needs testing when I get a
47 guest installed. kqemu needs a user patch on 3.4.4 but builds and
48 inserts ok once patched.
49
50 The app-emulation/qemu-kvm installs but dies on a P3 when you try and
51 run it - needs a cpu with the right VM facilities.
52
53 Oh, and I installed from git to test ... and found it didnt have an
54 uninstall. messy! Makes one appreciate ebuilds/gentoo and devs :)
55 Part of my problem was using vmware and bochs/qemu for years and having
56 legacy ideas on whats required.
57
58 BillK