[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Starting QEMU by PHP/Apache
From: |
Bolle |
Subject: |
[Qemu-devel] Starting QEMU by PHP/Apache |
Date: |
Tue, 13 Oct 2009 13:26:25 +0200 |
Hello
Did anybody had success to start a QEMU instance by a PHP
script under the Apache web server ?
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>)").
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 ?
Andreas
- [Qemu-devel] Starting QEMU by PHP/Apache,
Bolle <=