[libvirt] [PATCHv2 0/5] Allow to query a guest's hostname
by Guido Günther
The following patches allow to query a guest's hostname. Once we also have
support to set the hostname via the domain's xml we can also print it in "virsh
dominfo" by default so I left it out for now.
I left the version at 0.9.14. It'd be happy to change this ot 0.10 should we
settle for that one.
Changes since last time:
* drop patch to print hostname in "virsh list"
* add remote protocoll support
* Addressed Eric's style comments
* openvzVEGetStringParam: Let virCommandRun do the error printing and missing
error handling
* Don't return empty hostnames but raise VIR_ERR_OPERATION_FAILED instead
Cheers,
-- Guido
Guido Günther (5):
Add virDomainGetHostname
virsh: Add domhostname
remote: Provide RPC call for domainGetHostname
openvz: Add openvzVEGetStringParam
openvz: Implement domainGetHostname
include/libvirt/libvirt.h.in | 2 ++
src/driver.h | 6 ++++++
src/libvirt.c | 45 ++++++++++++++++++++++++++++++++++++++++++
src/libvirt_openvz.syms | 2 +-
src/libvirt_public.syms | 5 +++++
src/openvz/openvz_driver.c | 42 +++++++++++++++++++++++++++++++++++++++
src/openvz/openvz_util.c | 32 ++++++++++++++++++++++++++++++
src/openvz/openvz_util.h | 1 +
src/remote/remote_driver.c | 1 +
src/remote/remote_protocol.x | 12 ++++++++++-
src/remote_protocol-structs | 8 ++++++++
tools/virsh.c | 44 +++++++++++++++++++++++++++++++++++++++++
tools/virsh.pod | 4 ++++
13 files changed, 202 insertions(+), 2 deletions(-)
--
1.7.10.4
12 years, 4 months
[libvirt] [PATCH 1/5] Add public API to register a callback to be invoked on connection close
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
Define a new virConnectSetCloseCallback() public API which allows
registering a callback to be invoked when the connection to a
hypervisor is closed. The callback is provided with the reason for
the close, which may be 'error', 'eof' or 'keepalive'.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
include/libvirt/libvirt.h.in | 40 +++++++++++++++++++++++--------
src/datatypes.c | 4 ++++
src/datatypes.h | 5 ++++
src/libvirt.c | 53 ++++++++++++++++++++++++++++++++++++++++++
src/libvirt_public.syms | 6 +++++
5 files changed, 98 insertions(+), 10 deletions(-)
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index e34438c..74b3f90 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -49,6 +49,17 @@ extern "C" {
* defines VIR_ENUM_SENTINELS. Enumerations for bit values do not
* have a *_LAST value, but additional bits may be defined. */
+/*
+ * virFreeCallback:
+ * @opaque: opaque user data provided at registration
+ *
+ * Type for a domain event callback when the event is deregistered and
+ * need to be freed, @opaque is provided along with the callback at
+ * registration time
+ */
+typedef void (*virFreeCallback)(void *opaque);
+
+
/**
* virConnect:
*
@@ -1148,6 +1159,25 @@ int virConnectSetKeepAlive(virConnectPtr conn,
int interval,
unsigned int count);
+typedef enum {
+ VIR_CONNECT_CLOSE_REASON_ERROR = 1, /* Misc I/O error */
+ VIR_CONNECT_CLOSE_REASON_EOF = 2, /* End-of-file from server */
+ VIR_CONNECT_CLOSE_REASON_KEEPALIVE = 3, /* Keepalive timer triggered */
+ VIR_CONNECT_CLOSE_REASON_CLIENT = 4, /* Client requested it */
+
+# ifdef VIR_ENUM_SENTINELS
+ VIR_CONNECT_CLOSE_REASON_LAST
+# endif
+} virConnectCloseReason;
+
+typedef void (*virConnectCloseFunc)(virConnectPtr conn,
+ int reason,
+ void *opaque);
+
+int virConnectSetCloseCallback(virConnectPtr conn,
+ virConnectCloseFunc cb,
+ void *opaque,
+ virFreeCallback freecb);
/*
* Capabilities of the connection / driver.
@@ -2861,16 +2891,6 @@ typedef int (*virConnectDomainEventCallback)(virConnectPtr conn,
int detail,
void *opaque);
-/*
- * virFreeCallback:
- * @opaque: opaque user data provided at registration
- *
- * Type for a domain event callback when the event is deregistered and
- * need to be freed, @opaque is provided along with the callback at
- * registration time
- */
-typedef void (*virFreeCallback)(void *opaque);
-
int virConnectDomainEventRegister(virConnectPtr conn,
virConnectDomainEventCallback cb,
void *opaque,
diff --git a/src/datatypes.c b/src/datatypes.c
index d718170..5d415b8 100644
--- a/src/datatypes.c
+++ b/src/datatypes.c
@@ -115,6 +115,10 @@ virReleaseConnect(virConnectPtr conn) {
virMutexLock(&conn->lock);
+ if (conn->closeOpaque &&
+ conn->closeFreeCallback)
+ conn->closeFreeCallback(conn->closeOpaque);
+
virResetError(&conn->err);
virURIFree(conn->uri);
diff --git a/src/datatypes.h b/src/datatypes.h
index fc284d2..af054ac 100644
--- a/src/datatypes.h
+++ b/src/datatypes.h
@@ -187,6 +187,11 @@ struct _virConnect {
virErrorFunc handler; /* associated handlet */
void *userData; /* the user data */
+ /* Per-connection close callback */
+ virConnectCloseFunc closeCallback;
+ void *closeOpaque;
+ virFreeCallback closeFreeCallback;
+
int refs; /* reference count */
};
diff --git a/src/libvirt.c b/src/libvirt.c
index df78e8a..8acb87f 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -18613,6 +18613,59 @@ error:
/**
+ * virConnectSetCloseCallback:
+ * @conn: pointer to connection object
+ * @cb: callback to invoke upon close
+ * @opaque: user data to pass to @cb
+ * @freecb: callback to free @opaque
+ *
+ * Registers a callback to be invoked when the connection
+ * is closed. This callback is invoked when there is any
+ * condition that causes the socket connection to the
+ * hypervisor to be closed.
+ *
+ * This function is only applicable to hypervisor drivers
+ * which maintain a persistent open connection. Drivers
+ * which open a new connection for every operation will
+ * not invoke this.
+ *
+ * The @freecb must not invoke any other libvirt public
+ * APIs, since it is not called from a re-entrant safe
+ * context.
+ *
+ * Returns 0 on success, -1 on error
+ */
+int virConnectSetCloseCallback(virConnectPtr conn,
+ virConnectCloseFunc cb,
+ void *opaque,
+ virFreeCallback freecb)
+{
+ VIR_DEBUG("conn=%p", conn);
+
+ virResetLastError();
+
+ if (!VIR_IS_CONNECT(conn)) {
+ virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__);
+ virDispatchError(NULL);
+ return -1;
+ }
+
+ virMutexLock(&conn->lock);
+
+ if (conn->closeOpaque &&
+ conn->closeFreeCallback)
+ conn->closeFreeCallback(conn->closeOpaque);
+
+ conn->closeCallback = cb;
+ conn->closeOpaque = opaque;
+ conn->closeFreeCallback = freecb;
+
+ virMutexUnlock(&conn->lock);
+
+ return 0;
+}
+
+/**
* virDomainSetBlockIoTune:
* @dom: pointer to domain object
* @disk: path to the block device, or device shorthand
diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms
index 2913a81..dab8725 100644
--- a/src/libvirt_public.syms
+++ b/src/libvirt_public.syms
@@ -544,4 +544,10 @@ LIBVIRT_0.9.13 {
virDomainSnapshotRef;
} LIBVIRT_0.9.11;
+
+LIBVIRT_0.9.14 {
+ global:
+ virConnectSetCloseCallback;
+} LIBVIRT_0.9.13;
+
# .... define new API here using predicted next version number ....
--
1.7.10.4
12 years, 4 months
[libvirt] [PATCH 00/50] Atomic APIs to list objects
by Osier Yang
Except the already supported APIs for domain and domain snapshot,
this series add the APIs for all the left objects, including
storage pool, storage vol, network, interface, node device,
nwfilter, secret.
* Storage pool:
- Support filtering the returned pool objects by active|inactive,
persistent|transient, autostart|no-autostart, and pool types.
- New options for virsh, --type to accept multiple pool types.
* Storage vol:
- Simply returns all the vol objects of a pool.
* Network:
- Support filtering the results using flags active|inactive,
persistent|transient, autostart|no-autostart
- New options for virsh.
* Interface:
- Support filtering the results using flags active|inactive.
It's still O(n) underlying, as interface driver doesn't manage
the objects itself, but using netcf lib instead. And netcf
APIs don't support returning the struct yet.
* Node Device:
- Support filtering the results using capabilities type of
the devices.
- Extend --cap to accept multiple capability type.
* Network Filter:
- Simply returns all the objects.
* Secret:
- Simply returns all the objects.
All the commands are tested with both new libvirt with the APIs
support, or old libvirt without the support.
By the way, I'm wondering if should split the virsh wood, it's really
big now, and still growing up. It might take a bit more time to
compile if it's splitted into multiple files (split it by the command
group?) though, but it's good for maintaining and eyes (I have a small
screen). Any opinions?
Osier Yang (50):
Fix indentions
list: Expose pool type via virStoragePoolGetInfo
list: Rename virdomainlist.[ch] for common use
list: Define new API virStorageListALlStoragePools
list: Add helpers for listing storage pool objects
list: Implement the RPC calls for virConnectListAllStoragePools
list: Implement listAllStoragePools for storage driver
list: Implement listAllStoragePools for test driver
list: Add helper to convert strings separated by ',' to array
virsh: Fix the wrong doc for pool-list
list: Change MATCH for common use in virsh
list: Use virConnectListAllStoragePools in virsh
virsh: Use vshPrint instead of printf
python: Expose virStorageListAllStoragePools to python binding
list: Define new API virStoragePoolListAllVolumes
list: Implemente RPC calls for virStoragePoolListAllVolumes
list: Implement virStoragePoolListAllVolumes for storage driver
list: Implement virStoragePoolListAllVolumes for test driver
list: Use virStoragePoolListAllVolumes in virsh
list: Expose virStoragePoolListAllVolumes to Python binding
list: Define new API virConnectListAllNetworks
list: Implement RPC calls for virConnectListAllNetworks
list: Add helpers to list network objects
list: Implement listAllNetworks for network driver
list: Implement listAllNetworks for test driver
list: Use virConnectListAllNetworks in virsh
list: Expose virConnectListAllNetworks to Python binding
daemon: Fix the wrong macro name
list: Define new API virConnectListAllInterfaces
list: Implemente RPC calls for virConnectListAllInterfaces
list: Implement listAllInterfaces
list: Use virConnectListAllInterfaces in virsh
list: Expose virConnectListAllInterfaces to Python binding
list: Define new API virConnectListAllNodeDevices
list: Implemente RPC calls for virConnectListAllNodeDevices
list: Add helpers for listing node devices
list: Implement listAllNodeDevices
list: Expose virConnectListAllNodeDevices to Python binding
virsh: Fix a bug of nodedev-list
list: Use virConnectListAllNodeDevices in virsh
list: Define new API virConnectListAllNWFilters
list: Implement RPC calls for virConnectListAllNWFilters
list: Implement listAllNWFilters
list: Use virConnectListAllNWFilters in virsh
list: Expose virConnectListAllNWFilters to Python binding
list: Define new API virConnectListAllSecrets
list: Implement RPC calls for virConnectListAllSecrets
list: Implement listAllSecrets
list: Use virConnectListAllSecrets in virsh
list: Expose virConnectListAllSecrets to Python binding
daemon/libvirtd.c | 2 +-
daemon/remote.c | 382 +++++
include/libvirt/libvirt.h.in | 117 ++-
python/generator.py | 11 +-
python/libvirt-override-api.xml | 44 +-
python/libvirt-override-virConnect.py | 72 +
python/libvirt-override-virStoragePool.py | 11 +
python/libvirt-override.c | 337 +++++
src/Makefile.am | 8 +-
src/conf/domain_conf.c | 2 +-
src/conf/storage_conf.h | 19 -
src/conf/virdomainlist.c | 222 ---
src/conf/virdomainlist.h | 84 --
src/conf/virobjectlist.c | 535 +++++++
src/conf/virobjectlist.h | 162 +++
src/datatypes.h | 48 +-
src/driver.h | 35 +-
src/interface/netcf_driver.c | 135 ++
src/libvirt.c | 429 ++++++-
src/libvirt_private.syms | 6 +-
src/libvirt_public.syms | 11 +
src/libxl/libxl_driver.c | 4 +-
src/lxc/lxc_driver.c | 4 +-
src/network/bridge_driver.c | 18 +
src/node_device/node_device_driver.c | 16 +
src/node_device/node_device_driver.h | 3 +
src/node_device/node_device_hal.c | 1 +
src/node_device/node_device_udev.c | 1 +
src/nwfilter/nwfilter_driver.c | 57 +
src/openvz/openvz_driver.c | 4 +-
src/qemu/qemu_driver.c | 4 +-
src/remote/remote_driver.c | 449 ++++++
src/remote/remote_protocol.x | 78 +-
src/remote_protocol-structs | 85 ++
src/secret/secret_driver.c | 58 +-
src/storage/storage_driver.c | 88 ++
src/test/test_driver.c | 105 ++-
src/uml/uml_driver.c | 4 +-
src/vbox/vbox_tmpl.c | 10 +-
src/vmware/vmware_driver.c | 4 +-
tests/virdrivermoduletest.c | 2 +-
tools/virsh.c | 2206 ++++++++++++++++++++++-------
tools/virsh.pod | 51 +-
43 files changed, 4982 insertions(+), 942 deletions(-)
create mode 100644 python/libvirt-override-virStoragePool.py
delete mode 100644 src/conf/virdomainlist.c
delete mode 100644 src/conf/virdomainlist.h
create mode 100644 src/conf/virobjectlist.c
create mode 100644 src/conf/virobjectlist.h
Regards,
Osier
12 years, 4 months
[libvirt] [PATCH] Disable NWFilter driver completely when unprivileged
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
Running libvirtd unprivileged results in a warning message from
the NWFilter driver
virNWFilterSnoopLeaseFileRefresh:1882 : open("/var/run/libvirt/network/nwfilter.ltmp"): No such file or directory
Since it requires privileged network access, this driver should
not even run when unprivileged.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/nwfilter/nwfilter_driver.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c
index 58d91f9..9034549 100644
--- a/src/nwfilter/nwfilter_driver.c
+++ b/src/nwfilter/nwfilter_driver.c
@@ -68,6 +68,9 @@ static int
nwfilterDriverStartup(int privileged) {
char *base = NULL;
+ if (!privileged)
+ return 0;
+
if (virNWFilterIPAddrMapInit() < 0)
return -1;
if (virNWFilterLearnInit() < 0)
--
1.7.10.4
12 years, 4 months
[libvirt] [PATCH v2] storage: netfs and iscsi need option srcSpec for resource discovery
by Guannan Ren
The option 'srcSpec' to virsh command find-storage-pool-sources
is optional for logical type of storage pool, but mandatory for
netfs and iscsi type.
When missing the option for netfs and iscsi, libvirt reports XML
parsing error due to null string option srcSpec.
error: Failed to find any netfs pool sources
error: (storage_source_specification):1: Document is empty
(null)
This patch adds a check for it, error info changed to:
error: Failed to find any netfs pool sources
error: internal error pool type 'netfs' need option \
--srcSpec for source discovery
---
src/storage/storage_driver.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index fbc630d..8486fdf 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -458,6 +458,14 @@ storageFindPoolSources(virConnectPtr conn,
goto cleanup;
}
+ if ((*srcSpec == '\0') && (backend_type == VIR_STORAGE_POOL_ISCSI ||
+ backend_type == VIR_STORAGE_POOL_NETFS)) {
+ virStorageReportError(VIR_ERR_INTERNAL_ERROR,
+ _("pool type '%s' needs option --srcSpec "
+ "for source discovery"), type);
+ goto cleanup;
+ }
+
ret = backend->findPoolSources(conn, srcSpec, flags);
cleanup:
--
1.7.7.5
12 years, 4 months
[libvirt] [PATCH] don't make lxc_driver static
by Gao feng
because it will be used in lxc_process.c
below is the error information
debug : virDriverLoadModule:66 : Module load lxc
error : virDriverLoadModule:78 : failed to load module
/usr/local/lib/libvirt/connection-driver/libvirt_driver_lxc.so
/usr/local/lib/libvirt/connection-driver/libvirt_driver_lxc.so:
undefined symbol: lxc_driver
Signed-off-by: Gao feng <gaofeng(a)cn.fujitsu.com>
---
src/lxc/lxc_driver.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index d7f052f..09c64b2 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -72,7 +72,7 @@
static int lxcStartup(int privileged);
static int lxcShutdown(void);
-static lxc_driver_t *lxc_driver = NULL;
+lxc_driver_t *lxc_driver = NULL;
/* Functions */
--
1.7.7.6
12 years, 4 months
[libvirt] Libvirt/LXC/SystemD/SELinux Hackfest at Linux Plumbers, San Diego
by Daniel P. Berrange
Hi Folks,
This years Linux Plumbers Conference (LPC)[1] is taking place in San Diego
in the last week of August (co-located with LinuxCon).
Since there is alot of integration between libvirt / LXC / SystemD and
SELinux, and many of the key developers from those projects will be
at LPC, Lennart proposed we hold a hackfest at LPC on this subject
To quote Lennart's blog[2]:
"On 28th of August we'll have a hackfest on the topic of closer
integration of libvirt, LXC, systemd and SELinux, colocated with
LPC in San Diego, California. We'll have a number of key people
from these projects participating, including Dan Walsh, Eric Paris,
Daniel P. Berrange, Kay Sievers and myself.
Topics we'll cover: making Fedora/Linux boot entirely cleanly in
normal containers, teaching systemd's control tools minimal
container-awareness (such as being able to list all services
of all containers in one go, in addition to those running on
the host system), unified journal logging across multiple containers,
the systemd container interface, auditing and containers, running
multiple instances from the same /usr tree, and a lot more...
Who should attend? Everybody hacking on the mentioned projects
who wants to help integrating them with the goal of turning them
into a secure, reliable, powerful container solution for Linux.
Who should not attend? If you don't hack on any of these projects,
or if you are not interested in closer integration of at least two
of these projects.
How to register? Just show up. You get extra points however for
letting us know in advance (just send us an email). Attendance is
free."
NB, note the date - 28th of August is the Tuesday - ie the day *before*
the main LPC conference programme begins. We have space reserved in
the main hotel for the hackfest on this day.
Regards,
Daniel
[1] http://www.linuxplumbersconf.org/2012/
[2] http://0pointer.de/blog/hackfests.html
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
12 years, 4 months
[libvirt] [PATCH] virsh man page - domain-id consistency
by Jan Tomko
Using 'domain-id' to represent domain name, domain id or uuid,
as introduced in the DOMAIN COMMANDS section.
---
tools/virsh.pod | 86 +++++++++++++++++++++++++++---------------------------
1 files changed, 43 insertions(+), 43 deletions(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod
index 4bddf15..ed1efde 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -580,11 +580,11 @@ If I<--graceful> is specified, don't resort to extreme measures
(e.g. SIGKILL) when the guest doesn't stop after a reasonable timeout;
return an error instead.
-=item B<domblkstat> I<domain> I<block-device> [I<--human>]
+=item B<domblkstat> I<domain-id> I<block-device> [I<--human>]
Get device block stats for a running domain. A I<block-device> corresponds
to a unique target name (<target dev='name'/>) or source file (<source
-file='name'/>) for one of the disk devices attached to I<domain> (see
+file='name'/>) for one of the disk devices attached to I<domain-id> (see
also B<domblklist> for listing these names).
Use I<--human> for a more human readable output.
@@ -605,11 +605,11 @@ B<Explanation of fields> (fields appear in the folowing order):
flush_total_times - total time flush operations took (ns)
<-- other fields provided by hypervisor -->
-=item B<domifstat> I<domain> I<interface-device>
+=item B<domifstat> I<domain-id> I<interface-device>
Get network interface stats for a running domain.
-=item B<domif-setlink> I<domain> I<interface-device> I<state> [I<--config>]
+=item B<domif-setlink> I<domain-id> I<interface-device> I<state> [I<--config>]
Modify link state of the domain's virtual interface. Possible values for
state are "up" and "down. If I<--config> is specified, only the persistent
@@ -617,7 +617,7 @@ configuration of the domain is modified, for compatibility purposes,
I<--persistent> is alias of I<--config>.
I<interface-device> can be the interface's target name or the MAC address.
-=item B<domif-getlink> I<domain> I<interface-device> [I<--config>]
+=item B<domif-getlink> I<domain-id> I<interface-device> [I<--config>]
Query link state of the domain's virtual interface. If I<--config>
is specified, query the persistent configuration, for compatibility
@@ -625,7 +625,7 @@ purposes, I<--persistent> is alias of I<--config>.
I<interface-device> can be the interface's target name or the MAC address.
-=item B<domiftune> I<domain> I<interface-device>
+=item B<domiftune> I<domain-id> I<interface-device>
[[I<--config>] [I<--live>] | [I<--current>]]
[I<--inbound average,peak,burst>]
[I<--outbound average,peak,burst>]
@@ -646,7 +646,7 @@ Both I<--live> and I<--current> flags may be given, but I<--current> is
exclusive. If no flag is specified, behavior is different depending
on hypervisor.
-=item B<dommemstat> I<domain>
+=item B<dommemstat> I<domain-id>
Get memory stats for a running domain.
@@ -657,17 +657,17 @@ B<domstate> command says that a domain was paused due to I/O error.
The B<domblkerror> command lists all block devices in error state and
the error seen on each of them.
-=item B<domblkinfo> I<domain> I<block-device>
+=item B<domblkinfo> I<domain-id> I<block-device>
Get block device size info for a domain. A I<block-device> corresponds
to a unique target name (<target dev='name'/>) or source file (<source
-file='name'/>) for one of the disk devices attached to I<domain> (see
+file='name'/>) for one of the disk devices attached to I<domain-id> (see
also B<domblklist> for listing these names).
-=item B<domblklist> I<domain> [I<--inactive>] [I<--details>]
+=item B<domblklist> I<domain-id> [I<--inactive>] [I<--details>]
Print a table showing the brief information of all block devices
-associated with I<domain>. If I<--inactive> is specified, query the
+associated with I<domain-id>. If I<--inactive> is specified, query the
block devices that will be used on the next boot, rather than those
currently in use by a running domain. If I<--details> is specified,
disk type and device value will also be printed. Other contexts
@@ -675,16 +675,16 @@ that require a block device name (such as I<domblkinfo> or
I<snapshot-create> for disk snapshots) will accept either target
or unique source names printed by this command.
-=item B<domiflist> I<domain> [I<--inactive>]
+=item B<domiflist> I<domain-id> [I<--inactive>]
Print a table showing the brief information of all virtual interfaces
-associated with I<domain>. If I<--inactive> is specified, query the
+associated with I<domain-id>. If I<--inactive> is specified, query the
virtual interfaces that will be used on the next boot, rather than those
currently in use by a running domain. Other contexts that require a MAC
address of virtual interface (such as I<detach-interface> or
I<domif-setlink>) will accept the MAC address printed by this command.
-=item B<blockcopy> I<domain> I<path> I<dest> [I<bandwidth>] [I<--shallow>]
+=item B<blockcopy> I<domain-id> I<path> I<dest> [I<bandwidth>] [I<--shallow>]
[I<--reuse-external>] [I<--raw>] [I<--wait> [I<--verbose]
[{I<--pivot> | I<--finish>}] [I<--timeout> B<seconds>] [I<--async>]]
@@ -725,7 +725,7 @@ is done cleaning up.
I<path> specifies fully-qualified path of the disk.
I<bandwidth> specifies copying bandwidth limit in Mbps.
-=item B<blockpull> I<domain> I<path> [I<bandwidth>] [I<base>]
+=item B<blockpull> I<domain-id> I<path> [I<bandwidth>] [I<base>]
[I<--wait> [I<--verbose>] [I<--timeout> B<seconds>] [I<--async]]
Populate a disk from its backing image chain. By default, this command
@@ -748,19 +748,19 @@ longer until the job is done cleaning up.
I<path> specifies fully-qualified path of the disk; it corresponds
to a unique target name (<target dev='name'/>) or source file (<source
-file='name'/>) for one of the disk devices attached to I<domain> (see
+file='name'/>) for one of the disk devices attached to I<domain-id> (see
also B<domblklist> for listing these names).
I<bandwidth> specifies copying bandwidth limit in Mbps.
-=item B<blkdeviotune> I<domain> I<device>
+=item B<blkdeviotune> I<domain-id> I<device>
[[I<--config>] [I<--live>] | [I<--current>]]
[[I<total-bytes-sec>] | [I<read-bytes-sec>] [I<write-bytes-sec>]]
[[I<total-iops-sec>] | [I<read-iops-sec>] [I<write-iops-sec>]]
-Set or query the block disk io parameters for a block device of I<domain>.
+Set or query the block disk io parameters for a block device of I<domain-id>.
I<device> specifies a unique target name (<target dev='name'/>) or source
file (<source file='name'/>) for one of the disk devices attached to
-I<domain> (see also B<domblklist> for listing these names).
+I<domain-id> (see also B<domblklist> for listing these names).
If no limit is specified, it will query current I/O limits setting.
Otherwise, alter the limits with these flags:
@@ -786,7 +786,7 @@ Both I<--live> and I<--current> flags may be given, but I<--current> is
exclusive. If no flag is specified, behavior is different depending
on hypervisor.
-=item B<blockjob> I<domain> I<path> { [I<--abort>] [I<--async>] [I<--pivot>] |
+=item B<blockjob> I<domain-id> I<path> { [I<--abort>] [I<--async>] [I<--pivot>] |
[I<--info>] | [I<bandwidth>] }
Manage active block operations. There are three modes: I<--info>,
@@ -795,7 +795,7 @@ or I<--pivot> implies I<--abort>.
I<path> specifies fully-qualified path of the disk; it corresponds
to a unique target name (<target dev='name'/>) or source file (<source
-file='name'/>) for one of the disk devices attached to I<domain> (see
+file='name'/>) for one of the disk devices attached to I<domain-id> (see
also B<domblklist> for listing these names).
If I<--abort> is specified, the active job on the specified disk will
@@ -807,12 +807,12 @@ If I<--info> is specified, the active job information on the specified
disk will be printed.
I<bandwidth> can be used to set bandwidth limit for the active job.
-=item B<blockresize> I<domain> I<path> I<size>
+=item B<blockresize> I<domain-id> I<path> I<size>
Resize a block device of domain while the domain is running, I<path>
specifies the absolute path of the block device; it corresponds
to a unique target name (<target dev='name'/>) or source file (<source
-file='name'/>) for one of the disk devices attached to I<domain> (see
+file='name'/>) for one of the disk devices attached to I<domain-id> (see
also B<domblklist> for listing these names).
I<size> is a scaled integer (see B<NOTES> above) which defaults to KiB
@@ -838,11 +838,11 @@ Convert a domain name or id to domain UUID
Convert a domain name (or UUID) to a domain id
-=item B<domjobabort> I<domain-id-or-uuid>
+=item B<domjobabort> I<domain-id>
Abort the currently running domain job.
-=item B<domjobinfo> I<domain-id-or-uuid>
+=item B<domjobinfo> I<domain-id>
Returns information about jobs running on a domain.
@@ -959,7 +959,7 @@ Provide the maximum number of virtual CPUs supported for a guest VM on
this connection. If provided, the I<type> parameter must be a valid
type attribute for the <domain> element of XML.
-=item B<cpu-stats> I<domain> [I<--total>] [I<start>] [I<count>]
+=item B<cpu-stats> I<domain-id> [I<--total>] [I<start>] [I<count>]
Provide cpu statistics information of a domain. The domain should
be running. Default it shows stats for all CPUs, and a total. Use
@@ -1045,7 +1045,7 @@ migrated to another host.
Get the maximum migration bandwidth (in Mbps) for a domain.
-=item B<numatune> I<domain> [I<--mode> B<mode>] [I<--nodeset> B<nodeset>]
+=item B<numatune> I<domain-id> [I<--mode> B<mode>] [I<--nodeset> B<nodeset>]
[[I<--config>] [I<--live>] | [I<--current>]]
Set or get a domain's numa parameters, corresponding to the <numatune>
@@ -1470,7 +1470,7 @@ By default the hypervisor will try to pick a suitable shutdown
method. To specify an alternative method, the I<--mode> parameter
can specify C<acpi> or C<agent>.
-=item B<start> I<domain-name> [I<--console>] [I<--paused>] [I<--autodestroy>]
+=item B<start> I<domain-name-or-uuid> [I<--console>] [I<--paused>] [I<--autodestroy>]
[I<--bypass-cache>] [I<--force-boot>]
Start a (previously defined) inactive domain, either from the last
@@ -2424,11 +2424,11 @@ used to represent properties of snapshots.
=over 4
-=item B<snapshot-create> I<domain> [I<xmlfile>] {[I<--redefine> [I<--current>]]
+=item B<snapshot-create> I<domain-id> [I<xmlfile>] {[I<--redefine> [I<--current>]]
| [I<--no-metadata>] [I<--halt>] [I<--disk-only>] [I<--reuse-external>]
[I<--quiesce>] [I<--atomic>]}
-Create a snapshot for domain I<domain> with the properties specified in
+Create a snapshot for domain I<domain-id> with the properties specified in
I<xmlfile>. Normally, the only properties settable for a domain snapshot
are the <name> and <description> elements, as well as <disks> if
I<--disk-only> is given; the rest of the fields are
@@ -2484,12 +2484,12 @@ a persistent domain. However, for transient domains, snapshot
metadata is silently lost when the domain quits running (whether
by command such as B<destroy> or by internal guest action).
-=item B<snapshot-create-as> I<domain> {[I<--print-xml>]
+=item B<snapshot-create-as> I<domain-id> {[I<--print-xml>]
| [I<--no-metadata>] [I<--halt>] [I<--reuse-external>]} [I<name>]
[I<description>] [I<--disk-only> [I<--quiesce>] [I<--atomic>]
[[I<--diskspec>] B<diskspec>]...]
-Create a snapshot for domain I<domain> with the given <name> and
+Create a snapshot for domain I<domain-id> with the given <name> and
<description>; if either value is omitted, libvirt will choose a
value. If I<--print-xml> is specified, then XML appropriate for
I<snapshot-create> is output, rather than actually creating a snapshot.
@@ -2503,7 +2503,7 @@ arguments to add <disk> elements to the xml. Each <diskspec> is in the
form B<disk[,snapshot=type][,driver=type][,file=name]>. To include a
literal comma in B<disk> or in B<file=name>, escape it with a second
comma. A literal I<--diskspec> must preceed each B<diskspec> unless
-all three of I<domain>, I<name>, and I<description> are also present.
+all three of I<domain-id>, I<name>, and I<description> are also present.
For example, a diskspec of "vda,snapshot=external,file=/path/to,,new"
results in the following XML:
<disk name='vda' snapshot='external'>
@@ -2532,7 +2532,7 @@ this. If this flag is not specified, then some hypervisors may fail
after partially performing the action, and B<dumpxml> must be used to
see whether any partial changes occurred.
-=item B<snapshot-current> I<domain> {[I<--name>] | [I<--security-info>]
+=item B<snapshot-current> I<domain-id> {[I<--name>] | [I<--security-info>]
| [I<snapshotname>]}
Without I<snapshotname>, this will output the snapshot XML for the domain's
@@ -2544,7 +2544,7 @@ the XML.
With I<snapshotname>, this is a request to make the existing named
snapshot become the current snapshot, without reverting the domain.
-=item B<snapshot-edit> I<domain> [I<snapshotname>] [I<--current>]
+=item B<snapshot-edit> I<domain-id> [I<snapshotname>] [I<--current>]
{[I<--rename>] | [I<--clone>]}
Edit the XML configuration file for I<snapshotname> of a domain. If
@@ -2572,12 +2572,12 @@ a snapshot name must be done with care, since the contents of some
snapshots, such as internal snapshots within a single qcow2 file, are
accessible only from the original name.
-=item B<snapshot-info> I<domain> {I<snapshot> | I<--current>}
+=item B<snapshot-info> I<domain-id> {I<snapshot> | I<--current>}
Output basic information about a named <snapshot>, or the current snapshot
with I<--current>.
-=item B<snapshot-list> I<domain> [{I<--parent> | I<--roots> | I<--tree>}]
+=item B<snapshot-list> I<domain-id> [{I<--parent> | I<--roots> | I<--tree>}]
[{[I<--from>] B<snapshot> | I<--current>} [I<--descendants>]]
[I<--metadata>] [I<--no-metadata>] [I<--leaves>] [I<--no-leaves>]
@@ -2613,18 +2613,18 @@ a transient domain. Likewise, if I<--no-metadata> is specified,
the list will be filtered to just snapshots that exist without
the need for libvirt metadata.
-=item B<snapshot-dumpxml> I<domain> I<snapshot> [I<--security-info>]
+=item B<snapshot-dumpxml> I<domain-id> I<snapshot> [I<--security-info>]
Output the snapshot XML for the domain's snapshot named I<snapshot>.
Using I<--security-info> will also include security sensitive information.
Use B<snapshot-current> to easily access the XML of the current snapshot.
-=item B<snapshot-parent> I<domain> {I<snapshot> | I<--current>}
+=item B<snapshot-parent> I<domain-id> {I<snapshot> | I<--current>}
Output the name of the parent snapshot, if any, for the given
I<snapshot>, or for the current snapshot with I<--current>.
-=item B<snapshot-revert> I<domain> {I<snapshot> | I<--current>}
+=item B<snapshot-revert> I<domain-id> {I<snapshot> | I<--current>}
[{I<--running> | I<--paused>}] [I<--force>]
Revert the given domain to the snapshot specified by I<snapshot>, or to
@@ -2658,7 +2658,7 @@ snapshot that uses a provably incompatible configuration, as well as
with an inactive snapshot that is combined with the I<--start> or
I<--pause> flag.
-=item B<snapshot-delete> I<domain> {I<snapshot> | I<--current>} [I<--metadata>]
+=item B<snapshot-delete> I<domain-id> {I<snapshot> | I<--current>} [I<--metadata>]
[{I<--children> | I<--children-only>}]
Delete the snapshot for the domain named I<snapshot>, or the current
@@ -2761,9 +2761,9 @@ attaching to an externally launched QEMU process. There may be
issues with the guest ABI changing upon migration, and hotunplug
may not work.
-=item B<qemu-monitor-command> I<domain> [I<--hmp>] I<command>...
+=item B<qemu-monitor-command> I<domain-id> [I<--hmp>] I<command>...
-Send an arbitrary monitor command I<command> to domain I<domain> through the
+Send an arbitrary monitor command I<command> to domain I<domain-id> through the
qemu monitor. The results of the command will be printed on stdout. If
I<--hmp> is passed, the command is considered to be a human monitor command
and libvirt will automatically convert it into QMP if needed. In that case
--
1.7.8.6
12 years, 4 months