[libvirt] [PATCH] qemu: monitor: Provide more information in generic block job error
by Peter Krempa
The qemuMonitorJSONBlockJob handles a few errors internally. If qemu
returns a different error we would report a rather unhelpful message:
$ virsh blockpull gluster-job vda --base /dev/null
error: internal error: Unexpected error
As the actual message from qemu contains a bit more info, let's use it
to report something a little more useful:
$ virsh blockpull gluster-job vda --base /dev/null
error: internal error: Unexpected error: (GenericError) 'Base '/dev/null' not found'
---
src/qemu/qemu_monitor_json.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 9a5b812..ee3ae15 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -3678,8 +3678,12 @@ qemuMonitorJSONBlockJob(qemuMonitorPtr mon,
virReportError(VIR_ERR_OPERATION_INVALID,
_("Command '%s' is not found"), cmd_name);
} else {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("Unexpected error"));
+ virJSONValuePtr error = virJSONValueObjectGet(reply, "error");
+
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Unexpected error: (%s) '%s'"),
+ NULLSTR(virJSONValueObjectGetString(error, "class")),
+ NULLSTR(virJSONValueObjectGetString(error, "desc")));
}
}
--
1.9.0
10 years, 9 months
[libvirt] [PATCHv8 0/2] Implement RBD storage pool support
by Adam Walters
This is an updated version of my RBD storage pool support patch. Relevant
changes since v7 are:
- Fixed bug where I compared disk->srcpool->mode to VIR_DOMAIN_DISK_TYPE_NETWORK
In response to a couple of items Ján mentioned, I decided not to pursue adding
anything to qemuxml2argvtest. The reason I decided not to pursue this is there is
not really any need. In comparison with other volume types, RBD already has the
same test coverage. Namely, a base set of test-cases without using storage pools,
plus a generic storage pool test.
In addition, I also attempted to implement a proper check for expected vs actual
secret usage, but at that particular point in the code, Ján was correct that the
pool definition has not yet been parsed. Thus, I had to keep my bypass.
Adam Walters (2):
qemu: conf Implement domain RBD storage pool support
domain: conf: Fix secret type checking for network volumes
src/conf/domain_conf.c | 9 ++++++--
src/qemu/qemu_conf.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 68 insertions(+), 3 deletions(-)
--
1.8.5.3
10 years, 9 months
[libvirt] [PATCH v13 00/49] write separate module for hostdev passthrough
by Chunyan Liu
These patches implements a separate module for hostdev passthrough so that it
could be shared by different drivers and can maintain a global state of a host
device.
Patches 1~6 are to switch existing qemu and lxc driver to use common library
lists, so that to maintain a global state of every host device.
Patches 7~45 are to extract general code from qemu_hostdev.c piece by piece,
make them reusable common APIs.
Patches 46: unit test for the virhostdev common library
Patches 47: add a hostdev backend type for xen
Patches 48: add pci passthrough to libxl driver based on the common library
Patches 49: change lxc to use common library APIs
---
changes to v12:
* split "add hostdev passthrough common library" patch into small patches
for easier review.
* fix v12 comments
* rebase to libxl changes
Chunyan Liu (49):
add 'driver' info to used_by
qemu: reuse hostdev interfaces to avoid duplicate
qemu: remove functions now used internally only from qemu_hostdev.h
add virhostdev files to maintain global state of host devices
qemu: use general virhostdev lists instead of its own
lxc: use general virhostdev lists instead of its own
qemu_hostdev: move cfg->relaxedACS as a flag
qemu_hostdev: move ColdBoot as a flag
qemu_hostdev: move netconfig file location to virhostdev stateDir
extract general code from qemuPrepareHostdevPCIDevices
rename qemu*NetConfigRestore/Replace to
virHostdevNetConfigRestore/Replace
rename qemuGet*PciHostDeviceList to virHostdevGet*PciHostDeviceList
pass driver name as a parameter to virHostdevPrepareHostdevPCIDevices
extract general code from qemuDomainReAttachHostdevDevices
pass driver name as a parameter to virHostdevReAttachPCIDevices
rename qemuReAttachPciDevice to virHostdevReAttachPciDevice
move virHostdevPrepare(ReAttach)PCIDevices to virhostdev.c
extract general code from qemuUpdateActivePciHostdevs
extract general code from qemuUpdateActiveUsbHostdevs
extract general code from qemuUpdateActiveScsiHostdevs
pass driver_name as parameter of virHostdevUpdate*Hostdevs functions
move virHostdevUpdate* functions to virhostdev.c
qemuPrepareUSBDevices: code adjustment for extracting general code
extract general code from qemuPrepareHostUSBDevices
rename qemu*USBDevices to virHostdev*USBDevices
pass driver name to virHostdevPrepareUSBDevices
move virHostdevPrepareHostUSBDevices to virhostdev.c
extract general code from qemuPrepareHostSCSIDevices
pass driver name as parameter to virHostdevPrepareSCSIDevices
move virHostdevPrepareHostSCSIDevices to virhostdev.c
extract general code from qemuDomainReAttachHostUsbDevices
pass driver name as paramter to virHostdevReAttachUsbHostdevs
move virHostdevDomainReAttachHostUsbDevices to virhostdev.c
extract general code from qemuDomainReAttachHostScsiDevices
pass driver name as parameter to virHostdevReAttachScciHostdevs
move virHostdevReAttachHostScsiDevices to virhostdev.c
extract general code of NodeDeviceDetach
extract general code of NodeDeviceReAttach
extract general code of NodeDeviceReset
move virHostdevNodeDevice* to virhostdev.c
improve parameter name to let it more meaningful
rename some function names to keep consistency
improve virHostdevUpdate* parameters to make it more widely used
add 3 wrapper functions for prepare/reattach/update domain hostdevs
add parameter checks to common interfaces
add unit test for new virhostdev common library
change lxc_hostdev.c to use virhostdev common library APIs
add hostdev pci backend type for xen
add pci passthrough to libxl driver
.gitignore | 1 +
docs/schemas/domaincommon.rng | 1 +
po/POTFILES.in | 1 +
src/Makefile.am | 1 +
src/conf/domain_conf.c | 3 +-
src/conf/domain_conf.h | 1 +
src/libvirt_private.syms | 19 +
src/libxl/libxl_conf.c | 63 ++
src/libxl/libxl_conf.h | 4 +
src/libxl/libxl_domain.c | 9 +
src/libxl/libxl_driver.c | 447 +++++++++++-
src/lxc/lxc_conf.h | 4 -
src/lxc/lxc_driver.c | 17 +-
src/lxc/lxc_hostdev.c | 315 +--------
src/qemu/qemu_command.c | 3 +-
src/qemu/qemu_conf.h | 10 +-
src/qemu/qemu_driver.c | 88 +--
src/qemu/qemu_hostdev.c | 1220 ++-----------------------------
src/qemu/qemu_hostdev.h | 27 +-
src/qemu/qemu_hotplug.c | 77 +--
src/qemu/qemu_process.c | 8 +-
src/util/virhostdev.c | 1621 +++++++++++++++++++++++++++++++++++++++++
src/util/virhostdev.h | 140 ++++
src/util/virpci.c | 31 +-
src/util/virpci.h | 9 +-
src/util/virscsi.c | 32 +-
src/util/virscsi.h | 7 +-
src/util/virusb.c | 31 +-
src/util/virusb.h | 8 +-
tests/Makefile.am | 5 +
tests/virhostdevtest.c | 507 +++++++++++++
tests/virscsitest.c | 6 +-
32 files changed, 3081 insertions(+), 1635 deletions(-)
create mode 100644 src/util/virhostdev.c
create mode 100644 src/util/virhostdev.h
create mode 100644 tests/virhostdevtest.c
10 years, 9 months
[libvirt] [PATCH v4 0/3] support dumping guest memory in compressed format
by qiaonuohan
dumping guest's memroy is introduced without compression supported, and this is
a freature regression of 'virsh dump --memory-only'. This patchset is used to
add support in libvirt side to make qemu dump guest's memory in kdump-compressed
format and please refer the following address to see implementation of the qemu
side, the lastest version of qemu side is v9(ready for being queued).
http://lists.nongnu.org/archive/html/qemu-devel/2014-02/msg03016.html
ChangLog:
Changes from v3 to v4:
1. dropping patch "add dump_memory_format in qemu.conf"
2. fix to follow some conventions
Changes from v2 to v3:
1. address Jiri Denemark's comment about adding a new public API instead of
changing an old one.
Changes from v1 to v2:
1. address Daniel P. Berrange's comment about using a new parameter to replace
flags like VIR_DUMP_COMPRESS_ZLIB.
qiaonuohan (3):
add new virDomainCoreDumpWithFormat API
add qemu support to virDomainCoreDumpWithFormat API
allow "virsh dump --memory-only" specify dump format
include/libvirt/libvirt.h.in | 31 ++++++++++++++
src/driver.h | 7 +++
src/libvirt.c | 100 +++++++++++++++++++++++++++++++++++++++++++
src/libvirt_public.syms | 5 +++
src/qemu/qemu_driver.c | 45 +++++++++++++++----
src/qemu/qemu_monitor.c | 7 +--
src/qemu/qemu_monitor.h | 3 +-
src/qemu/qemu_monitor_json.c | 4 +-
src/qemu/qemu_monitor_json.h | 3 +-
src/remote/remote_driver.c | 1 +
src/remote/remote_protocol.x | 15 ++++++-
src/remote_protocol-structs | 7 +++
src/test/test_driver.c | 19 ++++++--
tests/qemumonitorjsontest.c | 2 +-
tools/virsh-domain.c | 45 ++++++++++++++++++-
15 files changed, 273 insertions(+), 21 deletions(-)
--
1.8.5.3
10 years, 9 months
[libvirt] [PATCHv2 0/7] various fixes related to gluster volumes
by Peter Krempa
Peter Krempa (7):
virsh: volume: Fix lookup of volumes to provide better error messages
storage: Use cleanup label instead of out
storage: Error out when attempting to vol-upload into a remote pool
storage: Avoid mangling paths of non-local filesystems when looking up
storage: Don't lie about path used to look up in error message
doc: storage: Explicitly state that it's possible to have non-unique
key
gluster: Fix "key" attribute for gluster volumes
docs/formatstorage.html.in | 6 +-
src/storage/storage_backend_gluster.c | 10 +-
src/storage/storage_driver.c | 215 +++++++++++++++++++++-------------
tools/virsh-volume.c | 12 +-
4 files changed, 154 insertions(+), 89 deletions(-)
--
1.9.0
10 years, 9 months
[libvirt] [Question] Will we support to set boot order online?
by Wangyufei (James)
Hello,
I find that QEMU supports to set boot(QMP command "boot_set") order online, namely the virtual machine
can be reboot in appointed order, but libvirt had no corresponding interface. So, I want to know if libvirt intend to
support to set boot order online. If the answer is yes, I'll try to apply the patch. If no, why?
Best Regards,
-WangYufei
10 years, 9 months
[libvirt] [PATCH] qemu: add PCI-multibus support for ppc
by Olivia Yin
Signed-off-by: Olivia Yin <hong-hua.yin(a)freescale.com>
---
src/qemu/qemu_capabilities.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 7bc1ebc..7d7791d 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -2209,6 +2209,11 @@ virQEMUCapsInitHelp(virQEMUCapsPtr qemuCaps, uid_t runUid, gid_t runGid)
virQEMUCapsClear(qemuCaps, QEMU_CAPS_NO_ACPI);
}
+ /* ppc support PCI-multibus */
+ if (qemuCaps->arch == VIR_ARCH_PPC) {
+ virQEMUCapsSet(qemuCaps, QEMU_CAPS_PCI_MULTIBUS);
+ }
+
/* virQEMUCapsExtractDeviceStr will only set additional caps if qemu
* understands the 0.13.0+ notion of "-device driver,". */
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE) &&
@@ -2450,6 +2455,11 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps,
virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_ACPI);
}
+ /* ppc support PCI-multibus */
+ if (qemuCaps->arch == VIR_ARCH_PPC) {
+ virQEMUCapsSet(qemuCaps, QEMU_CAPS_PCI_MULTIBUS);
+ }
+
if (virQEMUCapsProbeQMPCommands(qemuCaps, mon) < 0)
goto cleanup;
if (virQEMUCapsProbeQMPEvents(qemuCaps, mon) < 0)
--
1.6.4
10 years, 9 months
[libvirt] [PATCH 0/4] Expose FSFreeze/FSThaw within the guest as commands
by Tomoki Sekiyama
Currently FSFreeze and FSThaw are supported by qemu guest agent and they are
used internally in snapshot-create command with --quiesce option.
However, when users want to utilize the native snapshot feature of storage
devices (such as LVM over iSCSI, various enterprise storage systems, etc.),
they need to issue fsfreeze command separately from libvirt-driven snapshots.
(OpenStack cinder provides these storages' snapshot feature, but it cannot
quiesce the guest filesystems automatically for now.)
Although virDomainQemuGuestAgent() API could be used for this purpose, it
depends too much on specific hypervisor implementation.
This patchset adds virDomainFSFreeze()/virDomainFSThaw() APIs and virsh
domfsfreeze/domfsthaw commands to enable the users to freeze and thaw
domain's filesystems cleanly.
The APIs has mountPoint and flags option currently unsupported for future
extension, as virDomainFSTrim() API.
Duplicated FSFreeze results in error caused by qemu guest agent.
---
Tomoki Sekiyama (4):
Introduce virDomainFSFreeze() public API
remote: Implement virDomainFSFreeze and virDomainFSThaw
qemu: Implement virDomainFSFreeze
virsh: Expose new virDomainFSFreeze and virDomainFSThaw API
include/libvirt/libvirt.h.in | 8 ++
src/access/viraccessperm.c | 2 -
src/access/viraccessperm.h | 6 ++
src/driver.h | 12 ++++
src/libvirt.c | 92 +++++++++++++++++++++++++++
src/libvirt_public.syms | 6 ++
src/qemu/qemu_driver.c | 142 ++++++++++++++++++++++++++++++++++++++++++
src/remote/remote_driver.c | 2 +
src/remote/remote_protocol.x | 26 +++++++-
src/remote_protocol-structs | 12 ++++
src/rpc/gendispatch.pl | 2 +
tools/virsh-domain.c | 108 ++++++++++++++++++++++++++++++++
tools/virsh.pod | 17 +++++
13 files changed, 433 insertions(+), 2 deletions(-)
10 years, 9 months
[libvirt] [PATCH 0/2] Properly error out on unsupported settings
by Martin Kletzander
<BLURB/>
Martin Kletzander (2):
tests: Create privileged driver config in qemuxml2argvtest
qemu: Reject unsupported tuning in session mode
src/qemu/qemu_command.c | 32 +++++++++++++++
src/qemu/qemu_driver.c | 103 ++++++++++++++++++++++++++++++++++++++++++++++-
tests/qemuxml2argvtest.c | 2 +-
3 files changed, 135 insertions(+), 2 deletions(-)
--
1.9.0
10 years, 9 months