[libvirt] [PATCH 0/12] Standardized device addressing & SCSI controller/disk hotplug
by Daniel P. Berrange
This patch series is a combination of series done by
Wolfgang Mauerer to support proper SCSI drive hotplug
and new work by myself to introduce generic addressing
for all devices.
Wolfgang's most recent posting was
http://www.redhat.com/archives/libvir-list/2009-November/msg00574.html
http://www.redhat.com/archives/libvir-list/2009-November/msg00701.html
When testing that series I came across a few minor issues,
but more importantly it made me realize how important it is
that we introduce explicit device addressing in our XML format.
Wolfgang's series had added new element for SCSI controllers,
with PCI address info about the controller
<controller type='ide' index='0'>
<address domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
And had also extended the <disk> element to include a SCSI
controller name, and bus/unit ID. eg
<disk>
...
<controller name="<identifier>" pci_addr="<addr>" bus="<number>" unit="<number>"/>
</disk>
I then remembered that for support NIC/VirtIO/hostdev disk unplug
Mark M had previously added PCI address information to the internal
XML state files for <interface>, <disk> and <hostdev> elements.
All of these places using PCI addresses suffered from the fact
that we only knew the addresses of devices we'd hotplug and had no
idea of addresses of devices present at boot time.
A further issue with the addition of <controller> to the <disk>
element, is that not all disk types have a concept of a controller.
For example, every VirtIO disk is in fact a full PCI device, so
having a <controller> element in <disk> is not meaningful for
VirtIO.
The solution that I believe solves all our problems, is to add a
generic <address> element to every single device. This address
element contains info about how the device is associated with the
logical parent device. There will be three types of address in
this series of patches, though we could imagine adding more later.
- PCI address - domain, bus, slot, function
- USB address - bus, device
- Drive address - controller, bus, unit
Anything that is a PCI device will obviously use PCI addresses.
- PCI: sound, audio, video, all virtio, watchdog, disk controllers
- USB: all usb devices
- Drive: SCSI, IDE & Floppy disks, but *not* VirtIO/Xen disks
Xen paravirt devices aren't really covered in this scheme. I
could imagine adding a fourth address type for Xen. This would in
fact let us handle driver domains - ie a backend outside dom0.
I won't deal with Xen in this series though.
The XML for each address type looks like
<address type='pci' mode='static' domain='0x0000' bus='0x1e' slot='0x07' function='0x0'/>
<address type='usb' mode='dynamic' bus='007' dev='003'/>
<address type='drive' mode='dynamic' controller='1' bus='0' unit='5'/>
The 'mode' attribute for any of them is allowed to be either
'static' or 'dynamic'. A static address is one specified by
the end user when defining the XML, while a dynamic address is
one automatically chosen by libvirt/QEMU every time a guest
boots. The idea of static addresses is to allow management
apps to guarentee that PCI device & drive numbering never
changes. This series does not actually implement static
addressing for PCI yet, because it requires that we change
the way we generate QEMU command line arguments. It does
do static addressing for disks.
libvirt itself will auto-assign all drive addresses, and QEMU
will auto-assign PCI adresses in dynamic mode. When starting
a guest VM we run 'info pci' to get a list of PCI vendor/product
IDs and matching PCI addresses. We then attempt to match those
up with the devices we specified to QEMU. It sounds nasty, but
it actually works fairly well. This means we also now make it
possible to hotunplug any device, even those the VM was initially
booted with
There are two ways I can envisage mgmt apps using this address
functionality
- Boot a guest with no addresses specified, grab the XML and
change all 'dynamic' attrs to 'static' and then define the
persistent config with this. The addresses will then be
unchanged forever more
- Explicitly give a full list of addresses the very first time
a guest is created.
There is one small issue with all this, we need to know every
PCI device in the guest. It turns out there are a handful of
devices in QEMU we don't represent in XML yet
- Virtio balloon device
- Virtio console (this is easy to address with matt's patches)
- ISA bridge
- USB controller
- Some kind of PCI bridge (not clear what this is, it has
PCI ID 8086:7113
If an management application is to be able to fully control
static PCI addressing, we need to represent these somehow,
so apps can give them addresses. Technically we could get
away with not representing the ISA/PCI bridge since QEMU
always gives them the first PCI slot no matter what. Still
need the VirtIO & USB devices dealt with.
Finally, here is an example of a guest running with a huge
number of devices. Notice how we've auto-detected the PCI
address of every device, and every disk. In particular
notice how VirtiO disks got the PCI address, while SCSI
disks got the drive address.
<domain type='kvm' id='2'>
<name>plain</name>
<uuid>c7a1edbd-edaf-9455-926a-d65c16db1809</uuid>
<memory>219200</memory>
<currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc-0.11'>hvm</type>
<kernel>/home/berrange/vmlinuz-PAE</kernel>
<initrd>/home/berrange/initrd-PAE.img</initrd>
<boot dev='hd'/>
</os>
<features>
<acpi/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/home/berrange/VirtualMachines/plain.qcow'/>
<target dev='vda' bus='virtio'/>
<address type='pci' mode='dynamic' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
</disk>
<disk type='file' device='cdrom'>
<source file='/home/berrange/gpxe.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' mode='dynamic' controller='0' bus='1' unit='0'/>
</disk>
<disk type='file' device='disk'>
<source file='/home/berrange/output.img'/>
<target dev='sda' bus='scsi'/>
<address type='drive' mode='dynamic' controller='0' bus='0' unit='0'/>
</disk>
<disk type='file' device='disk'>
<source file='/home/berrange/output.img'/>
<target dev='sdd' bus='scsi'/>
<address type='drive' mode='dynamic' controller='0' bus='0' unit='3'/>
</disk>
<disk type='file' device='disk'>
<source file='/home/berrange/output.img'/>
<target dev='sdf' bus='scsi'/>
<address type='drive' mode='dynamic' controller='0' bus='0' unit='5'/>
</disk>
<controller type='scsi' index='0'>
<address type='pci' mode='dynamic' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
</controller>
<controller type='ide' index='0'>
<address type='pci' mode='dynamic' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='fdc' index='0'/>
<interface type='user'>
<mac address='52:54:00:5b:ef:21'/>
<model type='ne2k_pci'/>
<address type='pci' mode='dynamic' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<interface type='user'>
<mac address='52:54:00:1c:dc:98'/>
<model type='virtio'/>
<address type='pci' mode='dynamic' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</interface>
<interface type='user'>
<mac address='52:54:00:f7:c5:0e'/>
<model type='e1000'/>
<address type='pci' mode='dynamic' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</interface>
<interface type='user'>
<mac address='52:54:00:56:6c:55'/>
<model type='pcnet'/>
<address type='pci' mode='dynamic' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</interface>
<interface type='user'>
<mac address='52:54:00:ca:0d:58'/>
<model type='rtl8139'/>
<address type='pci' mode='dynamic' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/5'/>
<target port='0'/>
</serial>
<console type='pty' tty='/dev/pts/5'>
<source path='/dev/pts/5'/>
<target port='0'/>
</console>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5900' autoport='yes'/>
<sound model='ac97'>
<address type='pci' mode='dynamic' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</sound>
<sound model='es1370'>
<address type='pci' mode='dynamic' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
</sound>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<address type='pci' mode='dynamic' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<watchdog model='i6300esb' action='reset'>
<address type='pci' mode='dynamic' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/>
</watchdog>
</devices>
<seclabel type='dynamic' model='selinux'>
<label>system_u:system_r:svirt_t:s0:c181,c286</label>
<imagelabel>system_u:object_r:svirt_image_t:s0:c181,c286</imagelabel>
</seclabel>
</domain>
Daniel
14 years, 10 months
[libvirt] define tap-only networking
by richard lucassen
Hello list,
I'm pretty new to libvirt and I'd like to try to set up simple
networking as described here:
http://www.xaq.nl/kvm-tap-howto.txt
Is it possible to set up networking through simple tap devices using the
xml format? And if yes, can someone give me a hint how to set this up?
R.
--
___________________________________________________________________
It is better to remain silent and be thought a fool, than to speak
aloud and remove all doubt.
+------------------------------------------------------------------+
| Richard Lucassen, Utrecht |
| Public key and email address: |
| http://www.lucassen.org/mail-pubkey.html |
+------------------------------------------------------------------+
14 years, 11 months
[libvirt] kvm-shell
by Michael Kress
Hi, I don't know if that already exists somewhere ... I've written it
for me and wanted to share it with you.
It's a minimal kvm shell for end users - it allows them to
start/stop/reboot their own kvm guests.
http://www.michael-kress.de/2009/12/kvm-shell/
kvm-shell should run on all platforms.
Have fun.
Regards
Michael
--
Michael Kress, kress(a)hal.saar.de
14 years, 11 months
[libvirt] LXC support?
by Diego Elio “Flameeyes” Pettenò
I've been wanting to give a try to libvirt to handle containers from LXC
as well, but seems like if I follow the default configuration example, I
get this:
virsh # create /etc/libvirt/lxc/axant.xml
errore: Impossibile creare il dominio da /etc/libvirt/lxc/axant.xml
errore: unknown OS type exe
[sorry for the Italian message, but it doesn't really matter]
The configuration is this:
<domain type='lxc'>
<name>axant</name>
<memory>14680064</memory>
<os>
<type>exe</type>
<init>/init</init>
</os>
<vcpu>8</vcpu>
<clock offset="utc" />
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/libvirt_lxc</emulator>
<filesystem type='mount'>
<source dir='/media/chroots/axant'/>
<target dir='/'/>
</filesystem>
<interface type='bridge'>
<mac address="8e:8b:e5:aa:28:b6" />
<source bridge="br0" />
</interface>
<console type='pty' />
</devices>
</domain>
am I doing something wrong or the doc at [1] is outdated somehow?
[1] http://libvirt.org/drvlxc.html
--
Diego Elio Pettenò — “Flameeyes”
http://blog.flameeyes.eu/
If you found a .asc file in this mail and know not what it is,
it's a GnuPG digital signature: http://www.gnupg.org/
14 years, 11 months
[libvirt] Release of libvirt-0.7.5
by Daniel Veillard
As scheduled, the release hist the server, it's available on the ftp
ftp://libvirt.org/libvirt/
It really includes a lot of bug fixes, as well as some new API and
features. I would expect the next release to be around end of January 2010
something like a feature freeze around Jan 22 and a push on 29. That way
we will be back on the "end of month release" scheme :-)
Features:
- Add new API virDomainMemoryStats to header and drivers (Adam Litke)
- Public API and domain extension for CPU flags (Jiri Denemark)
- expose SR IOV physical/virtual function relationships (Dave Allan)
- Support for JSON mode monitor [deactivated] (Daniel P. Berrange)
- Support for interface model='netfront' (Jiri Denemark)
- vbox: Add support for version 3.1 (Pritesh Kothari)
- Support QEMU's virtual FAT block device driver (Daniel P. Berrange)
Documentation:
- Document the dommemstat command in the virsh man page (Adam Litke)
- esx: Add more links to external documentation (Matthias Bolte)
- esx: Extend documentation about 'vcenter' and add some about 'auto_answer' (Matthias Bolte)
- Fix and improve domain xml video element description (Matthias Bolte)
- Fix owner and group in example volume XML (Matthew Booth)
- add missing doc for device <shareable/> option (Daniel Veillard)
- add AppArmor test and examples to dist (Jamie Strandboge)
- Update location of C# bindings. (Richard Jones)
- Fix typo in QEMU driver webpage (Daniel P. Berrange)
- Clarify documentation for private symbols (Wolfgang Mauerer)
- Fix news.html validation (Dan Kenigsberg)
Portability:
- Define ATTRIBUTE_SENTINEL for GCC < 4.0 too (Matthias Bolte)
- Fix compilation with configure --disable-nls (Matthias Bolte)
- Fix configure check for SASL (Matthias Bolte)
- Fix GnuTLS pkg-config check (Matthias Bolte)
- Report an error if no XDR library can be found (Matthias Bolte)
- Fix compilation with gcrypt < 1.4.2 (Matthias Bolte)
- Don't mix LDFLAGS and LIBS in the configure script (Diego Elio Pettenò)
- Don't make it possible to define HAVE_HAL but not enable it in automake (Diego Elio Pettenò)
- Fix install location for Python bindings (Matthias Bolte)
- Use AM_PATH_PYTHON and python-config to detect Python configuration (Matthias Bolte)
- Fix a compilation failure if yajl not avail (Daniel Veillard)
- Fix compilation for configure --disable-nls (Matthias Bolte)
Bug fixes:
- cpu: Fix memory leaks in x86FeatureLoad and x86ModelLoad (Matthias Bolte)
- Make Xen VT-d PCI attach/detach work (Chris Lalancette)
- Fix detection of JSON when restarting libvirtd (Daniel P. Berrange)
- Fix reporting of TLS connection errors (Daniel P. Berrange)
- Fix typo in qemudDomainAttachHostPciDevice() (Daniel Veillard)
- esx: Destroy virtual machine on a vCenter if available (Matthias Bolte)
- esx: Undefine virtual machine on a vCenter if available (Matthias Bolte)
- Initialize gcrypt threading (Daniel P. Berrange)
- Fix bug in storage driver accessing wrong private data (Daniel P. Berrange)
- esx_vi.c: do not call through NULL function pointer (Jim Meyering)
- esx_util.c: avoid NULL deref for invalid inputs (Jim Meyering)
- esx: Don't goto failure for invalid arguments in VMX code (Matthias Bolte)
- Fix memory leak in qemudBuildCommandLine (Matthias Bolte)
- avoid malfunction when virFileResolveLink is applied to non-POSIX FS (Jim Meyering)
- libvirt.c: don't let a NULL "cpumaps" argument provoke a NULL-deref (Jim Meyering)
- qemu migration: avoid NULL-deref given an invalid input (Jim Meyering)
- qemu_driver.c: don't unlink(NULL) on OOM error path (Jim Meyering)
- remote_driver.c: also zero out ->saslDecodedOffset member (Jim Meyering)
- qemu_driver.c: avoid double free on error path (Jim Meyering)
- libvirtd: avoid a NULL dereference on error path (Jim Meyering)
- virsh: avoid double-free (Jim Meyering)
- node_device_driver.c: don't write beyond EOB for 4K-byte symlink (Jim Meyering)
- Eliminate failure to delete empty storage pools (Laine Stump)
- Fix use of virEventAddHandleImpl() (Jiri Denemark)
- Fix possible NULL pointer dereference (Paolo Bonzini)
- fix various breakages in qemu Dump command (Paolo Bonzini)
- Fix reference leak in remoteDispatchStorageVolCreateXmlFrom (Matthias Bolte)
- Fix memory leak in virStorageBackendCopyToFD (Matthias Bolte)
- retrieve paused/running state at migration start (Paolo Bonzini)
- fix migration of paused vms upon failure (Paolo Bonzini)
- qemu driver: Fix segfault in libvirt/libvirtd when uri->path is NULL. (Richard Jones)
- Fix a wellformedness problem in secret.rng (Diego Elio Pettenò)
- Fix virDomainObj ref handling in QEMU driver (Daniel P. Berrange)
- Pull code to start CPUs executing out of qemudInitCpuAffinity() (Daniel P. Berrange)
- Fix migration cancellation for QEMU (Daniel P. Berrange)
- Fix crash when deleting monitor while a command is in progress (Daniel P. Berrange)
- udev_device_get_devpath might return NULL (Guido Günther)
- Fix some locking issues (Matthias Bolte)
- Fix event test timer checks on kernels with HZ=100 (Daniel P. Berrange)
- Fix threading problems in python bindings (Daniel P. Berrange)
- Supress annoying libcap-ng errors from valgrind (Daniel P. Berrange)
- Fix two leaks in test driver (Daniel P. Berrange)
- Free cgroup device ACL list on driver shutdown (Daniel P. Berrange)
- xen: Fix unconditional freeing in xenDaemonListDefinedDomains() (Matthias Bolte)
- Fix default disk type when parsing QEMU argv (Daniel P. Berrange)
- remove port filter when network device is detached (Gerhard Stenzel)
Improvements:
- convert missing server entry points into unsupported errors (Daniel Veillard)
- fix some error report when on remote access (Olivier Fourdan)
- Disable JSON mode monitor until QEMU is more mature (Daniel P. Berrange)
- Only probe for CPU models if required (Jiri Denemark)
- Add cpu_map.xml to libvirt.spec (Jiri Denemark)
- Install cpu_map.xml (Jiri Denemark)
- esx: Don't warn about '/' paths (Matthias Bolte)
- esx: Extend vCenter query parameter (Matthias Bolte)
- esx: Improve domain lookup by UUID (Matthias Bolte)
- build: update gnulib submodule to latest (Jim Meyering)
- Relax the allowed values for machine type in schema (Daniel Veillard)
- Implement --pool option for virsh vol-path (Dave Allan)
- nodedev: Add removable storage 'media_label' prop (Cole Robinson)
- add --live support to "virsh dump" (Paolo Bonzini)
- add --crash support to "virsh dump" (Paolo Bonzini)
- Get QEMU pty paths from the monitor (Matthew Booth)
- Extract the assigned pty device for QEmu channels (Matthew Booth)
- Make QEMU driver use -chardev everywhere if available (Matthew Booth)
- add virsh --suspend arg to migrate command (Paolo Bonzini)
- reload iptables rules on libvirtd restart (Mark McLoughlin)
- reload iptables rules simply by re-adding them (Mark McLoughlin)
- Plumb domain description tag in xend backend (Jim Fehlig)
- Make QEMU text monitor parsing more robust (Daniel P. Berrange)
- Hook up JSON monitor to emit basic lifecycle events (Daniel P. Berrange)
- Add QEMU monitor callbacks for basic lifecycle events (Daniel P. Berrange)
- Switch over to passing a callback table to QEMU monitor (Daniel P. Berrange)
- Introduce callbacks for serializing domain object private data to XML (Daniel P. Berrange)
- Switch LXC driver to use a private data blob for virDomainObj state (Daniel P. Berrange)
- Switch UML driver to use a private data blob for virDomainObj state (Daniel P. Berrange)
- Add a 'format' arg to qemuMonitorChangeMedia() since JSON will support it (Daniel P. Berrange)
- Introduce a simple API for handling JSON data (Daniel P. Berrange)
- Add --system flag to autogen.sh to make it easy to build with right prefix (Daniel P. Berrange)
- Export all symbols from xml.h for internal use (Jiri Denemark)
- vbox: Use virIndexToDiskName() in vboxGenerateMediumName() (Matthias Bolte)
- Tests for interface type/model configuration (Jiri Denemark)
- Add virIndexToDiskName and fix mapping gap (Matthias Bolte)
- Add another SENTINEL attribute (Paolo Bonzini)
- Fix help message (Wolfgang Mauerer)
- Alternate CPU affinity impl to cope with NR_CPUS > 1024 (Daniel P. Berrange)
Cleanups:
- The secret driver is stateful, link it directly to libvirtd (Matthias Bolte)
- Remove undefined symbols from libvirt_private.syms (Matthias Bolte)
- boolean shadows a typedef in rpcndr.h when compiled with MinGW (Matthias Bolte)
- Rename DATADIR to PKGDATADIR to fix win32 build (Jiri Denemark)
- Move cpu_map.xml to -client RPM (Jiri Denemark)
- Fix undefined reference to 'close_used_without_including_unistd_h' (Matthias Bolte)
- Fix argument type of virProcessInfoSetAffinity dummy function (Matthias Bolte)
- esx: Use occurrence enum to specify expected result of a SOAP call (Matthias Bolte)
- esx: Fix occurence typo (Matthias Bolte)
- esx: Removed unused inttypes.h include (Matthias Bolte)
- esx: Replace libxml1 'xmlChildrenNode' with libxml2 'children' (Matthias Bolte)
- esx: Use more suitable error code in esxVI_LookupVirtualMachineByUuid() (Matthias Bolte)
- esx: Add automatic question handling (Matthias Bolte)
- avoid calling exit with a constant; use EXIT_* instead (Jim Meyering)
- maint: remove from VC two gnulib-provided files (Jim Meyering)
- xm_internal.c: remove misleading dead code (Jim Meyering)
- Cleanup temporary #define after use (Matthew Booth)
- Suppress cgroup error message on sucess startup (Ryota Ozaki)
- Small change of RNG syntax for domain (Diego Elio Pettenò)
- remove iptablesReloadRules() and related code (Mark McLoughlin)
- remove all traces of lokkit support (Mark McLoughlin)
- Add virBufferFreeAndReset() and replace free() (Matthias Bolte)
- Fix the news file non-ascii characters (Daniel Veillard)
- Add missing commas to the 0.7.4 news section (Matthias Bolte)
- Change generated HTML to UTF-8 encoding (Daniel Veillard)
- Avoid an type-punned pointer aliasing pbm (Daniel Veillard)
- Move qemuMonitorEscape + migrate status enum into shared monitor code (Daniel P. Berrange)
- vbox: Update IIDs from version 3.1-beta2 to 3.1-final (Matthias Bolte)
- Fix ReprotError vs ReportError typo in JSON code (Daniel P. Berrange)
- Fix inverted conditional test in configure.ac check for yajl (Daniel P. Berrange)
- Pull schedular affinity code out into a separate module (Daniel P. Berrange)
- Ignore docs/ directory for strcmp() syntax check (Daniel P. Berrange)
Again a lot of work in this release, thanks everybody for your
contributions, enjoy and I wish you a good end of year !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
14 years, 11 months
[libvirt] New libvirt API for domain memory statistics reporting (V3)
by Adam Litke
Daniel, Daniel, and Matthias: Thanks for your review. This series addresses
almost all of your most recent comments. I am still working on writing a
decent implementation for the test driver but I wanted to get these updates out
right away.
Changes since V2:
* Ported to GIT HEAD for easier merging :)
* Amounts of memory are now reported in kilobytes
* Added flags parameter to API (currently unused)
* Moved to less awkward xdr wire format for remote driver
* Stats 'Free' and 'Total' renamed to 'Unused' and 'Available'
* Various small fixups: constant names, data types, etc
Changes since V1:
* New system for maintaining ABI compatibility and API extensibility:
Rather than passing around a fixed-size stats structure, work with arrays
of stats. An enum of known statistic tags (SWAP_IN, SWAP_OUT, TOTAL_MEM,
etc) is defined. A stat is defined as a tag/value pair. When making a
call to the API, the caller provides an array of stats and the size of the
array. That array is filled with up to the requested number of stats
(depending on hypervisor and guest support). The number of stats provided
is returned.
* Miscellaneous changes:
Changed the API function from virDomainMemStats to virDomainMemoryStats
Added documentation for each memory stat
--
When using ballooning to manage overcommitted memory on a host, a system for
guests to communicate their memory usage to the host can provide information
that will minimize the impact of ballooning on the guests while maximizing
efficient use of host memory.
The design of such a communication channel was recently added to version 0.8.2
of the VirtIO Spec (See Appendix G):
- http://ozlabs.org/~rusty/virtio-spec/virtio-spec-0.8.2.pdf
Host-side and guest-side implementations have been accepted for inclusion in
their respective projects:
- Guest: http://lkml.org/lkml/2009/11/30/274
- Host: http://lists.gnu.org/archive/html/qemu-devel/2009-12/msg00380.html
The following patch series implements a new libvirt interface to expose these
memory statistics. Thank you for your review and comments.
[PATCH 1/6] domMemoryStats: Add domainMemoryStats method to struct _virDriver
[PATCH 2/6] domMemoryStats: Add public symbol to libvirt API
[PATCH 3/6] qemu-driver: Enable domainMemStats in the qemu driver
[PATCH 4/6] remote-driver: Add domainMemoryStats support
[PATCH 5/6] virsh: Enable virDomainMemoryStats as a new command
[PATCH 6/6] python: Add python bindings for virDomainMemoryStats
14 years, 11 months
[libvirt] [PATCH] The secret driver is stateful, link it directly to libvirtd
by Matthias Bolte
All other stateful drivers are linked directly to libvirtd
instead of libvirt.so. Link the secret driver to libvirtd too.
* daemon/Makefile.am: link the secret driver to libvirtd
* src/Makefile.am: don't link the secret driver to libvirt.so
* src/libvirt_private.syms: remove the secretRegister symbol
---
daemon/Makefile.am | 2 ++
src/Makefile.am | 3 ++-
src/libvirt_private.syms | 2 --
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index ab3f238..f6b6a3a 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -110,6 +110,8 @@ endif
if WITH_NODE_DEVICES
libvirtd_LDADD += ../src/libvirt_driver_nodedev.la
endif
+
+ libvirtd_LDADD += ../src/libvirt_driver_secret.la
endif
libvirtd_LDADD += ../src/libvirt.la
diff --git a/src/Makefile.am b/src/Makefile.am
index 42108c0..526d985 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -598,7 +598,8 @@ if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_secret.la
else
noinst_LTLIBRARIES += libvirt_driver_secret.la
-libvirt_la_LIBADD += libvirt_driver_secret.la
+# Stateful, so linked to daemon instead
+#libvirt_la_LIBADD += libvirt_driver_secret.la
endif
libvirt_driver_secret_la_CFLAGS = \
-I@top_srcdir@/src/conf
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index f90f269..31c944c 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -456,8 +456,6 @@ virSecretDefParseString;
virSecretDefParseFile;
virSecretDefFormat;
-# secret_driver.h
-secretRegister;
# security.h
virSecurityDriverVerify;
--
1.6.0.4
14 years, 11 months
[libvirt] [PATCH] Move cpu_map.xml to -client RPM
by Jiri Denemark
All the cpu code is part of libvirt library and it might be used by
drivers which do not require libvirtd to be running.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
libvirt.spec.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index e1d4e53..9b4f2c6 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -687,8 +687,6 @@ fi
%{_datadir}/libvirt/networks/default.xml
%endif
-%{_datadir}/libvirt/cpu_map.xml
-
%dir %{_localstatedir}/run/libvirt/
%dir %{_localstatedir}/lib/libvirt/
@@ -776,6 +774,8 @@ fi
%{_datadir}/libvirt/schemas/secret.rng
%{_datadir}/libvirt/schemas/storageencryption.rng
+%{_datadir}/libvirt/cpu_map.xml
+
%if %{with_sasl}
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
%endif
--
1.6.6.rc4
14 years, 11 months
[libvirt] [PATCH] Remove undefined symbols from libvirt_private.syms
by Matthias Bolte
MinGW's ld gives an error when trying to export undefined symbols.
---
src/libvirt_private.syms | 4 ----
src/util/network.h | 4 ----
2 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 31c944c..10940eb 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -362,7 +362,6 @@ virFree;
# network.h
-virSocketAddrInNetwork;
virSocketAddrIsNetmask;
virSocketCheckNetmask;
virSocketFormatAddr;
@@ -435,8 +434,6 @@ pciDeviceListDel;
pciDeviceFileIterate;
pciDeviceListCount;
pciDeviceListGet;
-pciDeviceListLock;
-pciDeviceListUnlock;
pciDeviceListSteal;
@@ -503,7 +500,6 @@ virStoragePoolObjUnlock;
# storage_encryption_conf.h
virStorageEncryptionFree;
-virStorageEncryptionDropSecrets;
virStorageEncryptionParseNode;
virStorageEncryptionFormat;
virStorageGenerateQcowPassphrase;
diff --git a/src/util/network.h b/src/util/network.h
index 3762ef2..d5c2c9b 100644
--- a/src/util/network.h
+++ b/src/util/network.h
@@ -40,10 +40,6 @@ int virSocketSetPort(virSocketAddrPtr addr, int port);
int virSocketGetPort(virSocketAddrPtr addr);
-int virSocketAddrInNetwork(virSocketAddrPtr addr1,
- virSocketAddrPtr addr2,
- virSocketAddrPtr netmask);
-
int virSocketGetRange (virSocketAddrPtr start,
virSocketAddrPtr end);
--
1.6.0.4
14 years, 11 months