[libvirt] [PATCH 0/12] Standardized device addressing & SCSI controller/disk hotplug
Daniel P. Berrange
berrange at redhat.com
Fri Dec 18 14:32:08 UTC 2009
On Fri, Dec 18, 2009 at 02:18:32PM +0000, Mark McLoughlin wrote:
> On Fri, 2009-12-18 at 14:07 +0000, Daniel P. Berrange wrote:
> > The thing I'm trying to avoid is having libvirt update the persistent
> > config files outside the context of the existing virDefineXML API,
> Remind me why are you trying to avoid that
> (I've always been a bit dubious about virDefineXML saving a different
> config from the one you've supplied, but that's a different matter)
> > and
> > updating the live state file only helps for the duration the that VM
> > is running. Hence I came up with the static vs dynamic idea, where the
> > app would see the dynamic address, dump the XML and re-define it with
> > static addresses.
> > The only other option I see is to explicitly assign all PCI addresses
> > at time of virDefineXML, and then always pass an address on the command
> > line to QEMU for all devices, but this doesn't work for older QEMU where
> > we can't set PCI addresses.
> How about during virDefineXML, execing qemu, not starting the guest, but
> instead just querying the device assignments and saving them? If we
> ignored errors, it wouldn't change the semantics of the API.
> Hmm. Even if you go with the 'dynamic' idea, you're kind of changing the
> semantics anyway - you're saying the management apps should do 'define,
> start, dumpxml, define' where they didn't have to do that before. And if
> all apps should do that, we shouldn't 'start' do it automatically?
Actually I think I've been thinking about dynamic vs static at the wrong
level. It isn't something that needs to be considered per device. It is
a property of the QEMU version the guest runs, and we can figure that out
at time of define.
- For QEMU >= 0.12, all devices support static PCI addressing, so we
can easily assign all PCI addrs at time of virDefineXML and this
address info gets saved to disk.
- For QEMU < 0.12, no devices support static PCI addressing, so we will
always query for assigned PCI addrs at time of startup and have no
need to ever save this info to disk, since the QEMU doesn't support
At most we need to indicate in the capabilities XML that a guest type
supports PCI addressing, merely as a piece of useful info for PCI. They
would never have to actually set any PCI addrs themselves.
|: 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 :|
More information about the libvir-list