[libvirt] libvirt iSCSI target discovery
by Sijo Jose
Hi,
Is it possible to discover iSCSI targets using libvirt API..?
OR
is it possible to get the similar results of below commands using
libvirtAPI..?
iscsiadm --mode discovery --type sendtargets --portal server1.example.com
sudo iscsiadm -m discovery -t st -p 192.168.0.10
Regards
Sijo
10 years, 9 months
[libvirt] [PATCH V2] libxl: queue domain event earlier in shutdown handler
by Jim Fehlig
The shutdown handler may restart a domain when handling a reboot
event or when <on_*> is set to 'restart'. Restarting consists of
calling libxlVmCleanup followed by libxlVmStart. libxlVmStart will
emit a VIR_DOMAIN_EVENT_STARTED event, but the SHUTDOWN event is
not emitted until exiting the shutdown handler, after the STARTED
event.
This patch changes the logic a bit to queue the event at the start
of the shutdown action, ensuring it is queued before any subsequent
events that may be generated while executing the shutdown action.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
V2:
Enqueue any pending events at the beginning of the shutdown action
labels, as suggested by Michal Privoznik
https://www.redhat.com/archives/libvir-list/2014-February/msg01446.html
src/libxl/libxl_driver.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index f7379b5..a79efcb 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -473,6 +473,10 @@ libxlDomainShutdownThread(void *opaque)
}
destroy:
+ if (dom_event) {
+ libxlDomainEventQueue(driver, dom_event);
+ dom_event = NULL;
+ }
libxl_domain_destroy(ctx, vm->def->id, NULL);
if (libxlVmCleanupJob(driver, vm, reason)) {
if (!vm->persistent) {
@@ -483,6 +487,10 @@ destroy:
goto cleanup;
restart:
+ if (dom_event) {
+ libxlDomainEventQueue(driver, dom_event);
+ dom_event = NULL;
+ }
libxl_domain_destroy(ctx, vm->def->id, NULL);
libxlVmCleanupJob(driver, vm, VIR_DOMAIN_SHUTOFF_SHUTDOWN);
libxlVmStart(driver, vm, 0, -1);
--
1.8.1.4
10 years, 9 months
[libvirt] [PATCH libvirt-java] spec: Depend on java-headless for Fedora 21+
by Cole Robinson
Details: https://bugzilla.redhat.com/show_bug.cgi?id=1068369
---
libvirt-java.spec.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libvirt-java.spec.in b/libvirt-java.spec.in
index 137af83..d07b998 100644
--- a/libvirt-java.spec.in
+++ b/libvirt-java.spec.in
@@ -12,7 +12,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires: jna
Requires: libvirt-client >= @libvirt.required@
+%if 0%{?fedora} >= 21
+Requires: java-headless >= @java.required@
+%else
Requires: java >= @java.required@
+%endif
Requires: jpackage-utils
BuildRequires: ant
BuildRequires: jna
--
1.8.5.3
10 years, 9 months
[libvirt] [PATCH 0/3] Couple of libvirt-guests fixes
by Michal Privoznik
*** BLURB HERE ***
Michal Privoznik (3):
virSystemdCreateMachine: Set dependencies for slices
libvirt-guests: Wait for libirtd to initialize
virNetServerRun: Notify systemd that we're accepting clients
configure.ac | 2 ++
daemon/libvirtd.service.in | 1 +
m4/virt-systemd-daemon.m4 | 34 ++++++++++++++++++++++++++++++++++
src/Makefile.am | 4 ++--
src/libvirt_private.syms | 1 +
src/rpc/virnetserver.c | 7 +++++++
src/util/virsystemd.c | 18 ++++++++++++++++--
src/util/virsystemd.h | 2 ++
tools/libvirt-guests.sh.in | 19 +++++++++++++------
9 files changed, 78 insertions(+), 10 deletions(-)
create mode 100644 m4/virt-systemd-daemon.m4
--
1.9.0
10 years, 9 months
[libvirt] [PATCH 0/7] network: include plugged interface XML in "plugged" network hook
by Laine Stump
Although the immediate reason for all these patches is $subject, it
really is something that should have been done a long time ago (I just
hadn't convinced myself it was the right thing to do). These patches
will allow a management application to easily learn exactly what
physical hardware is being used by a domain's interface, which wasn't
previously possible (e.g., it will be simple to learn which SRIOV VF
is being used by a domain interface that is configured as <interface
type='network'> where the network is a pool of VFs).
Laine Stump (7):
conf: clarify what is returned for actual bandwidth and vlan
conf: handle null pointer in virNetDevVlanFormat
conf: make virDomainNetDefFormat a public function
conf: re-situate <bandwidth> element in <interface>
conf: new function virDomainActualNetDefContentsFormat
conf: output actual netdev status in <interface> XML
network: include plugged interface XML in "plugged" network hook
src/conf/domain_conf.c | 303 +++++++++++++--------
src/conf/domain_conf.h | 4 +
src/conf/netdev_vlan_conf.c | 4 +-
src/libvirt_private.syms | 1 +
src/network/bridge_driver.c | 48 ++--
...qemuhotplug-console-compat-2+console-virtio.xml | 4 +-
.../qemuxml2argv-console-compat-2.xml | 4 +-
.../qemuxml2argv-net-bandwidth.xml | 2 +-
8 files changed, 233 insertions(+), 137 deletions(-)
--
1.8.5.3
10 years, 9 months
[libvirt] [PATCH 0/3] Multiple fixes related to lookup of gluster volumes
by Peter Krempa
Peter Krempa (3):
storage: Don't lie about path used to look up in error message
util: file: Don't sanitize URI protocol separator in
virFileSanitizePath
gluster: Fix "key" attribute for gluster volumes
src/storage/storage_backend_gluster.c | 10 ++++++++--
src/storage/storage_driver.c | 12 +++++++++---
src/util/virfile.c | 12 ++++++++++++
3 files changed, 29 insertions(+), 5 deletions(-)
--
1.8.5.5
10 years, 9 months
[libvirt] [PATCH 0/3] Various RBD storage pool changes
by Wido den Hollander
This series of patches changes a couple of things in the RBD storage pool
driver.
The first change is that it includes the return status of librados and librbd
in log and debug messages making it easier for users to track down the real
cause of the problem.
The second patch simplifies some code.
The third patch leverages the new timeout options from librados. Should the
backing Ceph cluster not respond for any reason librados will timeout.
This prevents libvirt from handing on a rados_* or rbd_* call and locking up
libvirt.
If the librados version on the system does not support these timeout options
nothing happens. libvirt compiles and runs just fine, but the timeout simply
won't work.
Wido den Hollander (3):
rbd: Include return statusses from librados/librbd in logging
rbd: Simplify opening RADOS IoCTX
rbd: Set timeout options for librados
src/storage/storage_backend_rbd.c | 137 ++++++++++++++++++++++---------------
1 file changed, 80 insertions(+), 57 deletions(-)
--
1.7.9.5
10 years, 9 months
[libvirt] [PATCH] virsh: initialize str to NULL for solving a build issue
by Chen Hanxiao
Fix a -Werror=maybe-uninitialized issue.
Signed-off-by: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
---
tools/virsh-domain-monitor.c | 2 +-
tools/virsh-domain.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index c67b833..1192565 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -218,7 +218,7 @@ VIR_ENUM_IMPL(vshDomainPMSuspendedReason,
static const char *
vshDomainStateReasonToString(int state, int reason)
{
- const char *str;
+ const char *str = NULL;
switch ((virDomainState) state) {
case VIR_DOMAIN_NOSTATE:
str = vshDomainNostateReasonTypeToString(reason);
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 8e42300..3e73340 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -10399,7 +10399,7 @@ VIR_ENUM_IMPL(vshDomainEventCrashed,
static const char *
vshDomainEventDetailToString(int event, int detail)
{
- const char *str;
+ const char *str = NULL;
switch ((virDomainEventType) event) {
case VIR_DOMAIN_EVENT_DEFINED:
str = vshDomainEventDefinedTypeToString(detail);
--
1.8.5.3
10 years, 9 months
[libvirt] [PATCH] virsh: mark CPU usage field names as translatable
by Ján Tomko
My commit ac75801 removed the translation markers when
moving the field names into an array.
---
tools/virsh-host.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/virsh-host.c b/tools/virsh-host.c
index 502203b..6a04f9d 100644
--- a/tools/virsh-host.c
+++ b/tools/virsh-host.c
@@ -352,12 +352,12 @@ VIR_ENUM_IMPL(vshCPUStats, VSH_CPU_LAST,
VIR_NODE_CPU_STATS_UTILIZATION);
const char *vshCPUOutput[] = {
- "user:",
- "system:",
- "idle:",
- "iowait:",
- "intr:",
- "usage:"
+ N_("user:"),
+ N_("system:"),
+ N_("idle:"),
+ N_("iowait:"),
+ N_("intr:"),
+ N_("usage:")
};
static bool
--
1.8.3.2
10 years, 9 months