qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5 0/8] modify boot order of guest, and take eff


From: Gonglei (Arei)
Subject: Re: [Qemu-devel] [PATCH v5 0/8] modify boot order of guest, and take effect after rebooting
Date: Thu, 28 Aug 2014 04:50:05 +0000

> From: Gerd Hoffmann [mailto:address@hidden
> Subject: Re: [Qemu-devel] [PATCH v5 0/8] modify boot order of guest, and take
> effect after rebooting
> 
>   Hi,
> 
> > 1. Does have ready-to-wear interface to get QOM path by qdev id,?
> 
> You can simply use the id directly.  Try this:
> 
> qemu-system-x86_64 \
>    -qmp unix:/tmp/qmp,server,nowait \
>    -device virtio-scsi-pci,id=scsi \
>    -drive if=none,id=cdrom,media=cdrom \
>    -device scsi-cd,id=testcd,drive=cdrom &
> 
> export QMP_SOCKET=/tmp/qmp
> scripts/qmp/qom-list testcd
> scripts/qmp/qom-get testcd.bootindex
> 
> Builtin devices without ID are a bit more tricky.  But you can also
> reference busses by name, which simplifies it a bit.  Floppy for example
> is here:
> 
> scripts/qmp/qom-list isa.0/child[11]
> 
> [ Side note: The full path for this one is
>   "/machine/i440fx/pci.0/child[1]/isa.0/child[11]" ]
> 
> I have my doubts that "11" is guaranteed to be stable.  But you can walk
> all isa.0 children and check the type this way to figure:
> 
> scripts/qmp/qom-get isa.0/child[11].type
> 
OK. Thanks.

> > 2. Can I make bootindex property in QDEV coexist with in QOM? I think this
> meathod
> > will be good for compatibility with previous.
> 
> qdev properties are just some compatibility fluff around qom properties
> these days.  You can remove the qdev property, add a qom property with
> the same name and things will continue to work just fine.  And you now
> can use qom features which are not supported by the qdev property
> compatibility bits.
> 
OK, understood. This maybe a prodigious project, but I will try my best.

BTW, I found an issue that qom-set can only handle string type property:

#./qom-set nic1.realized false
Traceback (most recent call last):
  File "./qom-set", line 64, in <module>
    print srv.command('qom-set', path=path, property=prop, value=sys.argv[2])
  File "/mnt/sdb/gonglei/qemu.git/qemu/scripts/qmp/qmp.py", line 136, in command
    raise Exception(ret['error']['desc'])
Exception: Invalid parameter type for 'realized', expected: Boolean

I will post a patch fix this using Paolo's generic string parsing/printing 
functions.

Best regards,
-Gonglei


reply via email to

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