From: "François Revol" <revol@free.fr>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Starting QEMU by PHP/Apache
Date: Tue, 13 Oct 2009 15:12:14 +0200 CEST [thread overview]
Message-ID: <1387050533-BeMail@laptop> (raw)
In-Reply-To: <web-1431679@x41.ch>
Hi,
> Did anybody had success to start a QEMU instance by a PHP
> script under the Apache web server ?
see
http://dev.haiku-os.org/browser/haiku/trunk/3rdparty/mmu_man/onlinedemo/haiku.php
>
> I allow the Apache user with the help of sudoers to start
> the QEMU binary as root. I've hacked the "qemu-socket.c"
> to set the access mode to allow communication for the
> monitor socket (only add "chmod(path, <needed file mode
> bits>)").
Though I never neeeded to start it as root. It's probably a bad idea
anyway.
You might also ask the Free Live OS Zoo team, though I think they use
perl:
http://www.oszoo.org/wiki/index.php/Free_Live_OS_Zoo
>
> I'm able to successfully start the QEMU instance from a
> PHP CLI script as the user under which Apache is running
> like "sudo -u <Apache user> sudo <qemu + args>". But when
> I run the same script by the web server, QEMU starts up to
> the BIOS, telling me to press F12 for a start device. The
> "info cpus" tells "CPU #0: pc=0x000f08b5 (halted)".
>
> The full command executed by PHP is:
> /usr/bin/sudo /usr/bin/qemu -L /usr/share/qemu -M isapc -m
> 16 -hda </path/and/name/to/image> -net none -serial none
> -parallel none -vnc :0,password -monitor
> unix:</path/and/name/to/socket>,server,nowait -name "QEMU
> TEST" -pidfile </path/and/name/to/pid> -chroot
> </path/to/image> -runas <service user> > /dev/null &
>
> Any idea about where to look for more information ?
You might want to use a wrapper script instead...
François.
next prev parent reply other threads:[~2009-10-13 13:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-13 11:26 [Qemu-devel] Starting QEMU by PHP/Apache Bolle
2009-10-13 13:12 ` François Revol [this message]
2009-10-14 5:12 ` [Qemu-devel] " Bolle
2009-10-16 4:49 ` [Qemu-devel] Re: [REASON][PATCH-REQUEST] " Bolle
2009-10-20 10:10 ` [Qemu-devel] " Richard W.M. Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1387050533-BeMail@laptop \
--to=revol@free.fr \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).