Commit Graph

20908 Commits

Author SHA1 Message Date
Daniel P. Berrange
5cce775e92 libvirtd: enable virtlockd/virtlogd socket activation on install
When someone does 'systemctl enable libvirtd.service' we should
also enable virtlockd.socket/virtlogd.socket, so that they can
be auto-activated if libvirtd tries to access the sockets.

Without this, people have to manually enable the units themselves
via 'systemctl enable virtdlogd.socket'.

This also ensures that if distros uses  'systemctl preset' for
enabling 'libvirtd.service', then the virtdlogd.socket gets
enabled without having to wait for the distro to update their
presets file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-12-07 17:32:49 +00:00
Daniel P. Berrange
b6cbabc551 logging: validate flags passed from client in virtlogd
The virtlogd RPC messages all have a flags parameter. For
sake of future error reporting we should be verifying
these are all 0 for now.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-12-07 17:30:07 +00:00
Daniel P. Berrange
50896b2804 logging: change log protocol to be more reusable
The current virtlogd RPC protocol provides the ability to
handle log files associated with QEMU stdout/err. The log
protocol messages take the virt driver, domain name and
use that to form a log file path. This is quite restrictive
as it prevents us re-using the same RPC protocol messages
for logging to char device backends where the filename
can be arbitrarily user specified. It is also bad because
it means we have 2 separate locations which have to decide
on logfile name.

This change alters the RPC protocol so that we pass the
desired log file path along when opening the log file
initially. Now the virt driver is exclusively in charge
of deciding the log filename

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-12-07 17:30:07 +00:00
Daniel P. Berrange
d4abb09d80 logging: preserve driver, dom name & uuid against log file
The virt driver, dom name and uuid associated with a log
file are important pieces of metadata to keep around for
sake of future enhancements to virtlogd. Currently we
discard them after opening the log file, but we should
preserve them, even across restarts.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-12-07 17:30:07 +00:00
Daniel P. Berrange
0eafe9955b qemu: fix memory leak in opening log file
The qemuDomainLogContextNew method leaks the "logfile" path
on the non-virtlogd code path.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-12-07 17:30:07 +00:00
Nikolay Shirokovskiy
2b8d0d44b9 libvirt: Update virDomainSetMemory description
virDomainSetMemory is documented to change only runtime configuration of
running domain. However, that's not true of all hypervisors supported.
Seems as though when commit id '0f2e50be5' added the current flag, the
function description should have been updated similar to when commit id
'c1795c52' updated the virDomainSetMaxMemory description. Especially since
commit id '80427f1d' updated the virsh 'setmem' description to indicate
"behavior is different depending on hypervisor."

This patch will update the description to match current functionality.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
2015-12-04 16:43:35 -05:00
Boris Fiuczynski
105794cd43 qemu: Automatic SCSI controller creation in SCSI disk hotplug broken
When a SCSI disk is hotplugged to a domain that does not have the required
SCSI controller already defined and loaded the following internal error occurs

error: Failed to attach device from scsi_disk.xml
error: internal error: Could not find scsi controller with index 0 required for device

Commit 0260506c added in method qemuBuildDriveDevStr a lookup of the controller
alias. The internal error occurs because in method qemuDomainAttachSCSIDisk
the automatic creation of the potentially missing SCSI controller occurs after
calling qemuBuildDriveDevStr.

