Bug in option parsing
Hi everybody,
while coding the support for Jason's dump-guest-core option I realized there is (probably) a problem with the way QEMU parses additional machine options ('dump-guest-core', 'kvm_shadow_mem' etc.). Running QEMU with option to -machine works ok, but using '-M' (as libvirt does) works only w/o additional options, otherwise it ends in an error (the whole string is probably parsed as a machine name).
Is '-M' so obsolete it shouldn't be used at all or is it just an bug? We still use '-M' everywhere I know and '-machine' isn't compatible with older versions and different builds of QEMU.
Should I file a bug or do we have to drop '-M' for this situations?
Have a nice day,
Martin
Quoted 9 lines · Martin Kletzander
Hi everybody,
while coding the support for Jason's dump-guest-core option I realized there is (probably) a problem with the way QEMU parses additional machine options ('dump-guest-core', '
kvm_shadow_mem' etc.). Running QEMU with option to -machine works ok, but using '-M' (as libvirt does) works only w/o additional options, otherwise it ends in an error (the whole string is probably parsed as a machine name).
Quoted 5 lines
Is '-M' so obsolete it shouldn't be used at all or is it just an bug? We still use '-M' everywhere I know and '-machine' isn't compatible with older versions and different builds of QEMU.
Should I file a bug or do we have to drop '-M' for this situations?
If libvirt uses -M just like -machine, i.e. with more than a machine name, that would be a libvirt bug (but that would have been noticed much earlier - did you patch something?). QEMU only keeps -M <machine-name> around to please existing users that didn't switch yet. It is NOT an alias for -machine.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux
Quoted 14 lines · Jan Kiszka
Quoted 13 lines · Martin Kletzander
Hi everybody,
while coding the support for Jason's dump-guest-core option I realized there is (probably) a problem with the way QEMU parses additional machine options ('dump-guest-core', '
kvm_shadow_mem' etc.). Running QEMU with option to -machine works ok, but using '-M' (as libvirt does) works only w/o additional options, otherwise it ends in an error (the whole string is probably parsed as a machine name).Is '-M' so obsolete it shouldn't be used at all or is it just an bug? We still use '-M' everywhere I know and '-machine' isn't compatible with older versions and different builds of QEMU.
Quoted 8 lines
Quoted 1 line
Should I file a bug or do we have to drop '-M' for this situations?
If libvirt uses -M just like -machine, i.e. with more than a machine name, that would be a libvirt bug (but that would have been noticed much earlier - did you patch something?). QEMU only keeps -M <machine-name> around to please existing users that didn't switch yet. It is NOT an alias for -machine.
There is no option *yet* that libvirt would like to use as an additional option for machine type, but I'm working on the first one and I've hit this.
So your suggestion would be to use -machine wherever it's possible and fallback to -M only when -machine is not supported?
Martin
Quoted 24 lines · Martin Kletzander
Quoted 14 lines · Jan Kiszka
Quoted 13 lines · Martin Kletzander
Hi everybody,
while coding the support for Jason's dump-guest-core option I realized there is (probably) a problem with the way QEMU parses additional machine options ('dump-guest-core', '
kvm_shadow_mem' etc.). Running QEMU with option to -machine works ok, but using '-M' (as libvirt does) works only w/o additional options, otherwise it ends in an error (the whole string is probably parsed as a machine name).Is '-M' so obsolete it shouldn't be used at all or is it just an bug? We still use '-M' everywhere I know and '-machine' isn't compatible with older versions and different builds of QEMU.
Quoted 8 lines
Quoted 1 line
Should I file a bug or do we have to drop '-M' for this situations?
If libvirt uses -M just like -machine, i.e. with more than a machine name, that would be a libvirt bug (but that would have been noticed much earlier - did you patch something?). QEMU only keeps -M <machine-name> around to please existing users that didn't switch yet. It is NOT an alias for -machine.
Quoted 5 lines
There is no option *yet* that libvirt would like to use as an additional option for machine type, but I'm working on the first one and I've hit this.
So your suggestion would be to use -machine wherever it's possible and fallback to -M only when -machine is not supported?
Yep.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux