[libvirt] (how much) support for kqemu domain
by John Lumby
I am wondering about the extent to which "old" qemu-0.11.1 and kqemu-1.4.0 are supported by virt-manager.
I see I can specify --virt-type=kqemu on virt-install and it remembers domain type='kqemu', and does things such as refusing to start the vm if the kqemu kernel mod not loaded, but it seems it does not tack on the
-enable-kqemu -kernel-kqemu
options on to the qemu command line. There is really not much point in trying to start a qemu-based vm with neither hardware kvm nor kqemu ...
I can work around it with an override script to intercept the qemu command, but does anyone think virt-manager ought to do this for me?
John Lumby
_________________________________________________________________
13 years, 5 months
[libvirt] [PATCH] virsh: Add daemon version reporting
by Michal Prívozník
From: Michal Privoznik <mprivozn(a)redhat.com>
'virsh version' might report against which version of libvirtd is
running.
---
tools/virsh.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index d98be1c..d3c3ce3 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -8620,6 +8620,7 @@ cmdVersion(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
unsigned long libVersion;
unsigned long includeVersion;
unsigned long apiVersion;
+ unsigned long daemonVersion;
int ret;
unsigned int major;
unsigned int minor;
@@ -8678,6 +8679,19 @@ cmdVersion(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
vshPrint(ctl, _("Running hypervisor: %s %d.%d.%d\n"),
hvType, major, minor, rel);
}
+
+ ret = virConnectGetLibVersion(ctl->conn, &daemonVersion);
+ if (ret < 0) {
+ vshError(ctl, "%s", _("failed to get the daemon version"));
+ return false;
+ }
+ major = daemonVersion / 1000000;
+ daemonVersion %= 1000000;
+ minor = daemonVersion / 1000;
+ rel = daemonVersion % 1000;
+ vshPrint(ctl, _("Running against daemon: %d.%d.%d\n"),
+ major, minor, rel);
+
return true;
}
--
1.7.5.rc3
13 years, 5 months
[libvirt] [PATCH] docs: Make hvsupport.pl pick up the host device drivers
by Matthias Bolte
Annotate the ESX device driver dummy.
Refactor the udev and hal device driver strcuts to match the
common annotation pattern.
---
This is post-0.9.2.
docs/hvsupport.pl | 22 +++++++++++++----
src/esx/esx_device_monitor.c | 15 ++---------
src/node_device/node_device_driver.c | 45 +++++++++++++---------------------
src/node_device/node_device_driver.h | 14 +++++++++-
src/node_device/node_device_hal.c | 22 +++++++++++-----
src/node_device/node_device_udev.c | 22 +++++++++++-----
6 files changed, 79 insertions(+), 61 deletions(-)
diff --git a/docs/hvsupport.pl b/docs/hvsupport.pl
index 8a0fa7a..b0d1f0f 100755
--- a/docs/hvsupport.pl
+++ b/docs/hvsupport.pl
@@ -27,7 +27,7 @@ my %groupheaders = (
my @srcs;
find({
wanted => sub {
- if (m!$srcdir/.*/\w+_(driver|tmpl)\.c$!) {
+ if (m!$srcdir/.*/\w+_(driver|tmpl|monitor|hal|udev)\.c$!) {
push @srcs, $_ if $_ !~ /vbox_driver\.c/;
}
}, no_chdir => 1}, $srcdir);
@@ -142,7 +142,7 @@ open FILE, "<$drivertable"
my %groups;
my $ingrp;
while (defined($line = <FILE>)) {
- if ($line =~ /struct _(vir\w*Driver)/) {
+ if ($line =~ /struct _(vir\w*(?:Driver|Monitor))/) {
my $grp = $1;
if ($grp ne "virStateDriver" &&
$grp ne "virStreamDriver") {
@@ -150,7 +150,7 @@ while (defined($line = <FILE>)) {
$groups{$ingrp} = { apis => {}, drivers => {} };
}
} elsif ($ingrp) {
- if ($line =~ /^\s*virDrv(\w+)\s+(\w+);\s*$/) {
+ if ($line =~ /^\s*vir(?:Drv|DevMon)(\w+)\s+(\w+);\s*$/) {
my $field = $2;
my $name = $1;
@@ -159,6 +159,8 @@ while (defined($line = <FILE>)) {
$api = "vir$name";
} elsif (exists $apis{"virConnect$name"}) {
$api = "virConnect$name";
+ } elsif (exists $apis{"virNode$name"}) {
+ $api = "virNode$name";
} else {
die "driver $name does not have a public API";
}
@@ -188,7 +190,17 @@ foreach my $src (@srcs) {
$line =~ /^\s*(?:static\s+)?$grp\s+NAME\(\w+\)\s*=\s*{/) {
$ingrp = $grp;
$impl = $src;
- $impl =~ s,.*/(\w+?)_((\w+)_)?(\w+)\.c,$1,;
+
+ if ($impl =~ m,.*/node_device_(\w+)\.c,) {
+ $impl = $1;
+ } else {
+ $impl =~ s,.*/(\w+?)_((\w+)_)?(\w+)\.c,$1,;
+ }
+
+ if ($groups{$ingrp}->{drivers}->{$impl}) {
+ die "Group $ingrp already contains $impl";
+ }
+
$groups{$ingrp}->{drivers}->{$impl} = {};
}
}
@@ -206,7 +218,7 @@ foreach my $src (@srcs) {
die "Driver method for $api is NULL in $src" if $meth eq "NULL";
if (!exists($groups{$ingrp}->{apis}->{$api})) {
- die "Found unexpected driver $api in $ingrp\n";
+ die "Found unexpected method $api in $ingrp\n";
}
$groups{$ingrp}->{drivers}->{$impl}->{$api} = $vers;
diff --git a/src/esx/esx_device_monitor.c b/src/esx/esx_device_monitor.c
index 3fa63d5..4bc8e7f 100644
--- a/src/esx/esx_device_monitor.c
+++ b/src/esx/esx_device_monitor.c
@@ -66,18 +66,9 @@ esxDeviceClose(virConnectPtr conn)
static virDeviceMonitor esxDeviceMonitor = {
- "ESX", /* name */
- esxDeviceOpen, /* open */
- esxDeviceClose, /* close */
- NULL, /* numOfDevices */
- NULL, /* listDevices */
- NULL, /* deviceLookupByName */
- NULL, /* deviceGetXMLDesc */
- NULL, /* deviceGetParent */
- NULL, /* deviceNumOfCaps */
- NULL, /* deviceListCaps */
- NULL, /* deviceCreateXML */
- NULL, /* deviceDestroy */
+ .name = "ESX",
+ .open = esxDeviceOpen, /* 0.7.6 */
+ .close = esxDeviceClose, /* 0.7.6 */
};
diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c
index 8ec3e44..842f903 100644
--- a/src/node_device/node_device_driver.c
+++ b/src/node_device/node_device_driver.c
@@ -122,9 +122,10 @@ void nodeDeviceUnlock(virDeviceMonitorStatePtr driver)
virMutexUnlock(&driver->lock);
}
-static int nodeNumOfDevices(virConnectPtr conn,
- const char *cap,
- unsigned int flags ATTRIBUTE_UNUSED)
+int
+nodeNumOfDevices(virConnectPtr conn,
+ const char *cap,
+ unsigned int flags ATTRIBUTE_UNUSED)
{
virDeviceMonitorStatePtr driver = conn->devMonPrivateData;
int ndevs = 0;
@@ -143,7 +144,7 @@ static int nodeNumOfDevices(virConnectPtr conn,
return ndevs;
}
-static int
+int
nodeListDevices(virConnectPtr conn,
const char *cap,
char **const names, int maxnames,
@@ -179,8 +180,8 @@ nodeListDevices(virConnectPtr conn,
}
-static virNodeDevicePtr nodeDeviceLookupByName(virConnectPtr conn,
- const char *name)
+virNodeDevicePtr
+nodeDeviceLookupByName(virConnectPtr conn, const char *name)
{
virDeviceMonitorStatePtr driver = conn->devMonPrivateData;
virNodeDeviceObjPtr obj;
@@ -251,8 +252,9 @@ out:
}
-static char *nodeDeviceGetXMLDesc(virNodeDevicePtr dev,
- unsigned int flags ATTRIBUTE_UNUSED)
+char *
+nodeDeviceGetXMLDesc(virNodeDevicePtr dev,
+ unsigned int flags ATTRIBUTE_UNUSED)
{
virDeviceMonitorStatePtr driver = dev->conn->devMonPrivateData;
virNodeDeviceObjPtr obj;
@@ -281,7 +283,8 @@ cleanup:
}
-static char *nodeDeviceGetParent(virNodeDevicePtr dev)
+char *
+nodeDeviceGetParent(virNodeDevicePtr dev)
{
virDeviceMonitorStatePtr driver = dev->conn->devMonPrivateData;
virNodeDeviceObjPtr obj;
@@ -314,7 +317,8 @@ cleanup:
}
-static int nodeDeviceNumOfCaps(virNodeDevicePtr dev)
+int
+nodeDeviceNumOfCaps(virNodeDevicePtr dev)
{
virDeviceMonitorStatePtr driver = dev->conn->devMonPrivateData;
virNodeDeviceObjPtr obj;
@@ -344,7 +348,7 @@ cleanup:
}
-static int
+int
nodeDeviceListCaps(virNodeDevicePtr dev, char **const names, int maxnames)
{
virDeviceMonitorStatePtr driver = dev->conn->devMonPrivateData;
@@ -538,7 +542,7 @@ find_new_device(virConnectPtr conn, const char *wwnn, const char *wwpn)
return dev;
}
-static virNodeDevicePtr
+virNodeDevicePtr
nodeDeviceCreateXML(virConnectPtr conn,
const char *xmlDesc,
unsigned int flags ATTRIBUTE_UNUSED)
@@ -591,7 +595,7 @@ cleanup:
}
-static int
+int
nodeDeviceDestroy(virNodeDevicePtr dev)
{
int ret = -1;
@@ -651,21 +655,6 @@ out:
return ret;
}
-
-void registerCommonNodeFuncs(virDeviceMonitorPtr driver)
-{
- driver->numOfDevices = nodeNumOfDevices;
- driver->listDevices = nodeListDevices;
- driver->deviceLookupByName = nodeDeviceLookupByName;
- driver->deviceGetXMLDesc = nodeDeviceGetXMLDesc;
- driver->deviceGetParent = nodeDeviceGetParent;
- driver->deviceNumOfCaps = nodeDeviceNumOfCaps;
- driver->deviceListCaps = nodeDeviceListCaps;
- driver->deviceCreateXML = nodeDeviceCreateXML;
- driver->deviceDestroy = nodeDeviceDestroy;
-}
-
-
int nodedevRegister(void) {
#if defined(HAVE_HAL) && defined(HAVE_UDEV)
/* Register only one of these two - they conflict */
diff --git a/src/node_device/node_device_driver.h b/src/node_device/node_device_driver.h
index e583c2b..08779b1 100644
--- a/src/node_device/node_device_driver.h
+++ b/src/node_device/node_device_driver.h
@@ -53,8 +53,6 @@ int udevNodeRegister(void);
void nodeDeviceLock(virDeviceMonitorStatePtr driver);
void nodeDeviceUnlock(virDeviceMonitorStatePtr driver);
-void registerCommonNodeFuncs(virDeviceMonitorPtr mon);
-
int nodedevRegister(void);
# ifdef __linux__
@@ -86,4 +84,16 @@ int read_wwn_linux(int host, const char *file, char **wwn);
# endif /* __linux__ */
+int nodeNumOfDevices(virConnectPtr conn, const char *cap, unsigned int flags);
+int nodeListDevices(virConnectPtr conn, const char *cap, char **const names,
+ int maxnames, unsigned int flags);
+virNodeDevicePtr nodeDeviceLookupByName(virConnectPtr conn, const char *name);
+char *nodeDeviceGetXMLDesc(virNodeDevicePtr dev, unsigned int flags);
+char *nodeDeviceGetParent(virNodeDevicePtr dev);
+int nodeDeviceNumOfCaps(virNodeDevicePtr dev);
+int nodeDeviceListCaps(virNodeDevicePtr dev, char **const names, int maxnames);
+virNodeDevicePtr nodeDeviceCreateXML(virConnectPtr conn,
+ const char *xmlDesc, unsigned int flags);
+int nodeDeviceDestroy(virNodeDevicePtr dev);
+
#endif /* __VIR_NODE_DEVICE_H__ */
diff --git a/src/node_device/node_device_hal.c b/src/node_device/node_device_hal.c
index 8df2875..a90e777 100644
--- a/src/node_device/node_device_hal.c
+++ b/src/node_device/node_device_hal.c
@@ -881,22 +881,30 @@ static int halNodeDrvClose(virConnectPtr conn ATTRIBUTE_UNUSED)
static virDeviceMonitor halDeviceMonitor = {
.name = "halDeviceMonitor",
- .open = halNodeDrvOpen,
- .close = halNodeDrvClose,
+ .open = halNodeDrvOpen, /* 0.5.0 */
+ .close = halNodeDrvClose, /* 0.5.0 */
+ .numOfDevices = nodeNumOfDevices, /* 0.5.0 */
+ .listDevices = nodeListDevices, /* 0.5.0 */
+ .deviceLookupByName = nodeDeviceLookupByName, /* 0.5.0 */
+ .deviceGetXMLDesc = nodeDeviceGetXMLDesc, /* 0.5.0 */
+ .deviceGetParent = nodeDeviceGetParent, /* 0.5.0 */
+ .deviceNumOfCaps = nodeDeviceNumOfCaps, /* 0.5.0 */
+ .deviceListCaps = nodeDeviceListCaps, /* 0.5.0 */
+ .deviceCreateXML = nodeDeviceCreateXML, /* 0.6.5 */
+ .deviceDestroy = nodeDeviceDestroy, /* 0.6.5 */
};
static virStateDriver halStateDriver = {
.name = "HAL",
- .initialize = halDeviceMonitorStartup,
- .cleanup = halDeviceMonitorShutdown,
- .reload = halDeviceMonitorReload,
- .active = halDeviceMonitorActive,
+ .initialize = halDeviceMonitorStartup, /* 0.5.0 */
+ .cleanup = halDeviceMonitorShutdown, /* 0.5.0 */
+ .reload = halDeviceMonitorReload, /* 0.5.0 */
+ .active = halDeviceMonitorActive, /* 0.5.0 */
};
int halNodeRegister(void)
{
- registerCommonNodeFuncs(&halDeviceMonitor);
if (virRegisterDeviceMonitor(&halDeviceMonitor) < 0)
return -1;
return virRegisterStateDriver(&halStateDriver);
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 29e4bac..8b9694e 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -1741,23 +1741,31 @@ static int udevNodeDrvClose(virConnectPtr conn)
static virDeviceMonitor udevDeviceMonitor = {
.name = "udevDeviceMonitor",
- .open = udevNodeDrvOpen,
- .close = udevNodeDrvClose,
+ .open = udevNodeDrvOpen, /* 0.7.3 */
+ .close = udevNodeDrvClose, /* 0.7.3 */
+ .numOfDevices = nodeNumOfDevices, /* 0.7.3 */
+ .listDevices = nodeListDevices, /* 0.7.3 */
+ .deviceLookupByName = nodeDeviceLookupByName, /* 0.7.3 */
+ .deviceGetXMLDesc = nodeDeviceGetXMLDesc, /* 0.7.3 */
+ .deviceGetParent = nodeDeviceGetParent, /* 0.7.3 */
+ .deviceNumOfCaps = nodeDeviceNumOfCaps, /* 0.7.3 */
+ .deviceListCaps = nodeDeviceListCaps, /* 0.7.3 */
+ .deviceCreateXML = nodeDeviceCreateXML, /* 0.7.3 */
+ .deviceDestroy = nodeDeviceDestroy, /* 0.7.3 */
};
static virStateDriver udevStateDriver = {
.name = "udev",
- .initialize = udevDeviceMonitorStartup,
- .cleanup = udevDeviceMonitorShutdown,
- .reload = udevDeviceMonitorReload,
- .active = udevDeviceMonitorActive,
+ .initialize = udevDeviceMonitorStartup, /* 0.7.3 */
+ .cleanup = udevDeviceMonitorShutdown, /* 0.7.3 */
+ .reload = udevDeviceMonitorReload, /* 0.7.3 */
+ .active = udevDeviceMonitorActive, /* 0.7.3 */
};
int udevNodeRegister(void)
{
VIR_DEBUG("Registering udev node device backend");
- registerCommonNodeFuncs(&udevDeviceMonitor);
if (virRegisterDeviceMonitor(&udevDeviceMonitor) < 0) {
return -1;
}
--
1.7.0.4
13 years, 5 months
Re: [libvirt] Operation forbidden for read only access
by Daniel Veillard
On Mon, Jun 06, 2011 at 01:27:47PM +0530, PREETHI RAMESH wrote:
> Sorry for my ignorance, but how do you do that?
>
> On Mon, Jun 6, 2011 at 11:12 AM, Daniel Veillard <veillard(a)redhat.com>wrote:
>
> > On Mon, Jun 06, 2011 at 08:41:51AM +0530, PREETHI RAMESH wrote:
> > > I'm using libvirt's Java API bindingsa and i've opened a connection :
> > [...]
> > > BUILD SUCCESSFUL (total time: 23 minutes 38 seconds)
> > >
> > > I've used qemu:///system but why is my operation being denied?
> >
> > On a read-only connection any operation which may modify the state of
> > the system will get denied. You need a read-write connection for
> > destroying a domain.
You do that by not asking for a read-only connection !
/**
* Constructs a Connect object from the supplied URI.
*
* @param uri
* The connection URI
* @param readOnly
* Whether the connection is read-only
* @throws LibvirtException
* @see <a href="http://libvirt.org/uri.html">The URI
* documentation</a>
*/
public Connect(String uri, boolean readOnly) throws LibvirtException
since your code does
conn = new Connect("qemu:///system", true);
you asked for it. Please read the docs/code !
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/
13 years, 5 months
[libvirt] Operation forbidden for read only access
by PREETHI RAMESH
I'm using libvirt's Java API bindingsa and i've opened a connection :
Connect conn=null;
Connect conn1=null;
Connect conn2=null;
Domain testDomain1 = null;
//connect to host vm
try{
conn = new Connect("qemu:///system", true);
System.out.println("exception ONE:");
} catch (LibvirtException e){
System.out.println("exception ONE caught:"+e);
System.out.println(e.getError());
}
//get the domain in host vm
try {
testDomain1 = conn.domainLookupByName("hda1");
System.out.println("exception TWO:");
} catch (LibvirtException ex) {
System.out.println("exception TWO CAUGHT");
//Logger.getLogger(Migrate.class.getName()).log(Level.SEVERE,
null, ex);
}
//check if domain is running
try{
System.out.println("Domain:" + testDomain1.getName() + " id " +
testDomain1.getID() + " running " +
testDomain1.getOSType());
System.out.println("exception THREE:");
} catch (LibvirtException e1){
System.out.println("exception THREE caught: "+e1);
System.out.println(e1.getError());
}
/*try{
conn1 = new Connect("qemu+ssh://root@10.129.54.254/system",
true);
//conn2 = new Connect("qemu+ssh://root@10.129.54.254/system",
true);
Domain migrate1;
System.out.println("done with ssh");
String uri="tcp://root@10.129.54.254:49166";
migrate1 = testDomain1.migrate(conn1,1,null,"tcp://
root(a)10.129.54.254",0);
//int ret=testDomain1.migrateToURI("tcp://
root@10.129.54.254:49155",1,null,0);
System.out.println("exception FOUR:");
}catch (LibvirtException e2){
System.out.println("exception FOUR caught:"+e2);
System.out.println(e2.getError());
}*/
try{
testDomain1.destroy();
System.out.println("Destroyed"+testDomain1);
}
catch(LibvirtException e4){
System.out.println("exception FOUR caught: "+e4);
System.out.println(e4.getError());
}
The output I'm getting is:
exception ONE:
exception TWO:
Domain:test id 1 running linux
exception THREE:
libvir: Domain error : operation virDomainDestroy forbidden for read only
access
exception FOUR caught: org.libvirt.LibvirtException: operation
virDomainDestroy forbidden for read only access
level:VIR_ERR_ERROR
code:VIR_ERR_OPERATION_DENIED
domain:VIR_FROM_DOM
hasConn:false
hasDom:false
hasNet:false
message:operation virDomainDestroy forbidden for read only access
str1:operation %s forbidden for read only access
str2:virDomainDestroy
str3:null
int1:-1
int2:-1
BUILD SUCCESSFUL (total time: 23 minutes 38 seconds)
I've used qemu:///system but why is my operation being denied?
Thanks!
13 years, 5 months
[libvirt] [libvirt-users] Release of libvirt-0.9.2
by Daniel Veillard
As planned the new release is available at:
ftp://libvirt.org/libvirt/
It is a rather large release with near 400 commits included. From
an user point of view the main improvement is likely to be when
using migration as various work has been done to extend the protocol
and to avoid having the migration command stop other concurrent
operations (like virsh list). See below for a number of new features,
improvement and bug fixes:
Features:
- Framework for lock manager plugins (Daniel P. Berrange)
- API for network config change transactions (Michal Privoznik)
- flags for setting memory parameters (Hu Tao)
- virDomainGetState public API (Jiri Denemark)
- qemu: allow blkstat/blkinfo calls during migration (Federico Simoncelli)
- Introduce migration v3 API (Daniel P. Berrange)
- Defining the Screenshot public API (Michal Privoznik)
- public API for NMI injection (Lai Jiangshan)
Documentation:
- esx: Fix driver method version annotations (Matthias Bolte)
- vbox: Fix typo in error message (Matthias Bolte)
- virsh: Document nodeinfo output (Jiri Denemark)
- Correct 'cputune' documentation example. (Neil Wilson)
- document iface-* commands (Eric Blake)
- Add initial docs about the lock managers (Daniel P. Berrange)
- maint: use consistent file name for threading notes (Eric Blake)
- Fix virTypedParameter alias comments (Matthias Bolte)
- Fix error syntax of vcpupin example XML (Osier Yang)
- Automatically generate the hvsupport.html.in file from source files (Daniel P. Berrange)
- Fix documentation for cputune parameters (Osier Yang)
- avoid double 'the' (Eric Blake)
- Add documentation about test suites (Daniel Veillard)
- updates to CA cert and client cert/key info (Doug Goldstein)
- node filesystem attr is 'accessmode', not 'mode' (Cole Robinson)
Portability:
- vbox: Fix version extraction on Windows for newer VirtualBox versions (Matthias Bolte)
- Make dlopen usage in lock manager conditional (Matthias Bolte)
- build: fix VPATH build break from previous patch (Eric Blake)
- Remove call to deprecated gnutls_certificate_type_set_priority (Daniel P. Berrange)
- Fix sysinfo/virsh build problems on Win32 (Daniel P. Berrange)
- Fix build with --with-driver-modules enabled (Matthias Bolte)
- build: fix 'make dist' for ./configure --without-remote (Eric Blake)
- virsh: time_t is not a long on FreeBSD (Matthias Bolte)
- time_t is not a long on FreeBSD, switch internal type to long long (Matthias Bolte)
- build: avoid strerror_r pitfalls (Eric Blake)
- build: fix VIR_DEBUG on mingw (Eric Blake)
- build: generate files when building without libvirtd (Wen Congyang)
- build: drop unused sys/syslimits.h header (Eric Blake)
- Fix prototype of virRun for Win32 targets (Daniel P. Berrange)
- build: tolerate unlimited group size (Eric Blake)
- Disable virCommandExec on Win32 (Daniel P. Berrange)
- command: Fix compilation on FreeBSD (Matthias Bolte)
- apparmor: Fix compilation by removing remains from virCommand conversion (Matthias Bolte)
- configure: Fix mpath check on non-Linux systems (Matthias Bolte)
- fix xdr detection and use with recent glibc (Christophe Fergeau)
- build: avoid gcc preprocessor extensions (Eric Blake)
- build: fix VPATH build with distributed generated files (Eric Blake)
- build: fix VPATH builds (Eric Blake)
Bug fixes:
- Fix QEMU p2p v2 migration when run from a v3 client (Daniel P. Berrange)
- Don't raise an error if the migration cookie is NULL (Daniel P. Berrange)
- Fix check of virKillProcess return status (Daniel P. Berrange)
- qemu: Avoid use after free in qemuCaps parsing (Jiri Denemark)
- security driver: ignore EINVAL when chowning an image file (Laine Stump)
- migrate: detect xml incompatibility (Eric Blake)
- event: avoid memory leak on cleanup (Eric Blake)
- qemu: avoid memory leak on vcpupin (Eric Blake)
- remote: avoid leak on failure (Eric Blake)
- lock: avoid leak on failure (Eric Blake)
- storage: avoid memory leak on stat failure (Eric Blake)
- storage: avoid memory leak (Eric Blake)
- libvirtd: avoid leak on failure (Eric Blake)
- command: avoid leak on failure (Eric Blake)
- Explicitly set VM state to paused after migration completes (Daniel P. Berrange)
- Fix regressions BlockStats/Info APIs in QEMU driver (Daniel P. Berrange)
- Fix minor issues in libxenlight managed save (Jim Fehlig)
- Fix auditing of disk hotunplug operations (Daniel P. Berrange)
- Avoid crash on NULL pointer in lock driver impls during hotplug (Daniel P. Berrange)
- Fix return value in lock manager hotplug methods (Daniel P. Berrange)
- Make sure virDomainSave/virDomainManagedSave reset id to -1 (Daniel P. Berrange)
- Fix handling of VIR_EVENT_HANDLE_ERROR in QEMU monitor (Daniel P. Berrange)
- security: plug regression introduced in disk probe logic (Eric Blake)
- Fix order of disks and controllers (Jiri Denemark)
- util: Fix incorrect error in PCI functions (Osier Yang)
- openvz: Restore original EOF handling in openvzGetProcessInfo (Matthias Bolte)
- openvz: Handle getline failures in openvzReadConfigParam properly (Matthias Bolte)
- conf: Fix incorrect spice graphic XML format on compression options (Michal Privoznik)
- nwfilter: reorder locks (Stefan Berger)
- openvz: Fix regression in openvzGetVPSUUID (Matthias Bolte)
- esx: Fix regression in absolute file name handling (Matthias Bolte)
- openvz: Fix regression in config file parsing (Taisuke Yamada)
- audit: fix minor off-by-one (Eric Blake)
- Fix libxl vm def handling on domU cleanup (Markus Groß)
- Fix modifying disk devices in qemu driver (Markus Groß)
- json: Avoid passing large positive 64 bit integers to QMP. (Richard W.M. Jones)
- Fix initialization of current vcpus in libxl driver (Jim Fehlig)
- qemu: Don't change ownership of file when appending to it (Michal Privoznik)
- qemu: fix typo in name - should be VHOST_NET, not VNET_HOST (Laine Stump)
- Fix QEMU -vnc arg generation with raw IPv6 addresses (Daniel P. Berrange)
- Fix peer2peer migration with transient VMs (Daniel P. Berrange)
- python: Don't free must-not-free variables (Michal Privoznik)
- python: Fix typo in bindings (Michal Privoznik)
- libvirt.spec: /var/cache/libvirt should be 0711. (Richard W.M. Jones)
- remote: remove bogus virDomainFree. (Richard W.M. Jones)
- qemudDomainMemoryPeek: change ownership/selinux label on temporary file. (Richard W.M. Jones)
- Fix QEMU migration cookie crash for guests with no graphics (Daniel P. Berrange)
- Blank out the 'listenAddr' parameter if empty string (Daniel P. Berrange)
- Improve invalid argument checks for the public API (Matthias Bolte)
- qemu: fix typo in spice migration code (Michal Privoznik)
- openvz: fix logic bug in previous patch (Eric Blake)
- Fix error reporting in stream creation code (Matthias Bolte)
- virsh: Correctly initialize libvirt (Jiri Denemark)
- Fix leak of mime type string in screenshot dispatcher (Daniel P. Berrange)
- Fix remote dispatcher for screenshot command (Daniel P. Berrange)
- Add missing initialization to 'ret' in qemu migration (Daniel P. Berrange)
- Close all sockets before cancelling QEMU migration (Daniel P. Berrange)
- Ensure we always read a full buffer in tunnelled migration (Daniel P. Berrange)
- phyp: avoid a crash (Eric Blake)
- stream: avoid use-after-free (Eric Blake)
- virsh: Fix uninitialized variable warning (Matthias Bolte)
- libxl: fix typos in previous patch (Eric Blake)
- node_device: avoid null dereference on error (Eric Blake)
- tests: avoid crash when run under gcov (Eric Blake)
- Fix two uninitialized variable warnings (Matthias Bolte)
- apparmor: Fix uninitalized variable warning in virt-aa-helper (Matthias Bolte)
- Fix qemuMigrationToFile nonull annotation (Daniel P. Berrange)
Improvements:
- API: consolidate common unreleased enums (Eric Blake)
- uml: correct command line networking parameters (Heath Petersen)
- Add call to sanlock_restrict() in QEMU lock driver (Daniel P. Berrange)
- screenshot: Expose the new API in virsh (Michal Privoznik)
- libxl: adds managed save and restore support (Markus Groß)
- libxl: get maximum memory of running domain (Markus Groß)
- Add a plugin for the 'sanlock' project (Daniel P. Berrange)
- Allow leases to be hotpluged with QEMU guests (Daniel P. Berrange)
- Support passing QEMU lock state to dest during migration (Daniel P. Berrange)
- Integrate the QEMU driver with the lock manager infrastructure (Daniel P. Berrange)
- Add higher level lock API for domain objects (Daniel P. Berrange)
- Add a 'nop' lock driver implementation. (Daniel P. Berrange)
- Support leases in guest XML and lock manager (Daniel P. Berrange)
- Allow handshake with child process during startup (Daniel P. Berrange)
- tests: really fix QEMU XML-2-ARGV graphics-spice-timeout test (Eric Blake)
- build: avoid corrupting / in RHEL 5 (Eric Blake)
- tests: Add a test for correct disk device ordering (Jiri Denemark)
- Fix QEMU XML-2-ARGV graphics-spice-timeout test (Matthias Bolte)
- remote generator: Handle some virTypedParameterPtr using functions (Matthias Bolte)
- apibuild: Restrict long usage to existing functions and structs (Matthias Bolte)
- remote generator: Legacy support for hyper to long mappings (Matthias Bolte)
- Use common parameter order for remote(De)SerializeTypedParameters (Matthias Bolte)
- openvz: Add simple test for openvzReadNetworkConf (Matthias Bolte)
- openvz: Set virtType to openvz in openvzLoadDomains (Matthias Bolte)
- storage: List directory volumes for dir/fs/netfs pools (Cole Robinson)
- tests: Add more complex domain scheme test data (Michal Privoznik)
- tests: Test for SPICE compression options (Michal Privoznik)
- Ignore backward compatibility macros in apibuild.py (Matthias Bolte)
- openvz: fix bridge devices parsing in openvzReadNetworkConf() (Jean-Baptiste Rouault)
- Allow custom XML to be passed in during migration (Daniel P. Berrange)
- Allow virsh to pass in a custom XML document for migration (Daniel P. Berrange)
- Add an API for comparing the ABI of two guest configurations (Daniel P. Berrange)
- Remove unused 'target' field in virDomainHostdevDef (Daniel P. Berrange)
- lxc: Seperate domain config loading (Osier Yang)
- openvz: Automatically disable on non-Linux systems (Matthias Bolte)
- Support maximum and current memory flags in libxl driver (Markus Groß)
- Add domainSave/Restore to libxl driver (Markus Groß)
- Add domainCoreDump to libxl driver (Markus Groß)
- Populate domid field of devices for libxenlight (Markus Groß)
- Issue full error messages when processing QEMU monitor I/O (Daniel P. Berrange)
- Don't kill QEMU process when a monitor I/O parsing error occurs (Daniel P. Berrange)
- Introduce a new event emitted when a virtualization failure occurs (Daniel P. Berrange)
- sched: provide new API shims for remaining drivers (Eric Blake)
- virsh: improve schedinfo querying ability (Eric Blake)
- remote: introduce remoteGetSchedulerParametersFlags (Eric Blake)
- qemu: introduce qemuGetSchedulerParametersFlags (Eric Blake)
- sched: introduce virDomainGetSchedulerParametersFlags (Eric Blake)
- remote: consolidate typed parameter handling (Eric Blake)
- maint: prefer newer API names internally (Eric Blake)
- libvirt.h: avoid regression, and document preferred name (Eric Blake)
- Fix virExecWithHook Prototype (Richard Laager)
- interface: reformat error logs (Laine Stump)
- interface: implement a test driver for network config transaction API. (Michal Privoznik)
- interface: Implement driver methods for network config transaction API (Michal Privoznik)
- interface: expose network config transaction API to virsh (Michal Privoznik)
- interface: implement remote protocol for network config transaction API (Michal Privoznik)
- interface: implement public APIs for libvirt transactional network changes (Michal Privoznik)
- interface: define internal driver API for network config transactions (Michal Privoznik)
- sexpr: Improve serialization error reporting (Matthias Bolte)
- qemu: implement the new flags for setting memory parameters (Hu Tao)
- qemu: implement the new flags for getting memory parameters (Hu Tao)
- qemu : support persistent add/delete network interface (KAMEZAWA Hiroyuki)
- openvz: Add simple testcase for config file parsing function (Matthias Bolte)
- Add disk attach/detach support to libxl driver (Markus Groß)
- Refactored libxl datastructure instantiation (Markus Groß)
- schema: Add graphics element passwdValidTo attribute to schema (Michal Privoznik)
- Fix sign mismatches between public API, driver API and XDR protocol (Matthias Bolte)
- remote generator: Fix XDR sign mismatch for virNodeGet(Cells)FreeMemory (Matthias Bolte)
- remote generator: Handle stream-using functions (Matthias Bolte)
- remote generator: Make call-by-reference handling stricter (Matthias Bolte)
- remote generator: Rename virNodeGetCellsFreeMemory parameters to common pattern (Matthias Bolte)
- remote generator: Handle virDomainCreateWithFlags (Matthias Bolte)
- Allow to explicitly disable the secrets a directory storage driver (Matthias Bolte)
- Fix the signature of virDomainMigrateFinish3 for error reporting (Daniel P. Berrange)
- Fix preservation of errors across migration steps (Daniel P. Berrange)
- Improve debug logging of migration APIs (Daniel P. Berrange)
- Fix error propagation in finish method for v3 migration (Daniel P. Berrange)
- Fix SPICE seamless migration hostname (Daniel P. Berrange)
- Fix resume on destination when doing non-live tunnelled migration (Daniel P. Berrange)
- Introduce two method migration APIs (Daniel P. Berrange)
- Add a second URI parameter to virDomainMigratePerform3 method (Daniel P. Berrange)
- Extend v3 migration protocol to allow app supplied XML for target (Daniel P. Berrange)
- esx: Report an error when auth pointer is missing instead of declining (Matthias Bolte)
- Perform feature flag compat checking in QEMU migration cookies (Daniel P. Berrange)
- Replace all remaining setgid/setuid calls with virSetUIDGID (Jiri Denemark)
- util: Keep errno set to the root error after when returning from virSetUIDGID (Jiri Denemark)
- storage: Add comment to picking return value of qemu-img (Michal Privoznik)
- spice: support streaming-video parameter (Alon Levy)
- nwfilter: enable filtering of gratuitous ARP packets (Stefan Berger)
- qemu: don't require is_kvm for vhost-net support (Laine Stump)
- Use per-user TLS certificates when possible (Doug Goldstein)
- storage: pick return value of qemu-img (Michal Privoznik)
- remote generator: Add special case for virConnectGetType (Matthias Bolte)
- remote generator: Don't rely on $_ being stable over a large function (Matthias Bolte)
- build: require newer gettext (Eric Blake)
- virsh: Use Env variables for debug level and logfile (Supriya Kannery)
- Don't generate cookies with v2 migration protocol. (Daniel P. Berrange)
- Ensure p2p and direct migration use the new v3 protocol if available (Daniel P. Berrange)
- remote: remove special case for getting version (Eric Blake)
- virsh: optimize creation of default connection (Eric Blake)
- Clarify that virDomainGet(Memory|Blkio)Parameters doesn't support subsets (Matthias Bolte)
- Clarify that virDomainSet(Memory|Blkio)Parameters can take parameter subsets (Matthias Bolte)
- Clarify that virDomainSetSchedulerParameters(Flags) can take subsets (Matthias Bolte)
- Clarify the semantic of virDomainGetSchedulerParameters arguments (Matthias Bolte)
- Clarify semantic of nparams argument of virDomainGetSchedulerType (Matthias Bolte)
- Fix messages using VIR_ERR_XML_ERROR (Cole Robinson)
- libvirt.h: consolidate typed parameter handling (Eric Blake)
- build: update to latest gnulib (Eric Blake)
- Add support for 'passthru' mode for direct network interfaces (Dirk Herrendorefer)
- virsh: add parameters --live, --config and --current to cmd schedinfo (Hu Tao)
- remote: introduce remoteSetSchedulerParametersFlags (Hu Tao)
- qemu: introduce qemuSetSchedulerParametersFlags (Hu Tao)
- sched: adjust parameter values to make current = 0 (Eric Blake)
- introduce virDomainSetSchedulerParametersFlags (Hu Tao)
- storage_backend: Convert virRunWithHook usage to virCommand (Cole Robinson)
- storage_backend: Fix error reporting with regex helper (Cole Robinson)
- storage: Covert regex helpers to virCommand (Cole Robinson)
- openvz: Convert virExec usage to virCommand (Cole Robinson)
- storage: iscsi: Convert virExec to virCommand (Cole Robinson)
- remote generator, client: Add more special case handling (Matthias Bolte)
- remote generator, client: Handle functions that return an optional string (Matthias Bolte)
- esx: Simplify some esxVI_Boolean to bool (Matthias Bolte)
- esx: Convert autoAnswer from esxVI_Boolean to a simple bool (Matthias Bolte)
- esx: Fix race condition in esxVI_EnsureSession (Matthias Bolte)
- esx: Whitespace cleanup in the generator (Matthias Bolte)
- esx: Change some alignments in the input file (Matthias Bolte)
- esx: Change generated method parameter autobinding (Matthias Bolte)
- virsh: Report an error when virGetUserDirectory fails (Matthias Bolte)
- maint: mark more perl scripts executable (Eric Blake)
- maint: mark perl script executable (Eric Blake)
- maint: ignore generated file (Eric Blake)
- Improve error message when XDR marshalling fails (Daniel P. Berrange)
- Run tunnelled migration IO in separate thread (Daniel P. Berrange)
- Don't overwrite error when stream send fails (Daniel P. Berrange)
- Make tunnelled migration honour resource restriction (Daniel P. Berrange)
- Refactor migration completion loop to allow code reuse (Daniel P. Berrange)
- Implement migration v3 protocol in QEMU driver (Daniel P. Berrange)
- Merge tunnel and non-tunnel migration impl into one (Daniel P. Berrange)
- Fix VM teardown if prepare returns invalid URI in v2 migration (Daniel P. Berrange)
- Refactor tunnelled migration methods (Daniel P. Berrange)
- Wire up SPICE client relocation with QEMU migration (Daniel P. Berrange)
- Pass graphics setup from dst back to src via migration cookies (Daniel P. Berrange)
- Introduce migration cookies to QEMU driver (Daniel P. Berrange)
- Fix locking with qemuMigrationPrepareTunnel method (Daniel P. Berrange)
- Remote driver implementation of new migration API (Daniel P. Berrange)
- Add many version number annotations to drivers (Daniel P. Berrange)
- Convert all driver struct intializers to C99 style (Daniel P. Berrange)
- Tweak driver naming for consistency with public API (Daniel P. Berrange)
- qemu: Update domain state when reconnecting monitor (Jiri Denemark)
- Implement domain state reason (Jiri Denemark)
- Implement basic virDomainGetState in all drivers (Jiri Denemark)
- virsh: Prefer virDomainGetState over virDomainGetInfo (Jiri Denemark)
- Wire protocol format and remote driver for virDomainGetState (Jiri Denemark)
- virDomainGetState public API implementation (Jiri Denemark)
- Internal driver API for virDomainGetState (Jiri Denemark)
- esx: Refactor common code in the generator (Matthias Bolte)
- esx: Improve dynamic cast detection in the generator (Matthias Bolte)
- esx: Improve list usage detection in the generator (Matthias Bolte)
- esx: Remove 1000 lines of generated but unused code (Matthias Bolte)
- esx: Generate implicit _this macros (Matthias Bolte)
- esx: Move the Event type from the VI generator to manually written code (Matthias Bolte)
- test: all test_scripts should be part of tarball when building without libvirtd (Wen Congyang)
- build: probes.d and libvirtd.stp should be part of tarball (Wen Congyang)
- remote: Convert SSH tunnel to virCommand (Cole Robinson)
- storage: Convert qemu-img -help parsing to virCommand (Cole Robinson)
- apparmor: Convert virExec usage to virCommand (Cole Robinson)
- util: Combine __virExec and virExecWithHook (Cole Robinson)
- remote_driver: Convert virExecDaemonize usage to virCommand (Cole Robinson)
- remote: Use virDomainEventState helpers (Cole Robinson)
- libxl: Convert to virDomainEventState (Cole Robinson)
- test: Use virDomainEventState helpers (Cole Robinson)
- lxc: Use virDomainEventState helpers (Cole Robinson)
- qemu: Use virDomainEventState helpers (Cole Robinson)
- domain_event: Add common domain event queue/flush helpers (Cole Robinson)
- domain_event: Add virDomainEventState structure (Cole Robinson)
- xml: Use virXMLParse* helpers everywhere (Cole Robinson)
- domain: Require init node for container guests (Cole Robinson)
- xml: Make sure virXpathNodeSet always sets an error (Cole Robinson)
- vbox: Implement the Screenshot driver methods (Michal Privoznik)
- qemu: Implement the Screenshot driver methods (Michal Privoznik)
- virFDStream: Add option for delete file after it's opening (Michal Privoznik)
- Implementing the Screenshot remote protocol (Michal Privoznik)
- Implementing the Screenshot public API (Michal Privoznik)
- Defining the Screenshot internal API (Michal Privoznik)
- remote generator: Add skipgen/autogen flags to .x files (Matthias Bolte)
- nwfilter: drop unused flag argument (Eric Blake)
- maint: omit translation for all VIR_INFO (Eric Blake)
- build: wrap macro body in one-shot do-while loop (Eric Blake)
- build: drop need for VIR_DOMAIN_DEBUG0() (Eric Blake)
- libvirt,logging: cleanup VIR_XXX0() (Lai Jiangshan)
- maint: avoid a couple of gnulib regressions (Eric Blake)
- build: remove some dead assignments (Eric Blake)
- Allow destroying QEMU VM even if a job is active (Daniel P. Berrange)
- Add support for YAJL version 2 API/ABI (Daniel P. Berrange)
- libxl: support enabling the HPET (Paolo Bonzini)
- libxl: support enabling the HPET (Paolo Bonzini)
- xen: parse and generate hpet item in sxpr (Paolo Bonzini)
- virsh: flexibility in CA cert and user cert/key (Doug Goldstein)
- remote generator: Make parsing stricter (Matthias Bolte)
- remote generator: Unify unsigned int notation in .x files (Matthias Bolte)
- remote generator: Fix comment ignoring regex (Matthias Bolte)
- Rename internal DumpXML functions to GetXMLDesc (Matthias Bolte)
- qemu,inject-nmi: Implement the driver methods (Lai Jiangshan)
- inject-nmi: Expose the new API in virsh (Lai Jiangshan)
- inject-nmi: Implementing the remote protocol (Lai Jiangshan)
- inject-nmi: Implementing the public API (Lai Jiangshan)
- inject-nmi: Defining the internal API (Lai Jiangshan)
- lxc: container: Build init cmd before we close stdout (Cole Robinson)
- lxc: container: Convert init node exec to virCommand (Cole Robinson)
- command: Add virCommandExec helper (Cole Robinson)
- lxc: driver: Improve logging when launching emulator (Cole Robinson)
- lxc: driver: Convert emulator launching to virCommand (Cole Robinson)
- command: Add virCommandEnvAddFormat (Cole Robinson)
- build: translate generated strings (Eric Blake)
- Pull in gnulib fnmatch module (Daniel P. Berrange)
- json: Fix *GetBoolean functions (Jiri Denemark)
- build: rebuild generated files after rpcgen_fix.pl tweak (Eric Blake)
- Re-add libvirt.spec to tarball to allwo "make rpm" (Daniel Veillard)
- build: Remove all generated RPC files from GIT (Daniel P. Berrange)
- build: refactor generated RPC files (Daniel P. Berrange)
- build: rename generated files to .h, for automake's sake (Eric Blake)
- remote generator, client: Handle arguments with limited length (Matthias Bolte)
- remote generator, client: Handle functions that return lists (Matthias Bolte)
- remote: Refactor remote*Open and remote*Close functions (Matthias Bolte)
- remote generator, client: Handle functions with optional return values (Matthias Bolte)
- remote generator, client: Handle functions with multiple return values (Matthias Bolte)
- remote generator, client: Handle functions with wrapped return values (Matthias Bolte)
- remote generator, client: Handle functions with simple return values (Matthias Bolte)
- remote generator, client: Handle simple remote driver functions (Matthias Bolte)
- remote generator: Reorder into prepare and print section (Matthias Bolte)
- remote generator, daemon: Handle functions with multiple return values (Matthias Bolte)
- remote generator, daemon: Combine multiple ifs in the generated code (Matthias Bolte)
- remote generator, daemon: Handle the CPU functions (Matthias Bolte)
- remote generator: Refactor duplicate code (Matthias Bolte)
- remote generator, daemon: Handle functions that return lists (Matthias Bolte)
- remote: Rename 'nameslen' to the common 'maxnames' (Matthias Bolte)
- remote generator, daemon: Handle functions with optional arguments (Matthias Bolte)
- remote generator, daemon: Handle more functions (Matthias Bolte)
- remote generator, daemon: Handle simple-return-value functions (Matthias Bolte)
- remote generator, daemon: Change capitalization of some words (Matthias Bolte)
- remote: Replace 'domain' with 'dom' in the XDR protocol (Matthias Bolte)
- remote generator, daemon: Output function bodies too (Matthias Bolte)
- remote generator: Replace tabs with spaces and rename file (Matthias Bolte)
- Balloon dom0 in libxl driver (Markus Groß)
- remote: check actual access to the cert (Doug Goldstein)
- maint: avoid comparisons to bool constants (Eric Blake)
- Add warning message to XML definition files stored on disk (Michal Privoznik)
- Fix security driver handling of FIFOs with QEMU (Daniel P. Berrange)
- Make taint warnings also go into the domain logfile (Daniel P. Berrange)
- Add a qemuDomainAppendLog method for writing to the domain logfile (Daniel P. Berrange)
- Move qemuProcessLogReadFD and qemuProcessLogFD methods (Daniel P. Berrange)
- Log taint warnings in QEMU driver (Daniel P. Berrange)
- Add field to virDomainObjPtr to track "tainting" (Daniel P. Berrange)
- virsh: improve TLS certificate error messages (Doug Goldstein)
- virsh: use new method for easier log to file (Eric Blake)
- buf: add virBufferVasprintf (Eric Blake)
- maint: rename virBufferVSprintf to virBufferAsprintf (Eric Blake)
- Make QEMU migration use cached qemu capabilities data (Daniel P. Berrange)
- Make QEMU hotplug use cached qemu capabilities data (Daniel P. Berrange)
- Persist qemu capabilities in the domain status file (Daniel P. Berrange)
Cleanups:
- build: silence coverity false positive (Eric Blake)
- build: silence coverity false positive (Eric Blake)
- .gitignore: Exempt a new test binary. (Eric Blake)
- Ensure hvsupport.html.in is built before HTML validation (Daniel P. Berrange)
- Fix a make check error (Daniel Veillard)
- Add sexpr.c to the list of file with translatable messages (Matthias Bolte)
- don't check flags in virDomainSetSchedulerParametersFlags (Hu Tao)
- build: silence clang false positive (Eric Blake)
- Remove obsolete remoteDispatchOOMError method (Daniel P. Berrange)
- remote: keep 'make check' happy (Eric Blake)
- build: avoid compiler warning during configure (Wen Congyang)
- Remove bogus assert() from migration code (Daniel P. Berrange)
- build: drop files generated by config.status from tarball (Eric Blake)
Thanks everybody for contributing to the release, with documentation,
ideas, feedback or patches !
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/
13 years, 5 months
[libvirt] [PATCH] esx: Fix driver method version annotations
by Matthias Bolte
---
src/esx/esx_interface_driver.c | 6 +++---
src/esx/esx_network_driver.c | 6 +++---
src/esx/esx_nwfilter_driver.c | 6 +++---
src/esx/esx_secret_driver.c | 6 +++---
src/esx/esx_storage_driver.c | 2 +-
5 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/esx/esx_interface_driver.c b/src/esx/esx_interface_driver.c
index 3f9c175..a468976 100644
--- a/src/esx/esx_interface_driver.c
+++ b/src/esx/esx_interface_driver.c
@@ -66,9 +66,9 @@ esxInterfaceClose(virConnectPtr conn)
static virInterfaceDriver esxInterfaceDriver = {
- "ESX", /* name */
- .open = esxInterfaceOpen, /* 0.7.0 */
- .close = esxInterfaceClose, /* 0.7.0 */
+ .name = "ESX",
+ .open = esxInterfaceOpen, /* 0.7.6 */
+ .close = esxInterfaceClose, /* 0.7.6 */
};
diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c
index 9385a26..3c76fae 100644
--- a/src/esx/esx_network_driver.c
+++ b/src/esx/esx_network_driver.c
@@ -66,9 +66,9 @@ esxNetworkClose(virConnectPtr conn)
static virNetworkDriver esxNetworkDriver = {
- "ESX", /* name */
- .open = esxNetworkOpen, /* 0.7.0 */
- .close = esxNetworkClose, /* 0.7.0 */
+ .name = "ESX",
+ .open = esxNetworkOpen, /* 0.7.6 */
+ .close = esxNetworkClose, /* 0.7.6 */
};
diff --git a/src/esx/esx_nwfilter_driver.c b/src/esx/esx_nwfilter_driver.c
index ee85abc..13cacd4 100644
--- a/src/esx/esx_nwfilter_driver.c
+++ b/src/esx/esx_nwfilter_driver.c
@@ -65,9 +65,9 @@ esxNWFilterClose(virConnectPtr conn)
static virNWFilterDriver esxNWFilterDriver = {
- "ESX", /* name */
- .open = esxNWFilterOpen, /* 0.8.0 */
- .close = esxNWFilterClose, /* 0.8.0 */
+ .name = "ESX",
+ .open = esxNWFilterOpen, /* 0.8.1 */
+ .close = esxNWFilterClose, /* 0.8.1 */
};
diff --git a/src/esx/esx_secret_driver.c b/src/esx/esx_secret_driver.c
index dff2290..656224e 100644
--- a/src/esx/esx_secret_driver.c
+++ b/src/esx/esx_secret_driver.c
@@ -64,9 +64,9 @@ esxSecretClose(virConnectPtr conn)
static virSecretDriver esxSecretDriver = {
- "ESX", /* name */
- .open = esxSecretOpen, /* 0.7.1 */
- .close = esxSecretClose, /* 0.7.1 */
+ .name = "ESX",
+ .open = esxSecretOpen, /* 0.7.6 */
+ .close = esxSecretClose, /* 0.7.6 */
};
diff --git a/src/esx/esx_storage_driver.c b/src/esx/esx_storage_driver.c
index 5ee0cf4..6461917 100644
--- a/src/esx/esx_storage_driver.c
+++ b/src/esx/esx_storage_driver.c
@@ -1645,7 +1645,7 @@ esxStoragePoolIsPersistent(virStoragePoolPtr pool ATTRIBUTE_UNUSED)
static virStorageDriver esxStorageDriver = {
- "ESX", /* name */
+ .name = "ESX",
.open = esxStorageOpen, /* 0.7.6 */
.close = esxStorageClose, /* 0.7.6 */
.numOfPools = esxNumberOfStoragePools, /* 0.8.2 */
--
1.7.0.4
13 years, 5 months
[libvirt] [PATCH] Fix QEMU p2p v2 migration when run from a v3 client
by Daniel P. Berrange
When peer-2-peer migration was invoked by a client supporting
v3, but where the target server only supported v2, we'd not
correctly shutdown the guest.
* src/qemu/qemu_migration.c: Ensure guest is shutdown in
v2 peer 2 peer migration
---
src/qemu/qemu_migration.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index fa506e2..f7eaa1c 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2199,12 +2199,12 @@ static int doPeer2PeerMigrate(struct qemud_driver *driver,
const char *uri,
unsigned long flags,
const char *dname,
- unsigned long resource)
+ unsigned long resource,
+ bool *v3proto)
{
int ret = -1;
virConnectPtr dconn = NULL;
bool p2p;
- bool v3;
VIR_DEBUG("driver=%p, sconn=%p, vm=%p, xmlin=%s, dconnuri=%s, "
"uri=%s, flags=%lu, dname=%s, resource=%lu",
driver, sconn, vm, NULLSTR(xmlin), NULLSTR(dconnuri),
@@ -2226,8 +2226,12 @@ static int doPeer2PeerMigrate(struct qemud_driver *driver,
qemuDomainObjEnterRemoteWithDriver(driver, vm);
p2p = VIR_DRV_SUPPORTS_FEATURE(dconn->driver, dconn,
VIR_DRV_FEATURE_MIGRATION_P2P);
- v3 = VIR_DRV_SUPPORTS_FEATURE(dconn->driver, dconn,
- VIR_DRV_FEATURE_MIGRATION_V3);
+ /* v3proto reflects whether the caller used Perform3, but with
+ * p2p migrate, regardless of whether Perform3 or Perform3
+ * were used, we decide protocol based on what target supports
+ */
+ *v3proto = VIR_DRV_SUPPORTS_FEATURE(dconn->driver, dconn,
+ VIR_DRV_FEATURE_MIGRATION_V3);
qemuDomainObjExitRemoteWithDriver(driver, vm);
if (!p2p) {
@@ -2243,7 +2247,7 @@ static int doPeer2PeerMigrate(struct qemud_driver *driver,
goto cleanup;
}
- if (v3)
+ if (*v3proto)
ret = doPeer2PeerMigrate3(driver, sconn, dconn, vm, xmlin,
dconnuri, uri, flags, dname, resource);
else
@@ -2310,7 +2314,8 @@ int qemuMigrationPerform(struct qemud_driver *driver,
}
if (doPeer2PeerMigrate(driver, conn, vm, xmlin,
- dconnuri, uri, flags, dname, resource) < 0)
+ dconnuri, uri, flags, dname,
+ resource, &v3proto) < 0)
/* doPeer2PeerMigrate already set the error, so just get out */
goto endjob;
} else {
--
1.7.4.4
13 years, 5 months
[libvirt] [PATCH] qemu: Parse current balloon value returned by query_balloon.
by Osier Yang
Qemu once supported following memory stats which will returned by
"query_balloon":
stat_put(dict, "actual", actual);
stat_put(dict, "mem_swapped_in", dev->stats[VIRTIO_BALLOON_S_SWAP_IN]);
stat_put(dict, "mem_swapped_out", dev->stats[VIRTIO_BALLOON_S_SWAP_OUT]);
stat_put(dict, "major_page_faults", dev->stats[VIRTIO_BALLOON_S_MAJFLT]);
stat_put(dict, "minor_page_faults", dev->stats[VIRTIO_BALLOON_S_MINFLT]);
stat_put(dict, "free_mem", dev->stats[VIRTIO_BALLOON_S_MEMFREE]);
stat_put(dict, "total_mem", dev->stats[VIRTIO_BALLOON_S_MEMTOT]);
But it later disabled all the stats except "actual" by commit
07b0403dfc2b2ac179ae5b48105096cc2d03375a.
libvirt doesn't parse "actual", so user will always see a empty result
with "virsh dommemstat $domain". Even qemu haven't disabled the stats,
we should support parsing "actual".
---
include/libvirt/libvirt.h.in | 4 +++-
src/libvirt.c | 2 ++
src/qemu/qemu_monitor_json.c | 12 ++++++++++++
tools/virsh.c | 2 ++
4 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index 8058229..864852b 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -456,11 +456,13 @@ typedef enum {
*/
VIR_DOMAIN_MEMORY_STAT_AVAILABLE = 5,
+ /* Current balloon value (in KB). */
+ VIR_DOMAIN_MEMORY_STAT_ACTUAL = 6,
/*
* The number of statistics supported by this version of the interface.
* To add new statistics, add them to the enum and increase this value.
*/
- VIR_DOMAIN_MEMORY_STAT_NR = 6,
+ VIR_DOMAIN_MEMORY_STAT_NR = 7,
} virDomainMemoryStatTags;
typedef struct _virDomainMemoryStat virDomainMemoryStatStruct;
diff --git a/src/libvirt.c b/src/libvirt.c
index eaae0ec..c635ff5 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -5802,6 +5802,8 @@ error:
* The amount of memory which is not being used for any purpose (in kb).
* VIR_DOMAIN_MEMORY_STAT_AVAILABLE:
* The total amount of memory available to the domain's OS (in kb).
+ * VIR_DOMAIN_MEMORY_STAT_ACTUAL:
+ * Current balloon value (in kb).
*
* Returns: The number of stats provided or -1 in case of failure.
*/
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 75adf66..9f16403 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -1119,6 +1119,18 @@ int qemuMonitorJSONGetMemoryStats(qemuMonitorPtr mon,
goto cleanup;
}
+ if (virJSONValueObjectHasKey(data, "actual") && (got < nr_stats)) {
+ if (virJSONValueObjectGetNumberUlong(data, "actual", &mem) < 0) {
+ qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("info balloon reply was missing balloon actual"));
+ ret = -1;
+ goto cleanup;
+ }
+ stats[got].tag = VIR_DOMAIN_MEMORY_STAT_ACTUAL;
+ stats[got].val = (mem/1024);
+ got++;
+ }
+
if (virJSONValueObjectHasKey(data, "mem_swapped_in") && (got < nr_stats)) {
if (virJSONValueObjectGetNumberUlong(data, "mem_swapped_in", &mem) < 0) {
qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
diff --git a/tools/virsh.c b/tools/virsh.c
index 5679a2d..a358b73 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -1147,6 +1147,8 @@ cmdDomMemStat(vshControl *ctl, const vshCmd *cmd)
vshPrint (ctl, "unused %llu\n", stats[i].val);
if (stats[i].tag == VIR_DOMAIN_MEMORY_STAT_AVAILABLE)
vshPrint (ctl, "available %llu\n", stats[i].val);
+ if (stats[i].tag == VIR_DOMAIN_MEMORY_STAT_ACTUAL)
+ vshPrint (ctl, "actual %llu\n", stats[i].val);
}
virDomainFree(dom);
--
1.7.4
13 years, 5 months
[libvirt] Building on Solaris 11 Express
by Richard Laager
I would really like to use ZFS's zvols as storage for my guests. I
really like ZFS's snapshots, send/receive, and checksumming features.
(Compression and deduplication might be useful as well.)
I'm roughly about half-way done writing a ZFS storage backend for
libvirt. It behaves like the LVM backend. I've been writing it on Linux.
However, ZFS on Linux is not yet production-ready.
So I tried building libvirt on Solaris 11 Express. The following
outlines the trouble (and successes) I've had so far.
First, I had to prune down the features being built:
I added --without-xen to deal with the following. I wasn't
intending on using Xen, so this doesn't bother me personally.
configure: error: You must install the Xen development package to compile Xen driver with -lxenstore
I added --without-openvz to deal with the following. Likewise,
I'm not using it.
CC libvirt_driver_openvz_la-openvz_driver.lo
openvz/openvz_driver.c:45:19: paths.h: No such file or directory
In file included from ../src/conf/domain_conf.h:40,
from openvz/openvz_conf.h:33,
from openvz/openvz_driver.c:56:
../src/conf/nwfilter_conf.h:521: warning: parameter has incomplete type
I added --without-network to deal with the following. I may need
to actually fix this at some point.
CC libvirt_util_la-bridge.lo
util/bridge.c:39:20: paths.h: No such file or directory
util/bridge.c:42:55: linux/param.h: No such file or directory
util/bridge.c:43:55: linux/sockios.h: No such file or directory
util/bridge.c:44:55: linux/if_bridge.h: No such file or directory
util/bridge.c:45:55: linux/if_tun.h: No such file or directory
util/bridge.c: In function `ifSetInterfaceMac':
util/bridge.c:313: error: `SIOCGIFHWADDR' undeclared (first use in this function)
util/bridge.c:313: error: (Each undeclared identifier is reported only once
util/bridge.c:313: error: for each function it appears in.)
util/bridge.c:316: error: structure has no member named `ifr_hwaddr'
util/bridge.c:318: error: `SIOCSIFHWADDR' undeclared (first use in this function)
util/bridge.c: In function `ifGetMtu':
util/bridge.c:347: error: `SIOCGIFMTU' undeclared (first use in this function)
util/bridge.c: In function `ifSetMtu':
util/bridge.c:378: error: `SIOCSIFMTU' undeclared (first use in this function)
util/bridge.c: In function `brAddTap':
util/bridge.c:501: error: `IFF_TAP' undeclared (first use in this function)
util/bridge.c:501: error: `IFF_NO_PI' undeclared (first use in this function)
util/bridge.c:515: error: `TUNSETIFF' undeclared (first use in this function)
util/bridge.c:537: error: `TUNSETPERSIST' undeclared (first use in this function)
util/bridge.c: In function `brDeleteTap':
util/bridge.c:567: error: `IFF_TAP' undeclared (first use in this function)
util/bridge.c:567: error: `IFF_NO_PI' undeclared (first use in this function)
util/bridge.c:574: error: `TUNSETIFF' undeclared (first use in this function)
util/bridge.c:575: error: `TUNSETPERSIST' undeclared (first use in this function)
util/bridge.c: In function `brSetInterfaceUp':
util/bridge.c:612: error: `SIOCGIFFLAGS' undeclared (first use in this function)
util/bridge.c:620: error: `SIOCSIFFLAGS' undeclared (first use in this function)
util/bridge.c: In function `brGetInterfaceUp':
util/bridge.c:652: error: `SIOCGIFFLAGS' undeclared (first use in this function)
Then, I had to fix a trivial code error. I've mailed the patch to this
list with a subject of "[PATCH] Fix virExecWithHook Prototype".
I also had linker trouble. Solaris 11's gcc package uses Solaris ld, not
GNU ld. I had to change the following:
VERSION_SCRIPT_FLAGS=-Wl,--version-script=
`$LD --help 2>&1 | grep -- --version-script >/dev/null` || \
- VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,"
+ VERSION_SCRIPT_FLAGS=""
Interestingly, this code seems to have been added to support Solaris ld
according to git blame; see git log c2fb8bfe. I'm not sure what is
correct here.
At this point, libvirt builds and installs. I tested virsh against a
remote system using: virsh -c qemu+ssh://REMOTE/system
This worked except for the fact that it was trying to attach
to /usr/local/var/run/libvirt-sock on the remote system due
to /usr/local being the --prefix used with the *local* virsh was built.
I'm not sure how that architectural issue should be addressed. For
testing, I just made a /usr/local/var -> /var symlink on the remote
system.
However, libvirtd will not start locally (on Solaris) which has pretty
much stopped my progress. I'm sure this must be something trivial. Is it
getting a bad prefix? Is something other than libvirtd supposed to make
the socket file? I did try making a /.libvirt directory for testing.
# rm /usr/local/var/run/libvirtd.pid ; /usr/local/sbin/libvirtd -v
20:13:33.663: 1: info : libvirt version: 0.9.1
20:13:33.663: 1: error : qemudListenUnix:605 : Failed to bind socket to
'@//.libvirt/libvirt-sock': No such file or directory
Thanks,
Richard
13 years, 5 months