This patch reverses the calling sequence.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
Reviewed-by: Stefan Zimmermann <stzi@linux.vnet.ibm.com>
2015-12-04 13:50:06 -05:00
Daniel P. Berrange
45c7b9e636 qemu: include hostname in QEMU log files
Often when debugging bug reports one is given a copy of the file
from /var/log/libvirt/qemu/$NAME.log along with other supporting
files. In a number of cases I've been given sets of files which
were from different machines. Including the hostname in the QEMU
log file will help identify when the bug reporter is providing
bad information.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-12-04 18:19:25 +00:00
Daniel P. Berrange
bf02b123d1 rotatingfile: mark log files as close-on-exec
The log file descriptor associated with the virRotatingFile
struct should be marked close-on-exec, as even when virtlogd
re-exec's itself it expect to open the log file fresh. It
does not need to preserve the logfile handles, only the network
client FDs.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-12-04 18:18:39 +00:00
Guido Günther
a8bb330f94 libvirtd: require virtlogd to start before libvirtd
In the non-systemd case, without socket activation, we need to proper
ordering.
2015-12-04 17:45:21 +01:00
Peter Krempa
645881139b qemu: domain: Prevent overflows in memory alignment code
Since libvirt for dubious historical reasons stores memory size as
kibibytes, it's possible that the alignments done in the qemu code
overflow the the maximum representable size in bytes. The XML parser
code handles them in bytes in some stages. Prevent this by doing
overflow checks when alinging the size and add a test case.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1260576
2015-12-04 15:21:20 +01:00
Peter Krempa
e5fac00946 schema: Allow > UINT_MAX KiB of memory for NUMA nodes
Using more than 4TiB of memory per NUMA node would not be possible to
express in the XML without violating the schema. Not that such boxes
would be common, but we should use a longer type at this point.

The pattern is not necessary since libvirt redefines the type already in
basictypes.rng with the same pattern.
2015-12-04 15:21:20 +01:00
Boris Fiuczynski
dc692438f3 conf: Revert some code to resolve issues for hostdev hotplug
This patch reverts parts of commits 0d8b24f6b and 0785966d dealing with
the addition of a controller during virDomainHostdevAssignAddress. This
caused a regression for the hostdev hotplug path which assumes the
qemuDomainFindOrCreateSCSIDiskController will add the new controller
during qemuDomainAttachHostSCSIDevice to both the running domain and
the domain def controller list when the controller doesn't yet exist
(whether due to no SCSI controllers existing or the addition of a new
controller because existing ones are full).

Since commit id 0d8b24f6 will call virDomainHostdevAssignAddress during
virDomainDeviceDefPostParseInternal which is called either during domain
definition post processing (via an iterator during virDomainDefPostParse)
or directly from virDomainDeviceDefParse during hotplug, the change
broke the "side effect" of being able to add both a hostdev and controller
to the running domain.

The regression would only be seen if the running domain didn't have a
SCSI controller already defined or if the existing SCSI controller was
"full" of devices and a new controller needed to be created.

This patch will also add some extra comments to the code to avoid a
similar future change.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
Reviewed-by: Stefan Zimmermann <stzi@linux.vnet.ibm.com>
2015-12-03 11:22:51 -05:00
Ján Tomko
b15e26f939 virsh: remove custom error for cpulist from cmdIOThreadPin
Instead of the custom error:
error: iothreadpin: invalid cpulist.

use vshCommandOptStringReq and let it report a more specific error:
error: Failed to get option 'cpulist': Option argument is empty
2015-12-03 13:58:52 +01:00
Ján Tomko
45138725cf virsh: report errors for empty strings
Several callers were using vshCommandOptString without setting an error.
Use vshCommandOptStringReq which sets the error.

https://bugzilla.redhat.com/show_bug.cgi?id=1281707
2015-12-03 13:58:52 +01:00
Ján Tomko
1e6d87bdfc bridge: check for invalid MAC in networkGetDHCPLeases
Instead of comparing garbage strings against real MAC addresses,
introduce an error mesage for unparsable ones:

$ virsh net-dhcp-leases default  --mac t12
error: Failed to get leases info for default
error: invalid MAC address: t12

https://bugzilla.redhat.com/show_bug.cgi?id=1261432
2015-12-03 10:15:22 +01:00
Joao Martins
d2e5538b16 libxl: implement virDomainInterfaceStats
Introduce support for domainInterfaceStats API call for querying
network interface statistics. Consequently it also enables the
use of `virsh domifstat <dom> <interface name>` command plus
seeing the interfaces names instead of "-" when doing
`virsh domiflist <dom>`.

