[libvirt] not able install libvirt
by Eric Blake
[moderator note: re-posting to list with screenshot deleted, in order to
meet list policy size constraints]
hello,
i am am trying to install libvmi tool on my xen hypervisor but some where
is asking to install libvirt packages.
i am following your code and your instruction but its showing some error
here is screenshot.
how i can resolve it ??
7 years, 6 months
[libvirt] [PATCH 0/2] fix labeling for chardev source path
by Pavel Hrdina
Pavel Hrdina (2):
conf: don't iterate over backcompat console in virDomainChrDefForeach
qemu: don't relabel chardev source file if virtlogd is used
src/conf/domain_conf.c | 46 ++++++++++++++++++++++++++++++++++++-----
src/conf/domain_conf.h | 1 +
src/qemu/qemu_command.c | 12 +++++++----
src/security/security_dac.c | 6 ++++++
src/security/security_selinux.c | 16 ++++++--------
5 files changed, 62 insertions(+), 19 deletions(-)
--
2.13.0
7 years, 6 months
[libvirt] [RFC PATCH 0/2] Bandaid to "fix" bulk stats API on big hosts
by Peter Krempa
Make the API fail less often by bumping the RPC message size and telling users
not to request stats for too many VMs until we figure out a better solution to
get a lot of stats.
Peter Krempa (2):
rpc: Bump maximum message size to 32M
lib: Add note that bulk stats API queries may overrun RPC buffers
src/libvirt-domain.c | 7 +++++++
src/rpc/virnetprotocol.x | 4 ++--
2 files changed, 9 insertions(+), 2 deletions(-)
--
2.12.2
7 years, 6 months
[libvirt] [PATCH 1/1] vz: fix raise in vzDomainBlock
by Konstantin Neumoin
Need begin job before lookup disk in config,
because it can be edited at this moment.
Signed-off-by: Konstantin Neumoin <kneumoin(a)virtuozzo.com>
---
src/vz/vz_driver.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index 8f94326..954ca6a 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -4000,12 +4000,6 @@ vzDomainBlockResize(virDomainPtr domain,
size /= 1024;
size /= 1024;
- if (!(disk = virDomainDiskByName(dom->def, path, false))) {
- virReportError(VIR_ERR_INVALID_ARG,
- _("invalid path: %s"), path);
- goto cleanup;
- }
-
if (vzDomainObjBeginJob(dom) < 0)
goto cleanup;
job = true;
@@ -4019,6 +4013,12 @@ vzDomainBlockResize(virDomainPtr domain,
goto cleanup;
}
+ if (!(disk = virDomainDiskByName(dom->def, path, false))) {
+ virReportError(VIR_ERR_INVALID_ARG,
+ _("invalid path: %s"), path);
+ goto cleanup;
+ }
+
ret = prlsdkResizeImage(dom, disk, size);
cleanup:
--
2.7.4
7 years, 6 months
[libvirt] [PATCH 1/1] vz: unlock dom until resize operation
by Konstantin Neumoin
We have to use waitDomainJob instead of waitJob, because of it
unlock the domain until job has finished, so domain will be available
for other clients.
Signed-off-by: Konstantin Neumoin <kneumoin(a)virtuozzo.com>
---
src/vz/vz_sdk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index bc1a9eb..79b356d 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -4993,7 +4993,7 @@ int prlsdkResizeImage(virDomainObjPtr dom, virDomainDiskDefPtr disk,
job = PrlVmDev_ResizeImage(prldisk, newsize,
PRIF_RESIZE_LAST_PARTITION);
- if (PRL_FAILED(waitJob(job)))
+ if (PRL_FAILED(waitDomainJob(job, dom)))
goto cleanup;
ret = 0;
--
2.7.4
7 years, 6 months
[libvirt] [libvirt-perl][PATCH 0/7] Implement sparse streams
by Michal Privoznik
*** BLURB HERE ***
Michal Privoznik (7):
Fix send_all() callback helper
Introduce flags to Stream::recv()
Introduce Stream::recvHole() and Stream::sendHole()
Introduce Stream::sparse_recv_all()
Introduce Stream::sparse_send_all()
Register VOL_DOWNLOAD_SPARSE_STREAM & VOL_UPLOAD_SPARSE_STREAM
constants
examples: Introduce vol-sparse.pl
Changes | 9 ++
Virt.xs | 241 ++++++++++++++++++++++++++++++++++++++++++++-
examples/vol-sparse.pl | 142 ++++++++++++++++++++++++++
lib/Sys/Virt/StorageVol.pm | 30 +++++-
lib/Sys/Virt/Stream.pm | 70 ++++++++++++-
t/030-api-coverage.t | 3 +
6 files changed, 483 insertions(+), 12 deletions(-)
create mode 100755 examples/vol-sparse.pl
--
2.13.0
7 years, 6 months
[libvirt] [PATCH V2] libxl: add default controllers for USB devices
by Jim Fehlig
Attempting to start a domain with USB hostdevs but no USB controllers
fails with the rather cryptic error
libxl: error: libxl_qmp.c:287:qmp_handle_error_response: received an
error message from QMP server: Bus 'xenusb-0.0' not found
This can be fixed by creating default USB controllers. When no USB
controllers are defined, create the number of 8 port controllers
necessary to accommodate the number of defined USB devices.
Note that USB controllers are already created as needed in the
domainAttachDevice code path. E.g. a USB controller will be created,
if necessary, when attaching a USB device with
'virsh attach-device dom usbdev.xml'.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
V1 here
https://www.redhat.com/archives/libvir-list/2017-April/msg00965.html
While further testing of V1 found a libvirtd segfault due to
incorrectly using virDomainControllerInsertPreAlloced instead of
virDomainControllerInsert.
src/libxl/libxl_conf.c | 82 +++++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 71 insertions(+), 11 deletions(-)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 56bc09719..cdf6ec9f3 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -1822,34 +1822,94 @@ libxlMakeUSBController(virDomainControllerDefPtr controller,
}
static int
+libxlMakeDefaultUSBControllers(virDomainDefPtr def,
+ libxl_domain_config *d_config)
+{
+ virDomainControllerDefPtr l_controller = NULL;
+ libxl_device_usbctrl *x_controllers = NULL;
+ size_t nusbdevs = 0;
+ size_t ncontrollers;
+ size_t i;
+
+ for (i = 0; i < def->nhostdevs; i++) {
+ if (def->hostdevs[i]->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
+ def->hostdevs[i]->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB)
+ nusbdevs++;
+ }
+
+ /* No controllers needed if there are no USB devs */
+ if (nusbdevs == 0)
+ return 0;
+
+ /* Create USB controllers with 8 ports */
+ ncontrollers = VIR_DIV_UP(nusbdevs, 8);
+ if (VIR_ALLOC_N(x_controllers, ncontrollers) < 0)
+ return -1;
+
+ for (i = 0; i < ncontrollers; i++) {
+ if (!(l_controller = virDomainControllerDefNew(VIR_DOMAIN_CONTROLLER_TYPE_USB)))
+ goto error;
+
+ l_controller->model = VIR_DOMAIN_CONTROLLER_MODEL_USB_QUSB2;
+ l_controller->idx = i;
+ l_controller->opts.usbopts.ports = 8;
+
+ libxl_device_usbctrl_init(&x_controllers[i]);
+
+ if (libxlMakeUSBController(l_controller, &x_controllers[i]) < 0)
+ goto error;
+
+ if (virDomainControllerInsert(def, l_controller) < 0)
+ goto error;
+
+ l_controller = NULL;
+ }
+
+ d_config->usbctrls = x_controllers;
+ d_config->num_usbctrls = ncontrollers;
+ return 0;
+
+ error:
+ virDomainControllerDefFree(l_controller);
+ for (i = 0; i < ncontrollers; i++)
+ libxl_device_usbctrl_dispose(&x_controllers[i]);
+ VIR_FREE(x_controllers);
+ return -1;
+}
+
+static int
libxlMakeUSBControllerList(virDomainDefPtr def, libxl_domain_config *d_config)
{
virDomainControllerDefPtr *l_controllers = def->controllers;
size_t ncontrollers = def->ncontrollers;
size_t nusbctrls = 0;
libxl_device_usbctrl *x_usbctrls;
- size_t i;
-
- if (ncontrollers == 0)
- return 0;
-
- if (VIR_ALLOC_N(x_usbctrls, ncontrollers) < 0)
- return -1;
+ size_t i, j;
for (i = 0; i < ncontrollers; i++) {
+ if (l_controllers[i]->type == VIR_DOMAIN_CONTROLLER_TYPE_USB)
+ nusbctrls++;
+ }
+
+ if (nusbctrls == 0)
+ return libxlMakeDefaultUSBControllers(def, d_config);
+
+ if (VIR_ALLOC_N(x_usbctrls, nusbctrls) < 0)
+ return -1;
+
+ for (i = 0, j = 0; i < ncontrollers && j < nusbctrls; i++) {
if (l_controllers[i]->type != VIR_DOMAIN_CONTROLLER_TYPE_USB)
continue;
- libxl_device_usbctrl_init(&x_usbctrls[nusbctrls]);
+ libxl_device_usbctrl_init(&x_usbctrls[j]);
if (libxlMakeUSBController(l_controllers[i],
- &x_usbctrls[nusbctrls]) < 0)
+ &x_usbctrls[j]) < 0)
goto error;
- nusbctrls++;
+ j++;
}
- VIR_SHRINK_N(x_usbctrls, ncontrollers, ncontrollers - nusbctrls);
d_config->usbctrls = x_usbctrls;
d_config->num_usbctrls = nusbctrls;
--
2.11.0
7 years, 6 months
[libvirt] [PATCH] qemu: Properly check return value of VIR_STRDUP in qemuDomainGetBlockIoTune
by Peter Krempa
Setting the 'group_name' for a disk would falsely trigger a error path
as in commit 4b57f76502 we did not properly check the return value of
VIR_STRDUP.
---
I must have forgotten to commit this change, as I'm sure I've tested it prior
to sending the patch mentioned above.
src/qemu/qemu_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 6c79d4fe3..cd513ff9f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -17748,7 +17748,7 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
/* Group name needs to be copied since qemuMonitorGetBlockIoThrottle
* allocates it as well */
- if (VIR_STRDUP(reply.group_name, disk->blkdeviotune.group_name))
+ if (VIR_STRDUP(reply.group_name, disk->blkdeviotune.group_name) < 0)
goto endjob;
}
--
2.12.2
7 years, 6 months
[libvirt] [libvirt-python][PATCH v2 0/4] Implement sparse streams
by Michal Privoznik
diff to v1:
- Martin's review worked in.
Patches 1-3 were ACKed already. Well, conditionally. Patch 4/4 wasn't. I'm
sending them again to make sure I've worked in the review as expected.
Michal Privoznik (4):
Implement virStreamSendHole/virStreamRecvHole
virStream: Introduce virStreamRecvFlags
virStream: Introduce virStreamSparse{Recv,Send}All
examples: Introduce sparsestream.py
examples/sparsestream.py | 117 +++++++++++++++++++++++++++++++++
generator.py | 5 ++
libvirt-override-virStream.py | 146 ++++++++++++++++++++++++++++++++++++++++++
libvirt-override.c | 102 +++++++++++++++++++++++++++++
sanitytest.py | 6 +-
5 files changed, 374 insertions(+), 2 deletions(-)
create mode 100755 examples/sparsestream.py
--
2.13.0
7 years, 6 months