[libvirt] [PATCH] doc: Add info (where necessary) that paths should be specified as absolute
by Erik Skultety
We documented this almost everywhere, but missed it on several places.
https://bugzilla.redhat.com/show_bug.cgi?id=1208763
---
Hopefully I didn't miss any place where it should be fixed as well.
I also thought about adding a check for this issue in the code, but we probably
do not want to do that during parsing, as the existing domains might as well
disappear. The other thing is, that if the path is invalid, "No such file or
directory" is returned which in my opinion describes the problem quite well.
docs/formatdomain.html.in | 35 +++++++++++++++++++----------------
docs/formatstorage.html.in | 7 ++++---
2 files changed, 23 insertions(+), 19 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 1b496c3..7ceb1fa 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -126,7 +126,8 @@
provides details on allowed values for
these. <span class="since">Since 0.0.1</span></dd>
<dt><code>loader</code></dt>
- <dd>The optional <code>loader</code> tag refers to a firmware blob
+ <dd>The optional <code>loader</code> tag refers to a firmware blob,
+ which is specified by absolute path,
used to assist the domain creation process. It is used by Xen
fully virtualized domains as well as setting the QEMU BIOS file
path for QEMU/KVM domains. <span class="since">Xen since 0.1.0,
@@ -142,10 +143,10 @@
<code>pflash</code>.</dd>
<dt><code>nvram</code></dt>
<dd>Some UEFI firmwares may want to use a non-volatile memory to store
- some variables. In the host, this is represented as a file and the path
- to the file is stored in this element. Moreover, when the domain is
- started up libvirt copies so called master NVRAM store file defined
- in <code>qemu.conf</code>. If needed, the <code>template</code>
+ some variables. In the host, this is represented as a file and the
+ absolute path to the file is stored in this element. Moreover, when the
+ domain is started up libvirt copies so called master NVRAM store file
+ defined in <code>qemu.conf</code>. If needed, the <code>template</code>
attribute can be used to per domain override map of master NVRAM stores
from the config file. Note, that for transient domains if the NVRAM file
has been created by libvirt it is left behind and it is management
@@ -971,7 +972,7 @@
resource partitions, potentially with nesting of said partitions.
The <code>resource</code> element groups together configuration
related to resource partitioning. It currently supports a child
- element <code>partition</code> whose content defines the path
+ element <code>partition</code> whose content defines the absolute path
of the resource partition in which to place the domain. If no
partition is listed, then the domain will be placed in a default
partition. It is the responsibility of the app/admin to ensure
@@ -1954,8 +1955,8 @@
<dt><code>type='block'</code>
<span class="since">since 0.0.3</span></dt>
<dd>
- The <code>dev</code> attribute specifies the path to the
- host device to serve as the disk.
+ The <code>dev</code> attribute specifies the fully-qualified path
+ to the host device to serve as the disk.
</dd>
<dt><code>type='dir'</code>
<span class="since">since 0.7.5</span></dt>
@@ -3226,7 +3227,7 @@
versions of qemu used a default of "off", while newer qemus
have a default of "on"). <span class="since">Since
0.9.7 (QEMU and KVM only)</span>. The optional
- <code>file</code> attribute is used to point to a binary file
+ <code>file</code> attribute contains an absolute path to a binary file
to be presented to the guest as the device's ROM BIOS. This
can be useful, for example, to provide a PXE boot ROM for a
virtual function of an sr-iov capable ethernet device (which
@@ -3285,7 +3286,8 @@
<p>
Block / character devices from the host can be passed through
to the guest using the <code>hostdev</code> element. This is
- only possible with container based virtualization.
+ only possible with container based virtualization. Devices are specified
+ by a fully qualified path.
<span class="since">since after 1.0.1 for LXC</span>:
</p>
@@ -5486,11 +5488,12 @@ qemu-kvm -net nic,model=? /dev/null
<dl>
<dt><code>master</code></dt>
- <dd>Master device of the pair, that is passed to the hypervisor.</dd>
+ <dd>Master device of the pair, that is passed to the hypervisor.
+ Device is specified by a fully qualified path.</dd>
<dt><code>slave</code></dt>
<dd>Slave device of the pair, that is passed to the clients for connection
- to the guest console.</dd>
+ to the guest console. Device is specified by a fully qualified path.</dd>
</dl>
<h4><a name="elementsSound">Sound devices</a></h4>
@@ -5834,8 +5837,8 @@ qemu-kvm -net nic,model=? /dev/null
<p>
This backend type requires exclusive access to a TPM device on
the host.
- An example for such a device is /dev/tpm0. The filename is
- specified as path attribute of the <code>source</code> element.
+ An example for such a device is /dev/tpm0. The fully qualified file
+ name is specified by path attribute of the <code>source</code> element.
If no file name is specified then /dev/tpm0 is automatically used.
</p>
</dd>
@@ -5941,8 +5944,8 @@ qemu-kvm -net nic,model=? /dev/null
<dd>
The optional <code>server</code> element can be used to configure a server
socket the device is supposed to connect to. The optional
- <code>path</code> attribute specifies the path to the unix socket and
- defaults to <code>/var/lib/libvirt/shmem/$shmem-$name-sock</code>.
+ <code>path</code> attribute specifies the absolute path to the unix socket
+ and defaults to <code>/var/lib/libvirt/shmem/$shmem-$name-sock</code>.
</dd>
<dt><code>msi</code></dt>
<dd>
diff --git a/docs/formatstorage.html.in b/docs/formatstorage.html.in
index 9c7b1bd..479e73c 100644
--- a/docs/formatstorage.html.in
+++ b/docs/formatstorage.html.in
@@ -379,9 +379,10 @@
<dl>
<dt><code>path</code></dt>
<dd>Provides the location at which the pool will be mapped into
- the local filesystem namespace. For a filesystem/directory based
- pool it will be the name of the directory in which volumes will
- be created. For device based pools it will be the name of the directory in which
+ the local filesystem namespace, as an absolute path. For a
+ filesystem/directory based pool it will be a fully qualified name of
+ the directory in which volumes will be created. For device based pools
+ it will be a fully qualified name of the directory in which
devices nodes exist. For the latter <code>/dev/</code> may seem
like the logical choice, however, devices nodes there are not
guaranteed stable across reboots, since they are allocated on
--
1.9.3
9 years, 7 months
[libvirt] [PATCH 00/11] qemu: Refactor the block job code
by Peter Krempa
At the expense of adding 113 lines of code, kill the ugly qemuBlockJobImpl
method and spread it's guts into separate functions.
This series additionally fixes a issue with failed drive pivot and the abort
function now returns errors if the returned event contained failure.
Peter Krempa (11):
qemu: monitor: Extract handling of JSON block job error codes
qemu: domain: Introduce helper to retrieve domain monitor object
qemu: domain: Add helper to check block job support
qemu: blockjob: Use the new helpers in qemuDomainGetBlockJobInfo
qemu: blockjob: Split qemuDomainBlockJobSetSpeed from
qemuDomainBlockJobImpl
qemu: Clean up old leftovers in qemuMonitorDrivePivot
qemu: blockPivot: Don't pause the VM any more since we don't use
drive-reopen
qemu: blockjob: Separate qemuDomainBlockJobAbort from
qemuDomainBlockJobImpl
qemu: blockPull: Refactor the rest of qemuDomainBlockJobImpl
qemu: drivePivot: Fix assumption when 'block-job-complete' fails
qemu: Refactor qemuDomainBlockJobAbort()
src/qemu/qemu_domain.c | 43 +++++
src/qemu/qemu_domain.h | 4 +
src/qemu/qemu_driver.c | 437 +++++++++++++++++++++----------------------
src/qemu/qemu_migration.c | 8 +-
src/qemu/qemu_monitor.c | 88 ++++++---
src/qemu/qemu_monitor.h | 35 ++--
src/qemu/qemu_monitor_json.c | 188 +++++++++++--------
src/qemu/qemu_monitor_json.h | 28 ++-
tests/qemumonitorjsontest.c | 2 +-
9 files changed, 473 insertions(+), 360 deletions(-)
--
2.2.2
9 years, 7 months
[libvirt] [PATCH] qemu: Avoid shadow of 'sync' symbol
by Peter Krempa
Old compilers whine that 'sync' is being shadowed in the function
introduced in 1eccac1d2da7bbe97e1df25fd0ddac6e71b0794a.
---
Pushed under the build-breaker rule.
src/qemu/qemu_domain.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index c18b864..ae632c5 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -3063,17 +3063,17 @@ qemuDomainSupportsBlockJobs(virDomainObjPtr vm,
bool *modern)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
- bool async = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKJOB_ASYNC);
- bool sync = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKJOB_SYNC);
+ bool asynchronous = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKJOB_ASYNC);
+ bool synchronous = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKJOB_SYNC);
- if (!sync && !async) {
+ if (!synchronous && !asynchronous) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("block jobs not supported with this QEMU binary"));
return -1;
}
if (modern)
- *modern = async;
+ *modern = asynchronous;
return 0;
}
--
2.2.2
9 years, 7 months
[libvirt] [PATCHv2.5 00/10] Add support for memory hotplug
by Peter Krempa
Rebased version after changes to the prequel series.
This applies on top of http://www.redhat.com/archives/libvir-list/2015-March/msg00134.html
Convenience branch to pull from:
git fetch git://pipo.sk/pipo/libvirt.git memory-hotplug-2.5
Peter Krempa (10):
conf: Add support for parsing and formatting max memory and slot count
qemu: Implement setup of memory hotplug parameters
conf: Add device address type for dimm devices
conf: Add interface to parse and format memory device information
qemu: memdev: Add infrastructure to load memory device information
qemu: migration: Forbid migration with memory modules lacking info
qemu: add support for memory devices
qemu: conf: Add support for memory device cold(un)plug
qemu: Implement memory device hotplug
qemu: Implement memory device hotunplug
docs/formatdomain.html.in | 98 ++++
docs/schemas/domaincommon.rng | 76 +++
src/bhyve/bhyve_domain.c | 9 +-
src/conf/domain_conf.c | 564 ++++++++++++++++++++-
src/conf/domain_conf.h | 60 +++
src/libvirt_private.syms | 7 +
src/libxl/libxl_domain.c | 8 +
src/lxc/lxc_domain.c | 8 +
src/openvz/openvz_driver.c | 14 +-
src/parallels/parallels_driver.c | 6 +-
src/phyp/phyp_driver.c | 6 +-
src/qemu/qemu_command.c | 166 +++++-
src/qemu/qemu_command.h | 15 +
src/qemu/qemu_domain.c | 80 +++
src/qemu/qemu_domain.h | 5 +
src/qemu/qemu_driver.c | 29 ++
src/qemu/qemu_hotplug.c | 177 +++++++
src/qemu/qemu_hotplug.h | 6 +
src/qemu/qemu_migration.c | 14 +
src/qemu/qemu_monitor.c | 42 ++
src/qemu/qemu_monitor.h | 14 +
src/qemu/qemu_monitor_json.c | 122 +++++
src/qemu/qemu_monitor_json.h | 5 +
src/qemu/qemu_process.c | 4 +
src/uml/uml_driver.c | 9 +-
src/vbox/vbox_common.c | 6 +-
src/vmware/vmware_driver.c | 6 +-
src/vmx/vmx.c | 6 +-
src/xen/xen_driver.c | 7 +
src/xenapi/xenapi_driver.c | 9 +-
tests/domainschemadata/maxMemory.xml | 19 +
.../qemuxml2argv-memory-hotplug-dimm.args | 11 +
.../qemuxml2argv-memory-hotplug-dimm.xml | 50 ++
.../qemuxml2argv-memory-hotplug-nonuma.xml | 22 +
.../qemuxml2argv-memory-hotplug.args | 6 +
.../qemuxml2argv-memory-hotplug.xml | 34 ++
tests/qemuxml2argvtest.c | 6 +
tests/qemuxml2xmltest.c | 4 +
38 files changed, 1707 insertions(+), 23 deletions(-)
create mode 100644 tests/domainschemadata/maxMemory.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-nonuma.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug.xml
--
2.2.2
9 years, 7 months
[libvirt] [PATCH 0/3] Fix some storage issues
by John Ferlan
Patch 1 & 3 are bz based, while Patch 2 was determined while working on
Patch 3. Details in each commit message
John Ferlan (3):
storage: Fix issues in storageVolResize
storage: Need to update freeExtent at delete primary partition
storage: Don't duplicate efforts of backend driver
src/storage/storage_backend_disk.c | 9 +++--
src/storage/storage_driver.c | 67 ++++++++++++++++++++++++++++++--------
2 files changed, 59 insertions(+), 17 deletions(-)
--
2.1.0
9 years, 7 months
[libvirt] [PATCH 0/3] Honour sparse files on migration
by Michal Privoznik
When the storage is pre-created on the destination, it might have
been allocated as sparse on the source. Let's keep it that way if
we can.
Michal Privoznik (3):
qemuMigrationPrecreateStorage: Fix debug message
qemuMigrationCookieNBD: Turn some items into their own struct
qemuMigrationPrecreateDisk: Preserve sparse files
src/qemu/qemu_migration.c | 49 +++++++++++++++++++++++++++++++++++------------
1 file changed, 37 insertions(+), 12 deletions(-)
--
2.0.5
9 years, 7 months
[libvirt] securityselinuxlabeltest test fails on v1.2.5
by Scott Sullivan
I am trying to build v1.2.5-maint, however I have one test failing
causing the build to fail:
TEST: securityselinuxlabeltest
!!!. 4 FAIL
PASS: virsh-undefine
=======================================
1 of 112 tests failed
Please report to libvir-list(a)redhat.com
=======================================
make[2]: *** [check-TESTS] Error 1
make[2]: Leaving directory `/home/rpmbuild/packages/libvirt/tests'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/home/rpmbuild/packages/libvirt/tests'
make: *** [check-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.UGNUaq (%build)
Is anyone else having this problem? Im building on CentOS 6.5. Im happy
to provide any further information as needed.
9 years, 7 months
[libvirt] [PATCH] lxc: create the required directories upon driver start
by Lubomir Rintel
/var/run may reside on a tmpfs and we fail to create the PID file if
/var/run/lxc does not exist.
Other drivers (well, BHYVE) seem to do the same thing.
Signed-off-by: Lubomir Rintel <lkundrak(a)v3.sk>
---
src/lxc/lxc_driver.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 245000d..4363898 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -1648,6 +1648,20 @@ static int lxcStateInitialize(bool privileged,
if (!(caps = virLXCDriverGetCapabilities(lxc_driver, false)))
goto cleanup;
+ if (virFileMakePath(LXC_LOG_DIR) < 0) {
+ virReportSystemError(errno,
+ _("Failed to mkdir %s"),
+ LXC_LOG_DIR);
+ goto cleanup;
+ }
+
+ if (virFileMakePath(LXC_STATE_DIR) < 0) {
+ virReportSystemError(errno,
+ _("Failed to mkdir %s"),
+ LXC_STATE_DIR);
+ goto cleanup;
+ }
+
/* Get all the running persistent or transient configs first */
if (virDomainObjListLoadAllConfigs(lxc_driver->domains,
cfg->stateDir,
--
2.1.0
9 years, 7 months