After successful guest creation we fill the network
interfaces names based on domain, device id and append suffix
if it's emulated in the following form: vif<domid>.<devid>[-emu].
We extract the network interfaces info from the libxl_domain_config
object in libxlDomainCreateIfaceNames() to generate ifname. On domain
cleanup we also clear ifname, in case it was set by libvirt (i.e.
being prefixed with "vif"). We also skip these two steps in case the name
of the interface was manually inserted by the adminstrator.

For getting the interface statistics we resort to virNetInterfaceStats
and let libvirt handle the platform specific nits. Note that the latter
is not yet supported in FreeBSD.

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
2015-12-02 10:04:34 -07:00
Ian Campbell
af2954ae71 network: selectively disable -Wcast-align in virNetDevParseDadStatus
Commit 0f7436ca54 "network: wait for DAD to finish for bridge IPv6 addresses"
results in:

 CC     util/libvirt_util_la-virnetdevmacvlan.lo
util/virnetdev.c: In function 'virNetDevParseDadStatus':
util/virnetdev.c:1319:188: error: cast increases required alignment of target type [-Werror=cast-align]
util/virnetdev.c:1332:41: error: cast increases required alignment of target type [-Werror=cast-align]
util/virnetdev.c:1334:92: error: cast increases required alignment of target type [-Werror=cast-align]
cc1: all warnings being treated as errors

on at least ARM platforms.

The three macros involved (NLMSG_NEXT, IFA_RTA and RTA_NEXT) all appear to
correctly take care of alignment, therefore suppress Wcast-align around their
uses.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Maxim Perevedentsev <mperevedentsev@virtuozzo.com>
Cc: Laine Stump <laine@laine.org>
Cc: Dario Faggioli <dario.faggioli@citrix.com>
Cc: Jim Fehlig <jfehlig@suse.com>
2015-12-02 08:07:22 -07:00
Michal Privoznik
bd205a9036 log_manager: Include configmake.h last
The problem is that in some mingw header DATADIR is used but
gnulib defines it too. This leads to the following compile error:

  CC       locking/libvirt_driver_la-lock_manager.lo
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/objbase.h:66:0,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/ole2.h:17,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/wtypes.h:12,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/winscard.h:10,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/windows.h:97,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/winsock2.h:23,
                 from ../gnulib/lib/unistd.h:48,
                 from ../../src/util/virutil.h:29,
                 from ../../src/logging/log_manager.c:30:
/usr/i686-w64-mingw32/sys-root/mingw/include/objidl.h:12275:2: error: expected identifier or '(' before string constant
 } DATADIR;
  ^
Makefile:7888: recipe for target 'logging/libvirt_driver_la-log_manager.lo' failed

The fix is to include configmake.h at the end of includes.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2015-12-01 16:43:56 +01:00
Michal Privoznik
01f6cbcf07 tests: Run virnetdaemontest iff WITH_YAJL
The test itself and daemon require a JSON parsing library. If not
present, skip the test.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2015-12-01 14:03:30 +01:00
Martin Kletzander
2340f3ebfb admin: Distribute libvirt-admin.conf
Commit 48cd3dfa66 introduced configuration
file for libvirt-admin but forgot to distribute it.  Also the change
made to libvirt.conf in commit dbecb87f94
should've been removed thanks to introduction of separate config file.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2015-12-01 11:44:48 +01:00
Martin Kletzander
df8192aaf4 admin: Rename virAdmConnect to virAdmDaemon
virAdmConnect was named after virConnect, but after some discussions,
most of the APIs called will be working with remote daemon and starting
them virAdmDaemon will make more sense.  Only possibly controversal name
is CloseCallback (de)registration, and connecting to the daemon (which
will still be Open/Close), but even this makes sense if one thinks about
the daemon being opened and closed, e.g. as file, etc.

This way all the APIs working with the daemon will start with
virAdmDaemon prefix, they will accept virAdmDaemonPtr as first parameter
and that will better suit with other namings as well (virDomain*,
virAdmServer*, etc.).

Because in virt-admin, the connection name does not refer to a struct
that would have a connect in its name, also adjust 'connname' in
clients.  And because it is not used anywhere in the vsh code, move it
from there into each client.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2015-12-01 11:44:48 +01:00
Martin Kletzander
15b0a6d641 spec: Temporarily disable new admin-related files
The virt-admin binary and its man page should not yet be distributed,
but we need libvirt-common.h.  RPM build fails without specifying these.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2015-12-01 11:42:44 +01:00
Martin Kletzander
524492dcea admin: Include admin_remote.c in the dist package
Otherwise all builds from the package will fail.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2015-12-01 08:59:33 +01:00
Wang Yufei
fe51174f08 qemu_agent: fix deadlock in qemuProcessHandleAgentEOF
If VM A is shutdown a by qemu agent at appoximately the same time
an agent EOF of VM A happened, there's a chance that deadlock may occur:

qemuProcessHandleAgentEOF in main thread
A)  priv->agent = NULL; //A happened before B

    //deadlock when we get agent lock which's held by worker thread
    qemuAgentClose(agent);

qemuDomainObjExitAgent called by qemuDomainShutdownFlags in worker thread
B)  hasRefs = virObjectUnref(priv->agent); // priv->agent is NULL,
                                           // return false
    if (hasRefs)
        virObjectUnlock(priv->agent); //agent lock will not be released here

In order to resolve, during EOF close the agent first, then set priv->agent
to NULL to fix the deadlock.

This essentially reverts commit id '1020a504'. It's also of note that commit
id '362d0477' notes a possible/rare deadlock similar to what was seen in
the monitor in commit id '25f582e3'. However, it seems interceding changes
including commit id 'd960d06f' should remove the deadlock issue.

With this change, if EOF is called:

    Get VM lock
    Check if !priv->agent || priv->beingDestroyed, then unlock VM
    Call qemuAgentClose
    Unlock VM

When qemuAgentClose is called
    Get Agent lock
    If Agent->fd open, close it
    Unlock Agent
    Unref Agent

qemuDomainObjEnterAgent
    Enter with VM lock
    Get Agent lock
    Increase Agent refcnt
    Unlock VM

After running agent command, calling qemuDomainObjExitAgent
    Enter with Agent lock
    Unref Agent
    If not last reference, unlock Agent
    Get VM lock

If we were in the middle of an EnterAgent, call Agent command, and
ExitAgent sequence and the EOF code is triggered, then the EOF code
can get the VM lock, make it's checks against !priv->agent ||
priv->beingDestroyed, and call qemuAgentClose. The CloseAgent
would wait to get agent lock. The other thread then will eventually
call ExitAgent, release the Agent lock and unref the Agent. Once
ExitAgent releases the Agent lock, AgentClose will get the Agent
Agent lock, close the fd, unlock the agent, and unref the agent.
The final unref would cause deletion of the agent.

Signed-off-by: Wang Yufei <james.wangyufei@huawei.com>
Reviewed-by: Ren Guannan <renguannan@huawei.com>
2015-11-30 14:20:27 -05:00
Martin Kletzander
97c9ddefa1 build: Create needed folders without dependency tracking
The parameter --disable-dependency-tracking is supposed to speed up
one-time build due to the fact that it disables some dependency
extractors that, apparently, take longer time to execute.  That is a
problem for code that is generated into builddir (especially some
specific subdirectory) because the directory it should be installed to
does not exists in VPATH and without the dependency tracking is not
created.  Generating such file hence fails with -ENOENT.  In order to
keep generating files into builddir instead of srcdir, we must create
the directory ourselves.  This should finally fix the problem that is
being fixed multiple times since its introduction in commit a9fe620372
and let us continue with cleaning those parts of Makefiles that depend
on generating files into the srcdir rather than builddir as it should
be.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2015-11-30 15:48:17 +01:00
Martin Kletzander
98e2c39d39 include: Install libvirt-common.h
Otherwise nobody will be able to include libvirt.h.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2015-11-30 15:37:19 +01:00
Martin Kletzander
de9ff3efe1 util: Avoid variable named 'truncate' shadowing global declaration
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2015-11-30 15:32:47 +01:00
Wei Jiangang
8dd47ead18 tools: fix output of list with state-shutoff
Due to the default of flags is VIR_CONNECT_LIST_DOMAINS_ACTIVE,
It doesn't show the domains that have been shutdown when we use
'virsh list' with only --state-shutoff.

Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
2015-11-30 15:08:44 +01:00
Michal Privoznik
90f3c0d717 conf: Split virDomainObjList into a separate file
Our domain_conf.* files are big enough. Not only they contain XML
parsing code, but they served as a storage of all functions whose
name is virDomain prefixed. This is just wrong as it gathers not
related functions (and modules) into one big file which is then
harder to maintain. Split virDomainObjList module into a separate
file called virdomainobjlist.[ch].

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2015-11-30 13:55:10 +01:00
Ján Tomko
971f5f229d qemu: build command line for virtio-input-host device
<input type='passthrough' bus='virtio'>
  <source evdev='/dev/input/event1234'/>
</input>

results in:

-device virtio-input-host-pci,id=input0,evdev=/dev/input/event1234

https://bugzilla.redhat.com/show_bug.cgi?id=1231114
2015-11-30 13:00:04 +01:00
Ján Tomko
1c00dcd665 qemu: add passed-through input devs to cgroup ACL
https://bugzilla.redhat.com/show_bug.cgi?id=1231114
2015-11-30 12:59:10 +01:00
Ján Tomko
d5aba1a4d9 security: label the evdev for input device passthrough
Add functions for setting and restoring the label of input devices
to DAC and SELinux drivers.

https://bugzilla.redhat.com/show_bug.cgi?id=1231114
2015-11-30 12:57:43 +01:00
Ján Tomko
1a538a07c7 conf: add XML for input device passthrough
Add xml for the new virtio-input-host-pci device:
<input type='passthrough' bus='virtio'>
  <source evdev='/dev/input/event1234'/>
</input>

https://bugzilla.redhat.com/show_bug.cgi?id=1231114
2015-11-30 12:29:03 +01:00
Ján Tomko
e9d7550ac2 qemu: add capability for virtio-input-host-device
Add QEMU_CAPS_VIRTIO_INPUT_HOST for both
virtio-input-host-device and virtio-input-host-pci.
2015-11-30 12:29:02 +01:00
Ján Tomko
7210cef452 qemu: build command line for virtio input devices
Add support for these qemu devices:
virtio-mouse-{pci,device}
virtio-keyboard-{pci,device}
virtio-tablet-{pci,device}

https://bugzilla.redhat.com/show_bug.cgi?id=1231114
2015-11-30 12:25:36 +01:00
Ján Tomko
bebdfafb2b conf: parse and format virtio input bus in domain XML
To be used by the family of virtio input devices:

<input type='mouse' bus='virtio'/>
<input type='tablet' bus='virtio'/>
<input type='keyboard' bus='virtio'/>

https://bugzilla.redhat.com/show_bug.cgi?id=1231114
2015-11-30 12:22:06 +01:00
Ján Tomko
5c62d6c456 qemu: add capabilities for virtio input devices
Add capabilities for virtio-keyboard, virtio-mouse
and virtio-tablet devices:

name "virtio-keyboard-device", bus virtio-bus
name "virtio-keyboard-pci", bus PCI
name "virtio-mouse-device", bus virtio-bus
name "virtio-mouse-pci", bus PCI
name "virtio-tablet-device", bus virtio-bus
name "virtio-tablet-pci", bus PCI

Map both -device and -pci versions of the device to one capability.

