[libvirt] [PATCH 2/5]: Cleanup carriage returns in util.c
by Chris Lalancette
In src/util.c, virLog is just a wrapper around fprintf(stderr). Make sure to
put line breaks at the end of lines that use virLog() (noticed during testing).
Changes since last time:
None
Signed-off-by: Chris Lalancette <clalance(a)redhat.com>
16 years, 5 months
[libvirt] [PATCH 1/5]: Return exitstatus from virStorageBackendRunProgRegex
by Chris Lalancette
This patch changes things around so that virStorageBackendRunProgRegex() does
*not* virStorageReportError() if the fork()/exec() process it spawned returned a
!= 0 exit code. Rather, it returns the exitcode in this case, and it is up to
the higher level to determine whether this is a fatal error or not. The use
case for this change is in the iSCSI stuff; older versions of iscsiadm tools
would return a failure when getting the session number, despite the command
succeeding.
Changes since last time:
1) Fix up whitespace damage
Signed-off-by: Chris Lalancette <clalance(a)redhat.com>
16 years, 5 months
[libvirt] [PATCH 0/5]: Rework iSCSI lun handling
by Chris Lalancette
These patches are now better tested, so I'm sending them for review again. To
recap, these patches:
1) Do minor cleanup of the existing code
2) Fix a bug where we aren't properly finding the LUNs on pre 2.6.24 kernels
3) Fix a bug seen in oVirt where we race between libvirtd scanning the sysfs
path and udev actually making the sysfs path in the first place
4) Further lessen our dependence on direct calls to iscsiadm, in case they
change the output in the future.
Changes since last time include:
1) Fixing the 0th LUN problem as pointed out by Stefan de Konink. We now use a
sysfs file to determine whether this is a valid LUN for us to have.
2) Fix all my whitespace damage
3) Small cleanups based on feedback from the list.
Also, I'm putting a build through koji, available here:
http://koji.fedoraproject.org/koji/taskinfo?taskID=663583
Chris Lalancette
16 years, 5 months
[libvirt] [PATCH] Pass syntax check for block devices to XenD.
by Hiroyuki Kaguchi
Hi,
libvirt doesn't pass disk information that the device type isn't specified to
XenD and doesn't show the error message either.
However, the error message should be displayed, and XenD should show it.
On this account, I change libvirt that libvirt passes the disk information that
the device type isn't specified to XenD and XenD shows error message.
The related patch:
After Xen Cset17617, XenD check the syntax of the device type of the disk
information.
Thanks,
Signed-off-by: Hiroyuki Kaguchi <fj7025cf(a)aa.jp.fujitsu.com>
Index: src/xm_internal.c
===================================================================
RCS file: /data/cvs/libvirt/src/xm_internal.c,v
retrieving revision 1.79
diff -u -p -r1.79 xm_internal.c
--- src/xm_internal.c 29 May 2008 19:20:23 -0000 1.79
+++ src/xm_internal.c 3 Jun 2008 07:48:02 -0000
@@ -767,12 +767,10 @@ char *xenXMDomainFormatXML(virConnectPtr
if (!src[0]) {
strcpy(drvName, "phy");
tmp = &src[0];
- } else if (!(tmp = strchr(src, ':')) || !tmp[0]) {
- goto skipdisk;
- } else {
- strncpy(drvName, src, (tmp-src));
- drvName[tmp-src] = '\0';
- }
+ } else if (tmp = strchr(src, ':')) {
+ strncpy(drvName, src, (tmp-src));
+ drvName[tmp-src] = '\0';
+ }
/* And the source driver sub-type */
if (STRPREFIX(drvName, "tap")) {
@@ -782,7 +780,7 @@ char *xenXMDomainFormatXML(virConnectPtr
memmove(src, src+(tmp1-src)+1, strlen(src)-(tmp1-src));
} else {
drvType[0] = '\0';
- if (src[0])
+ if (src[0] && tmp)
memmove(src, src+(tmp-src)+1, strlen(src)-(tmp-src));
}
16 years, 5 months
[libvirt] cannot compile libvirt on Suse 10
by Dmitri Fedorov
Hi guys,
I cannot compile libvirt on Suse 10 SP1, xen_unified.c gives error in
the xen/xen.h include, lines 579-582, where
DEFINE_XEN_GUEST_HANDLE(uint8_t) etc.are.
The error says "expected '=', ',', ';', 'asm' or '__attribite'.
Any idea what that is or any hint what I am missing please?
Thanks a lot in advance.
Dmitri
16 years, 5 months
[libvirt] libvirt+avahi domain publication daemon / webhandler
by Stefan de Konink
Hi,
As notified before I am working on a daemon that publishes domains and
looking in the close future state changes. I have implemented this
daemon so my webserver handler is able to figure out where to connect to
in the network upon a request. In my opinion this functionality should
be in libvirtd, but people highly differ on this opinion. Currently it
is an external program that polls with an interval of 10 seconds.
This webserver has access to all certificates to connect to the remote
boxes. And authentication can be based on HTTP_auth, thus also implement
specific vm/functions to be accessed.
Basically:
GET /libvirt/user/vm/virDomainGetID
Will look up user_vm using avahi, if not found, result in a 404. If the
domain is found the result is returned in the body.
POST /libvirt/user/vm/virDomainAttachDevice
<disk type='file'>
<driver name="tap" type="aio">
<source file='/var/lib/xen/images/fv0'/>
<target dev='hda' bus='ide'/>
</disk>
Will look up user_vm using avahi, if not found, result in a 404. If the
domain is found the command is executed using the post body. And the
result value is put in the return body.
If anyone is interested in working on this or has comments shoot :)
Stefan
16 years, 5 months
[libvirt] FYI: Major driver re-factoring imminent...
by Daniel P. Berrange
This is a quick FYI to say that I've started working on the plan to provide
a single unified XML parser and generator for all hypervisor drivers, in
addition to the virtual network drivers. This is going to cause major
churn in the XML routines for xm_internal.c, xml.c, xend_internal.c, test.c,
qemu_conf.c and a major fixup to the entire of the qemu_driver.c, and then
later in the XML routines for the openvz_conf.c and lxc_conf.c drivers.
So if you have any plans to do non-trivial work in the area of XML parsers
please send a message to the list before hand so we can co-ordinate. Minor
additions / bugfixes are fine to send - I can merge them easily.
I currently have the QEMU and test drivers ported and test suite passing,
and now working on the Xen drivers. Once the Xen driver is working I'll
post the patches for review.
Regards,
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
16 years, 5 months
[libvirt] Fix qemudParseVMDeviceDef() to check for proper network device tag name
by Kaitlin Rupert
Is it too late to get this change in?
Instead of "net", the tag name should be "interface". Previously,
attempting to attach a network device to a KVM guest would return:
libvir: QEMU error : XML description for unknown device type is not well
formed or invalid
error: Failed to attach device from attach-disk.xml
With this fix, it returns:
libvir: QEMU error test_domain: this function is not supported by the
hypervisor: only CDROM disk devices can be attached
libvir: QEMU error : this function is not supported by the hypervisor:
only CDROM disk devices can be attached
error: Failed to attach device from attach-disk.xml
Index: src/qemu_conf.c
===================================================================
RCS file: /data/cvs/libvirt/src/qemu_conf.c,v
retrieving revision 1.77
diff -u -p -r1.77 qemu_conf.c
--- src/qemu_conf.c 12 Jun 2008 10:19:24 -0000 1.77
+++ src/qemu_conf.c 12 Jun 2008 16:17:59 -0000
@@ -2964,7 +2964,7 @@ qemudParseVMDeviceDef(virConnectPtr conn
if (xmlStrEqual(node->name, BAD_CAST "disk")) {
dev->type = QEMUD_DEVICE_DISK;
qemudParseDiskXML(conn, &(dev->data.disk), node);
- } else if (xmlStrEqual(node->name, BAD_CAST "net")) {
+ } else if (xmlStrEqual(node->name, BAD_CAST "interface")) {
dev->type = QEMUD_DEVICE_NET;
qemudParseInterfaceXML(conn, &(dev->data.net), node);
} else if (xmlStrEqual(node->name, BAD_CAST "input")) {
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com
16 years, 6 months
[libvirt] Release of libvirt-0.4.3
by Daniel Veillard
Two months since the last release and a lot of changes had accumulated
in the meantime. So it was really time for a release, 0.4.3 is available
at ftp://libvirt.org/pub/libvirt
It containns a some new features, bug fixes and improvements, but the
largest part is actually code cleanups:
* New features:
- Linux Container start and stop (Dave Leskovec)
- Network interface model settings (Daniel Berrange)
- serial and parallel device support for QEmu and Xen (Daniel Berrange)
- Sound support for QEmu and Xen (Cole Robinson)
- vCPU settings for QEmu (Cole Robinson)
- support for NUMA and vCPU pinning in QEmu (Daniel Berrange)
- new virDomainBlockPeek API (Richard Jones)
* Documentation:
- coding guidelines (Jim Meyering and Richard Jones)
- small man page missing entries and cleanup
- Web site revamp (Daniel Berrange)
- typo fixes (Atsushi SAKAI)
- more docs on network XML format (Daniel Berrange)
- libvirt Wiki (Daniel Berrange)
- policykit config docs (Cole Robinson)
- XML domain docs revamp (Daniel Berrange)
- docs for remote listen-tls/tcp fixes (Kenneth Nagin)
* Bug fixes:
- save change to config file for Xen (Ryan Scott)
- fix /var/run/libvirt/ group ownership (Anton Protopopov)
- ancient libparted workaround (Soren Hansen)
- out of bount array access (Daniel Berrange)
- remote check bug (Dave Leskovec)
- LXC signal and daemon restart problems (Dave Leskovec)
- bus selection logic fix in the daemon config (Daniel Berrange)
- 2 memory leaks in the daemon (Jim Meyering)
- daemon pid file logic bug fix (Daniel Berrange)
- python generator fixes (Daniel Berrange)
- ivarious leaks and memory problem pointed by valgrind (Daniel Berrange)
- iptables forwarding cleanup (Daniel Berrange)
- Xen cpuset value checking (Hiroyuki Kaguchi)
- container process checks for LXC (Dave Leskovec)
- let xend check block device syntax (Hiroyuki Kaguchi)
- UUIDString for python fixes (Cole Robinson)
* Improvements:
- fixes for MinGW compilation (Richard Jones)
- autostart for running Xen domains (Cole Robinson)
- control of listening IP for daemon (Stefan de Konink)
- various Xenner related fixes and improvements (Daniel Berrange)
- autostart status printed in virsh domainfo (Shigeki Sakamoto)
- better error messages for xend driver (Richard Jones)
* Code cleanups:
- OpenVZ compilation (Richard Jones)
- conn dom and net fields deprecation in error structures (Richard Jones)
- Xen-ism on UUID (Richard Jones)
- add missing .pod to dist (Richard Jones)
- tab cleanup from sources (Jim Meyering)
- remove unused field in virsh control structure (Richard Jones)
- compilation without pthread.h (Jim Meyering)
- cleanup of tests (Daniel Berrange)
- syntax-check improvements (Jim Meyering)
- python cleanup
- remove dependancy on libc is_* character tests (Jim Meyering)
- format related cleanups (Jim Meyering)
- cleanup of the buffer internal APIs (Daniel Berrange)
- conversion to the new memory allocation API (Daniel Berrange)
- lcov coverage testing (Daniel Berrange)
- gnulib updates (Jim Meyering)
- compatibility fix with RHEL 5 (Daniel Berrange)
- SuSE compatibility fix (Jim Fehlig)
- const'ification of a number of structures (Jim Meyering)
- string comparison macro cleanups (Daniel Berrange)
- character range testing cleanups and assorted bug fixes (Jim Meyering)
- QEmu test fixes (Daniel Berrange)
- configure macro cleanup (Daniel Berrange)
- refactor QEmu command line building code (Daniel Berrange)
- type punning warning in remote code (Richard Jones)
- refactoring of internal headers (Richard Jones)
- generic out of memory testing and associated bug fixes (Daniel Berrange)
- don't raise internal error for unsupported features (Kaitlin Rupert)
- missing driver entry points (Daniel Berrange)
thanks to everybody who contributed, with ideas or patches,
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard(a)redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
16 years, 6 months