[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] quick start help after build

From: graff zeltner
Subject: Re: [Qemu-discuss] quick start help after build
Date: Thu, 31 Jul 2014 00:54:18 +0200


Running the command 'which qemu-i386' and 'which qemu-system-x86_64' produces two different versions on my system. I am running Linux kernel 3.14. qemu-i386 resides in /usr/bin and is version 1.70 Debian, and qemu-system-x86_64 in /usr/local/bin is version 1.7.50 which I built from sources about 2 years ago. I've used the same commands for the latest version as I've used for the 1.7.50 version, except that I've added --prefix=/usr/local/bin --target-list="i386-linux-user x86_64-linux-user" and did not test the binary before "make install". The early Debian repo version was broken and had broken/unmaintained dependencies.

I have now changed to the options as you've suggested --target-list="i386-softmmu x86_64-softmmu" and checked for KVM. It turns out that the KVM was not enabled on my system. Here's how to check for that.

grep -E 'vmx|svm' /proc/cpuinfo
lsmod | grep kvm

you should see kvm_intel or kvm_amd with the last digit "1" meaning it is enabled, if you see a "0" it is probably not. modprobe does not work here. You need to enable kvm in the BIOS, which on most systems is disabled by default. Enter BIOS setup and check that virtualization is "enabled". After enabling it on my system using -kvm-enable option allowed me to boot the latest qemu version in about 1 minute. This is really great.

Thanks for all your help.

With kind regards,

Sent: Wednesday, July 30, 2014 at 2:55 PM
From: "Mike Lovell" <address@hidden>
To: address@hidden
Subject: Re: [Qemu-discuss] quick start help after build
On 07/30/2014 12:21 PM, graff zeltner wrote:
> Hi,
> I've built version 2.0.95 with the following sequence of steps:
> 'git clone git://git.qemu-project.org/qemu.git'
> './configure' halted on missing libfdt, so used
> 'git submodule update --init dtc' to fix missing dependency
> './configure --prefix=/home/graf/test/qemu --target-list="i386-linux-user x86_64-linux-user"'
> 'make all' && 'make install'

you probably wanted --target-list to be "i386-softmmu x86_64-softmmu"
and not the linux-user ones. the softmmu targets are the ones that build
the qemu-system-i386 and qemu-system-x86_64 programs. those will match
what you were doing before. qemu-i386 and qemu-x86_64 are for an very
different use case and have a different method of invoking them.

> Now in ~/test/qemu directory I have bin/ etc/ libexec/ share/ and var/ directories with bin/ showing
> qemu-ga
> qemu-i386
> qemu-img
> qemu-io
> qemu-nbd
> qemu-x86_64
> At this point I would have installed in the /usr/local where all these files belong, except I could not
> run the program. Tried quick start document section to no avail.
> The old command sequence did not work.
> 'qemu-system_x86_64 -L . -m 1024 -boot c -hda harddisk.img' -> no such
> file 'qemu-system-x86_64'
> 'qemu-x86_64 -L . -m 1024 -boot c -hda harddisk.img' -> usage
> 'qemu-86_64 [options] program [arguments]'
> The options section (usage help) does not show any "useful" help for
> setting even the basic parameters. Was that the intended
> design decision? Instead we are faced with environment options
> variables which, I am sorry if you did not realize yet, they for the
> most part are gibberish. Viz. there is not a section in the
> documentation that covers them, and the documentation still has
> 'qemu-system-x86_64' where the 'system' keyword has been dropped. You
> have to weed through the entire documentation and examine every
> option, and even then you are not yet ready to set the environment
> options.
> I've tried both qemu-i386 and qemu-x86_64 adding file-descriptor options
> 'qemu-i386 -add-fd fd=3,set=2,opaque="rdwr:/home/graff/harddisk.img"
> or even boot order
> qemu-system-i386 -boot order=nc harddisk.img
> The 'usage options' for example do not echo 'invalid or unrecognized option'. Every attempt brings you back to the same
> useless options menu
> At this point, it appears to me the program failed, but what is worse
> the developers failed. You have just bought yourself a brand spanking
> new car, the dealer handed you the keys, and you cannot open the car
> door or find where the ignition key gets inserted.

it may appear the program has failed but it hasn't and neither have the
developers. every thing you have been describing sounds like it has been
behaving as the developers intended but only appears to be broken due to
a mis-understanding.

for your original problem of the virtual machines being slow, i would
recommend adding the --enable-kvm to you qemu-system-x86_64 or
qemu-system-i386 commands. i am assuming that you are using a linux
system to run qemu on. using --enable-kvm will enable qemu to use the
kvm kernel module to accelerate the performance of the vm. you may need
to make sure that the kvm kernel module and either the kvm_intel or
kvm_amd kernel module are loaded. the user executing qemu-system-x86_64
or -i386 will need permission to read and write to /dev/kvm.

i hope that all helps.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]