[libvirt] [PATCH 0/2] Fix PCI address validation
by Pavel Hrdina
Pavel Hrdina (2):
domain_conf: refactor virDomainDeviceAddressIsValid to boolean
device_conf: PCI address pci_0000_00_00_0 is also valid
src/conf/device_conf.c | 7 ++++---
src/conf/device_conf.h | 2 +-
src/conf/domain_conf.c | 16 ++++++++--------
src/conf/domain_conf.h | 4 ++--
4 files changed, 15 insertions(+), 14 deletions(-)
--
1.8.5.5
10 years, 3 months
[libvirt] [PATCH] blockjob: correctly report active commit for job info
by Eric Blake
Commit 232a31b munged job info to report 'active commit' instead of
'commit' when generating events, but forgot to also munge the polling
variant of the command.
* src/qemu/qemu_driver.c (qemuDomainBlockJobImpl): Adjust type as
needed.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
src/qemu/qemu_driver.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index a3de784..57cc913 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -15103,6 +15103,9 @@ qemuDomainBlockJobImpl(virDomainObjPtr vm,
ret = qemuMonitorBlockJob(priv->mon, device, basePath, backingPath,
bandwidth, info, mode, async);
qemuDomainObjExitMonitor(driver, vm);
+ if (info && info->type == VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT &&
+ disk->mirrorJob == VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT)
+ info->type = disk->mirrorJob;
if (ret < 0) {
if (mode == BLOCK_JOB_ABORT && disk->mirror)
disk->mirrorState = VIR_DOMAIN_DISK_MIRROR_STATE_NONE;
--
1.9.3
10 years, 3 months
[libvirt] [PATCH] qemu: reword caps-related error
by Martin Kletzander
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/qemu/qemu_driver.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 8eba8e8..a4a96af 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -3456,7 +3456,9 @@ static int qemuDumpToFd(virQEMUDriverPtr driver, virDomainObjPtr vm,
if (ret <= 0) {
virReportError(VIR_ERR_INVALID_ARG,
- _("unsupported dumpformat '%s'"), dumpformat);
+ _("unsupported dumpformat '%s' "
+ "for this QEMU binary"),
+ dumpformat);
ret = -1;
goto cleanup;
}
--
2.0.4
10 years, 3 months
[libvirt] [PATCH] lxc: Report container init process failures.
by Jarek Dziedzic
This change improves the reporting of container stop reason.
Before this change if the init process of lxc container has crashed
or returned non zero status, the domain state listeners would be notified
that a domain has stopped due to normal shutdown. This maps to
VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN and is exactly the same as the stop
reason reported when the init process ends without errors.
After this patch, when the container init process exits with a non zero
status (or crashes) the reported stop reason will be
VIR_DOMAIN_EVENT_STOPPED_CRASHED.
---
src/lxc/lxc_controller.c | 16 ++++++++++++++--
src/lxc/lxc_monitor_protocol.x | 3 ++-
src/lxc/lxc_process.c | 3 +++
src/lxc_monitor_protocol-structs | 1 +
4 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 2d220eb..e8ff1c4 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -821,7 +821,7 @@ static int lxcControllerClearCapabilities(void)
static bool wantReboot = false;
static virMutex lock = VIR_MUTEX_INITIALIZER;
-
+static int initProcessExitCode = 0;
static void virLXCControllerSignalChildIO(virNetServerPtr server,
siginfo_t *info ATTRIBUTE_UNUSED,
@@ -834,6 +834,11 @@ static void virLXCControllerSignalChildIO(virNetServerPtr server,
ret = waitpid(-1, &status, WNOHANG);
VIR_DEBUG("Got sig child %d vs %lld", ret, (unsigned long long)ctrl->initpid);
if (ret == ctrl->initpid) {
+ VIR_DEBUG("Init process waitpid status 0x%x", status);
+ if (WIFEXITED(status)) {
+ initProcessExitCode = WEXITSTATUS(status);
+ VIR_INFO("Init process exited. Exit code = %d", initProcessExitCode);
+ }
virNetServerQuit(server);
virMutexLock(&lock);
if (WIFSIGNALED(status) &&
@@ -841,6 +846,10 @@ static void virLXCControllerSignalChildIO(virNetServerPtr server,
VIR_DEBUG("Status indicates reboot");
wantReboot = true;
}
+ else if (WIFSIGNALED(status)) {
+ initProcessExitCode = 0x80 + WTERMSIG(status);
+ VIR_INFO("Init process received a signal %d. Exit code = %d", WTERMSIG(status), initProcessExitCode);
+ }
virMutexUnlock(&lock);
}
}
@@ -2080,7 +2089,10 @@ virLXCControllerEventSendExit(virLXCControllerPtr ctrl,
memset(&msg, 0, sizeof(msg));
switch (exitstatus) {
case 0:
- msg.status = VIR_LXC_MONITOR_EXIT_STATUS_SHUTDOWN;
+ if (initProcessExitCode == 0)
+ msg.status = VIR_LXC_MONITOR_EXIT_STATUS_SHUTDOWN;
+ else
+ msg.status = VIR_LXC_MONITOR_EXIT_STATUS_INIT_PROCESS_ERROR;
break;
case 1:
msg.status = VIR_LXC_MONITOR_EXIT_STATUS_REBOOT;
diff --git a/src/lxc/lxc_monitor_protocol.x b/src/lxc/lxc_monitor_protocol.x
index 0926e26..beb2272 100644
--- a/src/lxc/lxc_monitor_protocol.x
+++ b/src/lxc/lxc_monitor_protocol.x
@@ -7,7 +7,8 @@
enum virLXCMonitorExitStatus {
VIR_LXC_MONITOR_EXIT_STATUS_ERROR,
VIR_LXC_MONITOR_EXIT_STATUS_SHUTDOWN,
- VIR_LXC_MONITOR_EXIT_STATUS_REBOOT
+ VIR_LXC_MONITOR_EXIT_STATUS_REBOOT,
+ VIR_LXC_MONITOR_EXIT_STATUS_INIT_PROCESS_ERROR
};
struct virLXCMonitorExitEventMsg {
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index 3353dc1..fb65919 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -553,6 +553,9 @@ static void virLXCProcessMonitorExitNotify(virLXCMonitorPtr mon ATTRIBUTE_UNUSED
case VIR_LXC_MONITOR_EXIT_STATUS_SHUTDOWN:
priv->stopReason = VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN;
break;
+ case VIR_LXC_MONITOR_EXIT_STATUS_INIT_PROCESS_ERROR:
+ priv->stopReason = VIR_DOMAIN_EVENT_STOPPED_CRASHED;
+ break;
case VIR_LXC_MONITOR_EXIT_STATUS_ERROR:
priv->stopReason = VIR_DOMAIN_EVENT_STOPPED_FAILED;
break;
diff --git a/src/lxc_monitor_protocol-structs b/src/lxc_monitor_protocol-structs
index da72ec0..b3877d3 100644
--- a/src/lxc_monitor_protocol-structs
+++ b/src/lxc_monitor_protocol-structs
@@ -3,6 +3,7 @@ enum virLXCMonitorExitStatus {
VIR_LXC_MONITOR_EXIT_STATUS_ERROR = 0,
VIR_LXC_MONITOR_EXIT_STATUS_SHUTDOWN = 1,
VIR_LXC_MONITOR_EXIT_STATUS_REBOOT = 2,
+ VIR_LXC_MONITOR_EXIT_STATUS_INIT_PROCESS_ERROR = 3,
};
struct virLXCMonitorExitEventMsg {
enum virLXCMonitorExitStatus status;
--
1.9.3
10 years, 3 months
[libvirt] help
by Himanshu Sharma
Dear Team,
Greetings!!
I'm testing libvirt with VMware ESXi. I'm able to connect to VMware ESXi with libvirt driver but not able to connect it through "Virtual Machine manager" GUI also not able to run virt-clone command inturn to clone ESXi VM. Can you please guide me how to do so?
-----Original Message-----
From: libvir-list-bounces(a)redhat.com [mailto:libvir-list-bounces@redhat.com] On Behalf Of libvir-list-request(a)redhat.com
Sent: 05 August 2014 14:49
To: Himanshu Sharma
Subject: Welcome to the "libvir-list" mailing list
Welcome to the libvir-list(a)redhat.com mailing list!
To post to this list, send your email to:
libvir-list(a)redhat.com
General information about the mailing list is at:
https://www.redhat.com/mailman/listinfo/libvir-list
If you ever want to unsubscribe or change your options (eg, switch to or from digest mode, change your password, etc.), visit your subscription page at:
https://www.redhat.com/mailman/options/libvir-list/himanshu.sharma%40nect...
You can also make such adjustments via email by sending a message to:
libvir-list-request(a)redhat.com
with the word `help' in the subject or body (don't include the quotes), and you will get back a message with instructions.
You must know your password to change your options (including changing the password, itself) or to unsubscribe. It is:
Normally, Mailman will remind you of your redhat.com mailing list passwords once every month, although you can disable this if you prefer. This reminder will also include instructions on how to unsubscribe or change your account options. There is also a button on your options page that will email your current password to you.
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only.
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. .
-----------------------------------------------------------------------------------------------------------------------
10 years, 3 months
[libvirt] [PATCH] lxc: Report container init process failures.
by Jarek Dziedzic
This change improves the reporting of container stop reason.
Before this change if the init process of lxc container has crashed
or returned non zero status, the domain state listeners would be notified
that a domain has stopped due to normal shutdown. This maps to
VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN and is exactly the same as the stop
reason reported when the init process ends without errors.
After this patch, when the container init process exits with a non zero
status (or crashes) the reported stop reason will be
VIR_DOMAIN_EVENT_STOPPED_CRASHED.
---
src/lxc/lxc_controller.c | 16 ++++++++++++++--
src/lxc/lxc_monitor_protocol.x | 3 ++-
src/lxc/lxc_process.c | 3 +++
src/lxc_monitor_protocol-structs | 1 +
4 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 2d220eb..e8ff1c4 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -821,7 +821,7 @@ static int lxcControllerClearCapabilities(void)
static bool wantReboot = false;
static virMutex lock = VIR_MUTEX_INITIALIZER;
-
+static int initProcessExitCode = 0;
static void virLXCControllerSignalChildIO(virNetServerPtr server,
siginfo_t *info ATTRIBUTE_UNUSED,
@@ -834,6 +834,11 @@ static void virLXCControllerSignalChildIO(virNetServerPtr server,
ret = waitpid(-1, &status, WNOHANG);
VIR_DEBUG("Got sig child %d vs %lld", ret, (unsigned long long)ctrl->initpid);
if (ret == ctrl->initpid) {
+ VIR_DEBUG("Init process waitpid status 0x%x", status);
+ if (WIFEXITED(status)) {
+ initProcessExitCode = WEXITSTATUS(status);
+ VIR_INFO("Init process exited. Exit code = %d", initProcessExitCode);
+ }
virNetServerQuit(server);
virMutexLock(&lock);
if (WIFSIGNALED(status) &&
@@ -841,6 +846,10 @@ static void virLXCControllerSignalChildIO(virNetServerPtr server,
VIR_DEBUG("Status indicates reboot");
wantReboot = true;
}
+ else if (WIFSIGNALED(status)) {
+ initProcessExitCode = 0x80 + WTERMSIG(status);
+ VIR_INFO("Init process received a signal %d. Exit code = %d", WTERMSIG(status), initProcessExitCode);
+ }
virMutexUnlock(&lock);
}
}
@@ -2080,7 +2089,10 @@ virLXCControllerEventSendExit(virLXCControllerPtr ctrl,
memset(&msg, 0, sizeof(msg));
switch (exitstatus) {
case 0:
- msg.status = VIR_LXC_MONITOR_EXIT_STATUS_SHUTDOWN;
+ if (initProcessExitCode == 0)
+ msg.status = VIR_LXC_MONITOR_EXIT_STATUS_SHUTDOWN;
+ else
+ msg.status = VIR_LXC_MONITOR_EXIT_STATUS_INIT_PROCESS_ERROR;
break;
case 1:
msg.status = VIR_LXC_MONITOR_EXIT_STATUS_REBOOT;
diff --git a/src/lxc/lxc_monitor_protocol.x b/src/lxc/lxc_monitor_protocol.x
index 0926e26..beb2272 100644
--- a/src/lxc/lxc_monitor_protocol.x
+++ b/src/lxc/lxc_monitor_protocol.x
@@ -7,7 +7,8 @@
enum virLXCMonitorExitStatus {
VIR_LXC_MONITOR_EXIT_STATUS_ERROR,
VIR_LXC_MONITOR_EXIT_STATUS_SHUTDOWN,
- VIR_LXC_MONITOR_EXIT_STATUS_REBOOT
+ VIR_LXC_MONITOR_EXIT_STATUS_REBOOT,
+ VIR_LXC_MONITOR_EXIT_STATUS_INIT_PROCESS_ERROR
};
struct virLXCMonitorExitEventMsg {
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index 3353dc1..fb65919 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -553,6 +553,9 @@ static void virLXCProcessMonitorExitNotify(virLXCMonitorPtr mon ATTRIBUTE_UNUSED
case VIR_LXC_MONITOR_EXIT_STATUS_SHUTDOWN:
priv->stopReason = VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN;
break;
+ case VIR_LXC_MONITOR_EXIT_STATUS_INIT_PROCESS_ERROR:
+ priv->stopReason = VIR_DOMAIN_EVENT_STOPPED_CRASHED;
+ break;
case VIR_LXC_MONITOR_EXIT_STATUS_ERROR:
priv->stopReason = VIR_DOMAIN_EVENT_STOPPED_FAILED;
break;
diff --git a/src/lxc_monitor_protocol-structs b/src/lxc_monitor_protocol-structs
index da72ec0..b3877d3 100644
--- a/src/lxc_monitor_protocol-structs
+++ b/src/lxc_monitor_protocol-structs
@@ -3,6 +3,7 @@ enum virLXCMonitorExitStatus {
VIR_LXC_MONITOR_EXIT_STATUS_ERROR = 0,
VIR_LXC_MONITOR_EXIT_STATUS_SHUTDOWN = 1,
VIR_LXC_MONITOR_EXIT_STATUS_REBOOT = 2,
+ VIR_LXC_MONITOR_EXIT_STATUS_INIT_PROCESS_ERROR = 3,
};
struct virLXCMonitorExitEventMsg {
enum virLXCMonitorExitStatus status;
--
1.9.3
10 years, 3 months
[libvirt] help
by Himanshu Sharma
Dear Team,
Greetings!!
I'm testing libvirt with VMware ESXi. I'm able to connect to VMware ESXi with libvirt driver but not able to connect it through "Virtual Machine manager" GUI also not able to run virt-clone command inturn to clone ESXi VM. Can you please guide me how to do so?
-----Original Message-----
From: libvir-list-bounces(a)redhat.com [mailto:libvir-list-bounces@redhat.com] On Behalf Of libvir-list-request(a)redhat.com
Sent: 05 August 2014 14:49
To: Himanshu Sharma
Subject: Welcome to the "libvir-list" mailing list
Welcome to the libvir-list(a)redhat.com mailing list!
To post to this list, send your email to:
libvir-list(a)redhat.com
General information about the mailing list is at:
https://www.redhat.com/mailman/listinfo/libvir-list
If you ever want to unsubscribe or change your options (eg, switch to or from digest mode, change your password, etc.), visit your subscription page at:
https://www.redhat.com/mailman/options/libvir-list/himanshu.sharma%40nect...
You can also make such adjustments via email by sending a message to:
libvir-list-request(a)redhat.com
with the word `help' in the subject or body (don't include the quotes), and you will get back a message with instructions.
You must know your password to change your options (including changing the password, itself) or to unsubscribe. It is:
Normally, Mailman will remind you of your redhat.com mailing list passwords once every month, although you can disable this if you prefer. This reminder will also include instructions on how to unsubscribe or change your account options. There is also a button on your options page that will email your current password to you.
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only.
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. .
-----------------------------------------------------------------------------------------------------------------------
10 years, 3 months
Re: [libvirt] Welcome to the "libvir-list" mailing list
by Himanshu Sharma
Dear Team,
Greetings!!
I'm testing libvirt with VMware ESXi. I'm able to connect to VMware ESXi with libvirt driver but not able to connect it through "Virtual Machine manager" GUI also not able to run virt-clone command inturn to clone ESXi VM. Can you please guide me how to do so?
-----Original Message-----
From: libvir-list-bounces(a)redhat.com [mailto:libvir-list-bounces@redhat.com] On Behalf Of libvir-list-request(a)redhat.com
Sent: 05 August 2014 14:49
To: Himanshu Sharma
Subject: Welcome to the "libvir-list" mailing list
Welcome to the libvir-list(a)redhat.com mailing list!
To post to this list, send your email to:
libvir-list(a)redhat.com
General information about the mailing list is at:
https://www.redhat.com/mailman/listinfo/libvir-list
If you ever want to unsubscribe or change your options (eg, switch to or from digest mode, change your password, etc.), visit your subscription page at:
https://www.redhat.com/mailman/options/libvir-list/himanshu.sharma%40nect...
You can also make such adjustments via email by sending a message to:
libvir-list-request(a)redhat.com
with the word `help' in the subject or body (don't include the quotes), and you will get back a message with instructions.
You must know your password to change your options (including changing the password, itself) or to unsubscribe. It is:
Normally, Mailman will remind you of your redhat.com mailing list passwords once every month, although you can disable this if you prefer. This reminder will also include instructions on how to unsubscribe or change your account options. There is also a button on your options page that will email your current password to you.
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and
intended
for the named recipient(s) only.
It shall not attach any liability on the originator or NEC or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of NEC or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. .
-----------------------------------------------------------------------------------------------------------------------
10 years, 3 months
[libvirt] [Discussion] How do we think about time out mechanism?
by James
There's a kind of situation that when libvirtd's under a lot of pressure, just as we
start a lot of VMs at the same time, some libvirt APIs may take a lot of time to return.
And this will block the up level job to be finished. Mostly we can't wait forever, we
want a time out mechnism to help us out. When one API takes more than some time, it can
return time out as a result, and do some rolling back.
So my question is: do we have a plan to give a 'time out' solution or a better solution
to fix this kind of problems in the future? And when?
Thanks all!
--
Best Regards
James
10 years, 3 months
[libvirt] [PATCH] Fix typo error attribute name vlan-id should be vlanid in docs
by Jianwei Hu
[root@localhost ~]# virsh nwfilter-dumpxml myself
<filter name='myself' chain='root'>
<uuid>7192ef51-cd50-4f14-ad7b-fa5c69ea19e3</uuid>
<rule action='accept' direction='in' priority='500'>
<vlan dstmacaddr='00:11:22:33:44:55' vlanid='44'/>
</rule>
</filter>
[root@localhost ~]# ebtables -t nat -L
Bridge table: nat
...
-p 802_1Q -d 0:11:22:33:44:55 --vlan-id 44 -j ACCEPT
---
docs/formatnwfilter.html.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/formatnwfilter.html.in b/docs/formatnwfilter.html.in
index 45b97f7..7169fa9 100644
--- a/docs/formatnwfilter.html.in
+++ b/docs/formatnwfilter.html.in
@@ -765,7 +765,7 @@
<td>Mask applied to MAC address of destination</td>
</tr>
<tr>
- <td>vlan-id</td>
+ <td>vlanid</td>
<td>UINT16 (0x0-0xfff, 0 - 4095)</td>
<td>VLAN ID</td>
</tr>
--
1.8.3.1
10 years, 3 months