[libvirt] libvirt: xen error
by varun bhatnagar
Hi,
I am trying to install xen and provide libvrit support to it but while
installing at some point of time it tries to connect to GIT repository and
creates a clone but I am behind firewall and it is getting timed out.... :(
I am pasting a screenshot below. Can anyone of you please help me out with
this one.
//
Varun
11 years, 9 months
[libvirt] Load Test leads to Libvirt crash
by SHREE DUTH AWASTHI
Hi All,
Can you please help us in solving this issue.
Version used : libvirt-0.10.2
Note: We could reproduce the same crash using the latest libvirt version
1.0.5
Your inputs would be of great help to us.
Please find the backtrace below
(gdb) bt
#0 0x00007f91aac6551b in remoteClientCloseFunc (client=<value optimized
out>, reason=1, opaque=0x1cd0170) at remote/remote_driver.c:340
#1 0x00007f91aac86f32 in virNetClientCloseLocked (client=0x1cd0990) at
rpc/virnetclient.c:688
#2 0x00007f91aac89881 in virNetClientIncomingEvent (sock=0x1cd0b50,
events=9, opaque=0x1cd0990) at rpc/virnetclient.c:1859
#3 0x00007f91aab8fab5 in virEventPollDispatchHandles () at
util/event_poll.c:485
#4 virEventPollRunOnce () at util/event_poll.c:632
#5 0x00007f91aab8e6e5 in virEventRunDefaultImpl () at util/event.c:247
#6 0x000000000040dd72 in ?? ()
#7 0x00007f91aaba1f36 in virThreadHelper (data=<value optimized out>) at
util/threads-pthread.c:161
#8 0x00007f91a8d3b6ea in start_thread () from /lib64/libpthread.so.0
#9 0x00007f91a80fcabd in clone () from /lib64/libc.so.6
(gdb)
Thanking you in anticipation.
Thanks and Regards,
Shree Duth Awasthi.
11 years, 9 months
[libvirt] [PATCH] LXC: Fix some error reporting in filesystem setup
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
A couple of places in LXC setup for filesystems did not do
a "goto cleanup" after reporting errors. While fixing this,
also add in many more debug statements to aid troubleshooting
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/lxc/lxc_container.c | 23 ++++++++++++++++++-----
src/lxc/lxc_controller.c | 6 ++++++
2 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 595c0f2..389c336 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -551,6 +551,8 @@ static int lxcContainerPrepareRoot(virDomainDefPtr def,
char *dst;
char *tmp;
+ VIR_DEBUG("Prepare root %d", root->type);
+
if (root->type == VIR_DOMAIN_FS_TYPE_MOUNT)
return 0;
@@ -1230,7 +1232,8 @@ static int lxcContainerMountFSBlockHelper(virDomainFSDefPtr fs,
goto cleanup;
if (format) {
- VIR_DEBUG("Mount %s with detected format %s", src, format);
+ VIR_DEBUG("Mount '%s' on '%s' with detected format '%s'",
+ src, fs->dst, format);
if (mount(src, fs->dst, format, fsflags, NULL) < 0) {
virReportSystemError(errno,
_("Failed to mount device %s to %s as %s"),
@@ -1339,12 +1342,12 @@ static int lxcContainerMountFS(virDomainFSDefPtr fs,
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unexpected filesystem type %s"),
virDomainFSTypeToString(fs->type));
- break;
+ return -1;
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Cannot mount filesystem type %s"),
virDomainFSTypeToString(fs->type));
- break;
+ return -1;
}
return 0;
}
@@ -1885,18 +1888,26 @@ static int lxcContainerResolveSymlinks(virDomainDefPtr vmDef)
char *newroot;
size_t i;
+ VIR_DEBUG("Resolving filesystem symlinks");
for (i = 0; i < vmDef->nfss; i++) {
+ VIR_DEBUG("Res %zu", i);
virDomainFSDefPtr fs = vmDef->fss[i];
- if (!fs->src)
+ if (!fs->src) {
+ VIR_DEBUG("Skip");
continue;
- if (virFileResolveAllLinks(fs->src, &newroot) < 0)
+ }
+ VIR_DEBUG("Resolving '%s'", fs->src);
+ if (virFileResolveAllLinks(fs->src, &newroot) < 0) {
+ VIR_DEBUG("Failed to resolve symlink at %s", fs->src);
return -1;
+ }
VIR_DEBUG("Resolved '%s' to %s", fs->src, newroot);
VIR_FREE(fs->src);
fs->src = newroot;
}
+ VIR_DEBUG("Resolved all filesystem symlinks");
return 0;
}
@@ -2020,9 +2031,11 @@ static int lxcContainerChild(void *data)
goto cleanup;
}
+ VIR_DEBUG("Resolve t");
if (lxcContainerResolveSymlinks(vmDef) < 0)
goto cleanup;
+ VIR_DEBUG("Setting up pivot");
if (lxcContainerSetupPivotRoot(vmDef, root,
argv->ttyPaths, argv->nttyPaths,
argv->securityDriver) < 0)
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index ef35c05..831dff8 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -450,6 +450,8 @@ static int virLXCControllerSetupLoopDevices(virLXCControllerPtr ctrl)
size_t i;
int ret = -1;
+ VIR_DEBUG("Setting up loop devices for filesystems");
+
for (i = 0; i < ctrl->def->nfss; i++) {
virDomainFSDefPtr fs = ctrl->def->fss[i];
int fd;
@@ -492,9 +494,12 @@ static int virLXCControllerSetupLoopDevices(virLXCControllerPtr ctrl)
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("fs driver %s is not supported"),
virDomainFSDriverTypeTypeToString(fs->fsdriver));
+ goto cleanup;
}
}
+ VIR_DEBUG("Setting up loop devices for disks");
+
for (i = 0; i < ctrl->def->ndisks; i++) {
virDomainDiskDefPtr disk = ctrl->def->disks[i];
int fd;
@@ -548,6 +553,7 @@ static int virLXCControllerSetupLoopDevices(virLXCControllerPtr ctrl)
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("disk driver %s is not supported"),
disk->driverName);
+ goto cleanup;
}
}
--
1.8.3.1
11 years, 9 months
[libvirt] [PATCH] LXC: Set default driver for image backed filesystems
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
If no explicit driver is set for an image backed filesystem,
set it to use the loop driver (if raw) or nbd driver (if
non-raw)
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/lxc/lxc_controller.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 568227f..ef35c05 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -457,6 +457,14 @@ static int virLXCControllerSetupLoopDevices(virLXCControllerPtr ctrl)
if (fs->type != VIR_DOMAIN_FS_TYPE_FILE)
continue;
+ if (fs->fsdriver == VIR_DOMAIN_FS_DRIVER_TYPE_DEFAULT) {
+ if (fs->format == VIR_STORAGE_FILE_RAW ||
+ fs->format == VIR_STORAGE_FILE_NONE)
+ fs->fsdriver = VIR_DOMAIN_FS_DRIVER_TYPE_LOOP;
+ else
+ fs->fsdriver = VIR_DOMAIN_FS_DRIVER_TYPE_NBD;
+ }
+
if (fs->fsdriver == VIR_DOMAIN_FS_DRIVER_TYPE_LOOP) {
if (fs->format != VIR_STORAGE_FILE_RAW &&
fs->format != VIR_STORAGE_FILE_NONE) {
--
1.8.3.1
11 years, 9 months
[libvirt] [Qeustion] NPIV support on guest
by Ren Mingxin
Hi,
It seems this is a old question, but I couldn't get a exact answer
via historical mails: How to assign vhba to guest now? It'll be much
appreciated if exact xml format/qemu commandcan be showed.
And, it seems that persistent vhba hasn't been supported by libvirt,
yes?
Thanks,
Ren
11 years, 9 months
[libvirt] [sandbox][PATCH] Fix nits in virt-sandbox-service when raise ValueError
by Wayne Sun
Put error msg in list when raise ValueError.
This fix is for bug:
[virt-sandbox-service] execute command with unsupported URI error msg is not right
https://bugzilla.redhat.com/show_bug.cgi?id=967705
Signed-off-by: Wayne Sun <gsun(a)redhat.com>
---
bin/virt-sandbox-service | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service
index 4496b29..1db3c09 100755
--- a/bin/virt-sandbox-service
+++ b/bin/virt-sandbox-service
@@ -878,7 +878,7 @@ def sandbox_list(args):
def sandbox_reload(args):
config = read_config(args.name)
if isinstance(config, gi.repository.LibvirtSandbox.ConfigServiceGeneric):
- raise ValueError(_("Generic Containers do not support reload"))
+ raise ValueError([_("Generic Containers do not support reload")])
container = SystemdContainer(uri = args.uri, config = config)
container.reload(args.unitfiles)
@@ -931,7 +931,7 @@ def fullpath(cmd):
def execute(args):
if args.uri != "lxc:///":
- raise ValueError(_("Can only execute commands inside of linux containers."))
+ raise ValueError([_("Can only execute commands inside of linux containers.")])
myexec = [ "virsh", "-c", args.uri, "lxc-enter-namespace" ]
# myexec = [ "virt-sandbox-service-util", "execute" ]
--
1.7.1
11 years, 9 months
[libvirt] [PATCH] lxc: Create /dev/tty within a container
by Richard Weinberger
Many applications use /dev/tty to read from stdin.
E.g. zypper on openSUSE.
Let's create this device node to unbreak those applications.
As /dev/tty is a synonym for the current controlling terminal
it cannot harm the host or any other containers.
Signed-off-by: Richard Weinberger <richard(a)nod.at>
---
src/lxc/lxc_container.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 181f6c8..9ab64a1 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -837,6 +837,7 @@ static int lxcContainerPopulateDevices(char **ttyPaths, size_t nttyPaths)
{ LXC_DEV_MAJ_MEMORY, LXC_DEV_MIN_FULL, 0666, "/dev/full" },
{ LXC_DEV_MAJ_MEMORY, LXC_DEV_MIN_RANDOM, 0666, "/dev/random" },
{ LXC_DEV_MAJ_MEMORY, LXC_DEV_MIN_URANDOM, 0666, "/dev/urandom" },
+ { LXC_DEV_MAJ_TTY, LXC_DEV_MIN_TTY, 0666, "/tty" },
};
const struct {
const char *src;
--
1.8.3
11 years, 9 months
[libvirt] [PATCH] domain controller index check
by jmiao@redhat.com
From: Jincheng Miao <jmiao(a)redhat.com>
The index of the controller should not be less than zero.
So use virStrToLong_ui() to check the controller index in
virDomainControllerDefParseXML().
---
src/conf/domain_conf.c | 2 +-
src/conf/domain_conf.h | 2 +-
src/qemu/qemu_command.c | 2 +-
src/vmx/vmx.c | 3 +--
4 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 402e6e9..2831edf 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -5593,7 +5593,7 @@ virDomainControllerDefParseXML(xmlNodePtr node,
idx = virXMLPropString(node, "index");
if (idx) {
- if (virStrToLong_i(idx, NULL, 10, &def->idx) < 0) {
+ if (virStrToLong_ui(idx, NULL, 10, &def->idx) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Cannot parse controller index %s"), idx);
goto error;
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index da83eb6..7897b4b 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -790,7 +790,7 @@ struct _virDomainVirtioSerialOpts {
/* Stores the virtual disk controller configuration */
struct _virDomainControllerDef {
int type;
- int idx;
+ unsigned int idx;
int model; /* -1 == undef */
unsigned int queues;
union {
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 46db28a..7fd1cbf 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1585,7 +1585,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
for (i = 0; i < def->ncontrollers; i++) {
if (def->controllers[i]->type == VIR_DOMAIN_CONTROLLER_TYPE_PCI) {
- if (def->controllers[i]->idx > max_idx)
+ if ((int)def->controllers[i]->idx > max_idx)
max_idx = def->controllers[i]->idx;
}
}
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 5464d13..deddfaa 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -1664,8 +1664,7 @@ virVMXParseConfig(virVMXContext *ctx,
for (controller = 0; controller < def->ncontrollers; ++controller) {
if (def->controllers[controller]->type == VIR_DOMAIN_CONTROLLER_TYPE_SCSI) {
- if (def->controllers[controller]->idx < 0 ||
- def->controllers[controller]->idx > 3) {
+ if (def->controllers[controller]->idx > 3) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("SCSI controller index %d out of [0..3] range"),
def->controllers[controller]->idx);
--
1.7.1
11 years, 9 months
[libvirt] [PATCH] scsi: Fix construction of sysfs device path
by Viktor Mihajlovski
The device bus value was used instead of the device target when
building the sysfs device path. Trivial.
Signed-off-by: Viktor Mihajlovski <mihajlov(a)linux.vnet.ibm.com>
---
Should probably go into the 1.0.6 maintenance branch as well.
src/util/virscsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virscsi.c b/src/util/virscsi.c
index 4870307..726121b 100644
--- a/src/util/virscsi.c
+++ b/src/util/virscsi.c
@@ -218,7 +218,7 @@ virSCSIDeviceNew(const char *adapter,
goto cleanup;
if (virAsprintf(&dev->name, "%d:%d:%d:%d", dev->adapter,
- dev->bus, dev->bus, dev->unit) < 0 ||
+ dev->bus, dev->target, dev->unit) < 0 ||
virAsprintf(&dev->sg_path, "/dev/%s", sg) < 0) {
virReportOOMError();
goto cleanup;
--
1.7.9.5
11 years, 9 months
[libvirt] [ANNOUNCE] libvirt-glib 0.1.7 release
by Daniel P. Berrange
I am pleased to announce that a new release of the libvirt-glib package,
version 0.1.7, is now available from
ftp://libvirt.org/libvirt/glib/
The packages are GPG signed with
Key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF (4096R)
Changes in this release:
- Fix memory leaks in domain memory setters
- Add APIs for configuration sdl/rdp/desktop graphics modes
- Add getter APIs for domain channel devices
- Add getter APIs for storage pools
- Add API for getting/setting virt type
- Add getter APIs for storage pool schema
- Add base framework for i18n of error messages
- Fix annotation of gvir_init_object
- Add getter/setter APIs for disk driver format
- Add APIs for domain snapshot schema
- Add APIs to access domain chardev source
- Add API to access domain device aliases
libvirt-glib comprises three distinct libraries:
- libvirt-glib - Integrate with the GLib event loop and error handling
- libvirt-gconfig - Representation of libvirt XML documents as GObjects
- libvirt-gobject - Mapping of libvirt APIs into the GObject type system
NB: While libvirt aims to be API/ABI stable forever, with libvirt-glib
we are not yet guaranteeing that libvirt-glib libraries are API/ABI
permanently stable. As of the 0.0.8 release, we have tentatively frozen
the API/ABI with the intent of being longterm stable hereafter, but
there is still a small chance we might find flaws requiring an API/ABI
change. The likelihood of this is low, however, and we will strive to
avoid it.
Follow up comments about libvirt-glib should be directed to the regular
libvir-list(a)redhat.com development list.
Thanks to all the people involved in contributing to this release.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
11 years, 9 months