Upstream QEMU not working with Xen unstable, lacks option definitions
Hi,
I compiled Anthony's QEMU [0]:
./configure --target-list=i386-softmmu --enable-xen --extra-cflags=-I${X}/dist/install/usr/include --extra-ldflags=-L${X}/dist/install/usr/lib
However, this newly generated qemu does not support Xen-specific options such as -domain-name, -vcpus, etc, which makes it unfeasible to be used as device_model.
How to solve this problem? Did I miss anything with configure?
[0]: git://xenbits.xensource.com/people/aperard/qemu-dm.git
Signature · 4 lines
Best regards Wei Liu Twitter: @iliuw Site: http://liuw.name
Quoted 8 lines · Wei Liu
Hi,
I compiled Anthony's QEMU [0]:
./configure --target-list=i386-softmmu --enable-xen --extra-cflags=-I${X}/dist/install/usr/include --extra-ldflags=-L${X}/dist/install/usr/lib
Quoted 7 lines
However, this newly generated qemu does not support Xen-specific options such as -domain-name, -vcpus, etc, which makes it unfeasible to be used as
device_model.How to solve this problem? Did I miss anything with
configure?[0]:
git://xenbits.xensource.com/people/aperard/qemu-dm.git
Please check the recently updated
http://wiki.xen.org/xenwiki/QEMUUpstream -- you need to tell xl (using the "device_model_version" option) that you are using the new qemu, then the toolstack will use the correct options for the upstream qemu.
Ian.
Quoted 10 lines · Ian Campbell
Quoted 1 line
[0]:
git://xenbits.xensource.com/people/aperard/qemu-dm.gitPlease check the recently updated
http://wiki.xen.org/xenwiki/QEMUUpstream -- you need to tell xl (using the "device_model_version" option) that you are using the new qemu, then the toolstack will use the correct options for the upstream qemu.Ian.
Thanks, that works, though xl is not stable enough.
xl seems to use different format for configuration, and the page
http://wiki.xen.org/xenwiki/PythonInXlConfig is not available. Any other resources for writing a xl config file?
Signature · 4 lines
Best regards Wei Liu Twitter: @iliuw Site: http://liuw.name
Quoted 8 lines · Wei Liu
Quoted 7 lines · Ian Campbell
Quoted 1 line
[0]:
git://xenbits.xensource.com/people/aperard/qemu-dm.gitPlease check the recently updated
http://wiki.xen.org/xenwiki/QEMUUpstream -- you need to tell xl (using the "device_model_version" option) that you are using the new qemu, then the toolstack will use the correct options for the upstream qemu.
Quoted 5 lines
Quoted 3 lines
Ian.
Thanks, that works, though xl is not stable enough.
How so? Please file bugs on the mailing list.
Quoted 3 lines
xl seems to use different format for configuration, and the page
http://wiki.xen.org/xenwiki/PythonInXlConfig is not available. Any other resources for writing a xl config file?
xl configuration files are intended to be compatible with xm ones, with a few caveats as described at
http://wiki.xen.org/xenwiki/MigrationGuideToXen4.1+
Ian.
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 9 lines · Ian Campbell
Can you post your actual config file?
I use both vnclisten = '0.0.0.0' and serial = 'pty' in my config files and xl behaves as expected for me.
Ian.
My first vnc config used with xm, which is taken from xen examples:
vfb = [ 'vnc=1,vnclisten=0.0.0.0,vncunused=1']
Later I found out this is not for HVM. So I change to:
vnc=1
vnclisten='0.0.0.0'
It solves the vnc problem.
As for serial, I use serial='pty', too. It works fine with qemu-dm from xen-tools. However, it is not working when I use upstream QEMU. The upstream QEMU doesn't write anything in /local/domain/DOMID/serial/0/tty . If I manually write this entry, xl console will work as expected.
Also I found that HVM creating process hangs from time to time. Log reads
(XEN) HVM12: HVM Loader
(XEN) HVM12: Detected Xen v4.2-unstable
(XEN) HVM12: Xenbus rings @0xfeffc000, event channel 2
I can not reproduce this behavior. If I have further investigation, I will report it on the list.
Signature · 4 lines
Best regards Wei Liu Twitter: @iliuw Site: http://liuw.name
Quoted 13 lines · Wei Liu
Quoted 9 lines · Ian Campbell
Can you post your actual config file?
I use both vnclisten = '0.0.0.0' and serial = 'pty' in my config files and xl behaves as expected for me.
Ian.
My first vnc config used with xm, which is taken from xen examples:
Quoted 8 lines
vfb = [ 'vnc=1,vnclisten=0.0.0.0,vncunused=1']
Later I found out this is not for HVM. So I change to:
vnc=1
vnclisten='0.0.0.0'It solves the vnc problem.
Great.
Quoted 6 lines
As for serial, I use serial='pty', too. It works fine with qemu-dm from xen-tools. However, it is not working when I use upstream QEMU. The upstream QEMU doesn't write anything in /local/domain/DOMID/serial/0/tty . If I manually write this entry, xl console will work as expected.
Oh, yes, I use the following local patch and had forgotten about it, not sure how upstreamable it is, perhaps we might need to get libxl to query this via QMP and write the result itself or something.
Ian.
hw/xen.h +3 -0
@@ -9,6 +9,7 @@#include <inttypes.h> #include "qemu-common.h" +#include "qemu-option.h" /* xen-machine.c */ enum xen_mode {
@@ -57,4 +58,6 @@ void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size);# define HVM_MAX_VCPUS 32#endif +void xenstore_store_serial_port_info (CharDriverState *chr,QemuOpts *opts); +#endif /* QEMU_HW_XEN_H */
qemu-char.c +3 -0
@@ -31,6 +31,7 @@#include "hw/usb.h" #include "hw/baum.h" #include "hw/msmouse.h" +#include "hw/xen.h" #include "qemu-objects.h" #include <unistd.h>
@@ -1007,6 +1008,8 @@ static CharDriverState *qemu_chr_open_pty(QemuOpts *opts) s->timer =qemu_new_timer_ms (rt_clock, pty_chr_timer, chr); +xenstore_store_serial_port_info (chr, opts); +return chr; }
xen-all.c +82 -0
85 lines not on this page · raw message
On Fri, May 6, 2011 at 4:40 PM, Ian Campbell
<[email protected]> wrote:>
Quoted 5 lines
Oh, yes, I use the following local patch and had forgotten about it, not sure how upstreamable it is, perhaps we might need to get libxl to query this via QMP and write the result itself or something.
Ian.
Thanks for your patch.
I just find out that nographic=1 is not working, either. Seems that lots of work has to be done here.
Signature · 4 lines
Best regards Wei Liu Twitter: @iliuw Site: http://liuw.name
Quoted 10 lines · Ian Campbell
Quoted 5 lines
As for serial, I use serial='pty', too. It works fine with qemu-dm from xen-tools. However, it is not working when I use upstream QEMU. The upstream QEMU doesn't write anything in /local/domain/DOMID/serial/0/tty . If I manually write this entry, xl console will work as expected.
Oh, yes, I use the following local patch and had forgotten about it, not sure how upstreamable it is, perhaps we might need to get libxl to query this via QMP and write the result itself or something.
Yeah, the patch doesn't look great but at least it is using xenstore just to store informations and not as an RPC mechanism.
In any case at some point we'll have to add QMP support to issue commands to Qemu (see PCI passthrough) and retrieving the device name by QMP would certainly be preferred by the Qemu maintainers...
Quoted 12 lines · Wei Liu
Quoted 10 lines · Ian Campbell
Quoted 1 line
[0]:
git://xenbits.xensource.com/people/aperard/qemu-dm.gitPlease check the recently updated
http://wiki.xen.org/xenwiki/QEMUUpstream -- you need to tell xl (using the "device_model_version" option) that you are using the new qemu, then the toolstack will use the correct options for the upstream qemu.Ian.
Quoted 5 lines
Thanks, that works, though xl is not stable enough.
xl seems to use different format for configuration, and the page
http://wiki.xen.org/xenwiki/PythonInXlConfig is not available. Any other resources for writing a xl config file?
The file format should be the same except the embedded python that is not supported. So you should remove lines like these from the config file:
def vmid_check(var, val):
val = int(val)
if val <= 0:
raise ValueError
return val
# Define the 'vmid' variable so that 'xm create' knows about it. xm_vars.var('vmid',
use="Virtual machine id. Integer greater than 0.", check=vmid_check)
# Check the defined variables have valid values..xm_vars.check()