Skip to contentSkip to conversation

default devices: add global cmd line option.

PATCH Paolo Bonzini 3 participants 4 messages Dec 8, 2009 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 1236361906.1375741260288537008.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com

#1 lore raw
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Add global command line option to disable default devices.

Should -readconfig imply this?

Hmm, not sure. Why do you think this would be useful?

Here is my thinking: if you used -writeconfig, your machine description is (at least in theory) entirely included in the config file including (again in theory) the default devices. So, if the machine description has no parallel port, QEMU should not create a default one when you load it with -readconfig.

It's not really about usefulness in other words; it's more whether you think it fits in -{read,write}config's design or not.

Paolo

#2 lore raw
Quoted 11 lines · Paolo Bonzini
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Add global command line option to disable default devices.

Should -readconfig imply this?

Hmm, not sure. Why do you think this would be useful?

Here is my thinking: if you used -writeconfig, your machine description is (at least in theory) entirely included in the config file including (again in theory) the default devices. So, if the machine description has no parallel port, QEMU should not create a default one when you load it with -readconfig.

Shouldn't -writeconfig just add '-nodefaults' to the config it generates ?

That way if someone instead creates a configfile by hand, copying in their existing QEMU args they still get default devices which matches behaviour of their existing CLI args.

Regards,
Daniel

Signature · 4 lines
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
#3 lore raw
In reply to Paolo Bonzini
Quoted 9 lines · Paolo Bonzini
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Add global command line option to disable default devices.

Should -readconfig imply this?

Hmm, not sure. Why do you think this would be useful?

Here is my thinking: if you used -writeconfig, your machine description is (at least in theory) entirely included in the config file including (again in theory) the default devices.

The default devices are *not* included by in the file created by -writeconfig. So I tend to thing -readconfig should not automagically turn on -nodefaults to avoid unpleasent surprises for users.

Devices created via -readconfig are treated like devices created via [device] sections in the config file. So it doesn't matter whenever you configure your isa-serial device via command line or config file, in any case it will make qemu not create the default serial port.

cheers,
Gerd

#4 lore raw
Quoted 6 lines
Quoted 3 lines

Here is my thinking: if you used -writeconfig, your machine description is (at least in theory) entirely included in the config file including (again in theory) the default devices.

The default devices are *not* included by in the file created by -writeconfig.

Yes, that's why I wrote "at least in theory". It doesn't now but that would be a bug, because it makes -nodefaults another legacy option that has to be remembered and passed again upon -readconfig.

Quoted 4 lines

Devices created via -readconfig are treated like devices created via [device] sections in the config file. So it doesn't matter whenever you configure your isa-serial device via command line or config file, in any case it will make qemu not create the default serial port.

I was thinking about the case when you don't want at all a particular default device.

Paolo