https://bugzilla.redhat.com/show_bug.cgi?id=1231114
2015-11-30 12:21:31 +01:00
Pavel Hrdina
cb97426208 virlogd: fix crash if log file exists and it's larger the maxlen
If for some reason there is an existing log file, that is larger then
max length of log file, we need to rollover that file immediately.
Trying to figure out how much data we could write will resolve in
overflow of unsigned variable 'towrite' and this leads to segfault.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-11-30 10:45:45 +01:00
Erik Skultety
163a781e63 virt-admin: Provide a man page for virt-admin 2015-11-30 09:44:28 +01:00
Erik Skultety
a474371fc6 admin: Introduce virAdmConnectGetLibVersion
Introduce a new API to get libvirt version. It is worth noting, that
libvirt-admin and libvirt share the same version number. Unfortunately,
our existing API isn't generic enough to be used with virAdmConnectPtr
as well. Also this patch wires up this API to the virt-admin client
as a generic cmdVersion command.
2015-11-30 09:44:28 +01:00
Erik Skultety
6dd7e42d89 admin: Add support for connection close callbacks
As we need a client disconnect handler, we also need a mechanism to register
such handlers for a client. This patch introduced both the close callbacks and
also the client vshAdmCatchDisconnect handler to be registered with it. By
registering the handler we still need to make sure the client can react to
daemon's events like disconnect or keepalive, so asynchronous I/O event polling
is necessary to be enabled too.
2015-11-30 09:44:28 +01:00
Erik Skultety
96a96b8433 admin: Add support for URI aliases
Now that we introduced URI support in libvirt-admin, we should also support URI
aliases during connection establishment phase. After applying this patch,
virAdmConnectOpen will also support VIR_CONNECT_NO_ALIASES flag.
2015-11-30 09:44:28 +01:00
Erik Skultety
fb90fcc046 livirt: Move URI alias matching to util
As we need to provide support for URI aliases in libvirt-admin as well, URI
alias matching needs to be internally visible. Since
virConnectOpenResolveURIAlias does have a compatible signature, it could be
easily reused by libvirt-admin. This patch moves URI alias matching to util,
renaming it accordingly.
2015-11-30 09:44:28 +01:00
Erik Skultety
dbecb87f94 admin: Add URI support and introduce virAdmGetDefaultURI
Since virt-admin should be able to connect to various admin servers
on hosted different daemons, we need to provide URI support to
libvirt-admin.
2015-11-30 09:44:28 +01:00
Erik Skultety
0ecf9b3e09 admin: Do not generate remoteAdminConnect{Open,Close}
As we plan to add more and more logic to remote connecting methods,
these cannot be generated from admin_protocol.x anymore. Instead,
this patch implements these to methods explicitly.
2015-11-30 09:44:28 +01:00
Erik Skultety
b86cf8821b admin: Move remote admin API version to a separate module
By moving the remote version into a separate module, we gain a slightly
better maintainability in the long run than just by leaving it in one
place with the existing libvirt-admin library which can start getting
pretty messy later on.
2015-11-30 09:44:28 +01:00
Erik Skultety
47a089f06c admin: Introduce virAdmConnectIsAlive
Since most of our APIs rely on an acive functional connection to a daemon and
we have such a mechanism in libvirt already, there's need to have such a way in
libvirt-admin as well. By introducing a new public API, this patch provides
support to check for an active connection.
2015-11-30 09:44:28 +01:00
Erik Skultety
6409578790 virt-admin: Introduce first working skeleton
This patch introduces virt-admin client which is based on virsh client,
but had to reimplement several methods to meet virt-admin specific needs
or remove unnecessary virsh specific logic.
2015-11-30 09:44:28 +01:00
Erik Skultety
b32f715d5b admin: introduce virAdmGetVersion
Unfortunately, client side version retrieval API virGetVersion uses
one-time initialization (due to the fact we might not have initialized the
library by calling connect prior to this) which is not completely compatible
with admin initialization. This API is rather simplistic and reimplementing
it for admin might be the preferred method of reusing it. Note that even though
the method will be reimplemented, the version number is still the same for both
the libvirt and libvirt-admin library.
2015-11-30 09:43:46 +01:00