Re: [Libvir] Debian package structure
by Marco Sinhoreli
On 5/30/07, Richard W.M. Jones <rjones(a)redhat.com> wrote:
>
> Marco Sinhoreli wrote:
> > hello all,
> >
> > I have been worked in libvirt, virt-manager and virtinst packages to
> > Debian for a weeks. Packages are now stabilized. Following below the
> > /debian directories structure for analise.
> > * libvirt:
> > svn co http://svn.mussicorp.net/projetos/src/xen/libvirt/trunk/
>
> In debian/rules you shouldn't need this any longer (with latest CVS):
>
> export CFLAGS += -fno-stack-protector
I know it is fixed for libvirt, but it is nedded to fix virt-manager too.
That's why I keep it in this package.
> * Virt-manager:
> > svn co
> >
> http://svn.mussicorp.net/projetos/src/xen/virt-manager/virt-manager/trunk/
>
> Shouldn't virt-manager Depends: on python-libvirt and virtinst?
My fault. I'll fix it.
It should probably Build-Depends: on (eg) cdbs too, since firstly you're
> using cdbs in debian/rules, and secondly virt-manager isn't pure Python
> - it contains a C-based widget.
okay. I'll pay attention on that.
Not clear what the postrm was for. Is there configuration kept in
> /usr/share/virt-manager?
My fault. I'll checked it.
Thanks
17 years, 5 months
[Libvir] Hang with virt-install graphic=no on FC 6 6.93/F7 RC2
by libvirtuser
I had this problem and another user confirmed the same behavior on his machine:
http://pastie.caboo.se/65417
Haven't tried it with *2925.10* yet. Also, is there a way to get more verbose
info about what calls are causing the "configuration file syntax error" errors?
Thanks.
virt-install
How large would you like the disk () to be (in gigabytes)? 4
ERROR: Must provide a file, not a directory for the disk
What would you like to use as the disk (path)? /xen/images/x6.img
Would you like to enable graphics support? (yes or no) no
What is the install location?
http://mirror.anl.gov/pub/fedora-linux-core/test/6.93/Fedora/i386/os/
Starting install...
libvir: Xen Daemon error : GET operation failed:
libvir: error : configuration file syntax error: expecting a name
libvir: error : configuration file syntax error: expecting a name
libvir: error : configuration file syntax error: expecting a name
Retrieving Fedora... 276 kB 00:01
Retrieving vmlinuz... 100% |=========================| 2.1 MB 00:16
Retrieving initrd.img... 100% |=========================| 5.4 MB 00:28
libvir: Xen Daemon error : GET operation failed:
libvir: error : configuration file syntax error: expecting a name
libvir: error : configuration file syntax error: expecting a name
libvir: error : configuration file syntax error: expecting a name
Creating domain... 0 B 00:06
Linux version 2.6.20-2925.5.fc7xen (brewbuilder(a)ls20-bc1-14.build.redhat.com)
(gcc version 4.1.2 20070317 (Red Hat 4.1.2-5)) #1 SMP Thu Mar 22 13:51:38 EDT 2007
BIOS-provided physical RAM map:
sanitize start
sanitize bail 0
copy_e820_map() start: 0000000000000000 size: 0000000020800000 end:
0000000020800000 type: 1
Xen: 0000000000000000 - 0000000020800000 (usable)
0MB HIGHMEM available.
520MB LOWMEM available.
Using x86 segment limits to approximate NX protection
Zone PFN ranges:
DMA 0 -> 133120
Normal 133120 -> 133120
HighMem 133120 -> 133120
early_node_map[1] active PFN ranges
0: 0 -> 133120
ACPI in unprivileged domain disabled
Built 1 zonelists. Total pages: 132080
Kernel command line:
method=http://mirror.anl.gov/pub/fedora-linux-core/test/6.93/Fedora/i386/os/
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
CPU 0 irqstacks, hard=c135f000 soft=c133f000
PID hash table entries: 4096 (order: 12, 16384 bytes)
Xen reported: 1694.994 MHz processor.
Console: colour dummy device 80x25
Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
... MAX_LOCKDEP_SUBCLASSES: 8
... MAX_LOCK_DEPTH: 30
... MAX_LOCKDEP_KEYS: 2048
... CLASSHASH_SIZE: 1024
... MAX_LOCKDEP_ENTRIES: 8192
... MAX_LOCKDEP_CHAINS: 16384
... CHAINHASH_SIZE: 8192
memory used by lock dependency info: 1064 kB
per task-struct memory footprint: 1200 bytes
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Software IO TLB disabled
vmalloc area: e1000000-f4ffe000, maxmem 2d7fe000
Memory: 503936k/532480k available (2030k kernel code, 19948k reserved, 1079k
data, 180k init, 0k highmem)
virtual kernel memory layout:
fixmap : 0xf5315000 - 0xf57fe000 (5028 kB)
pkmap : 0xf5000000 - 0xf5200000 (2048 kB)
vmalloc : 0xe1000000 - 0xf4ffe000 ( 319 MB)
lowmem : 0xc0000000 - 0xe0800000 ( 520 MB)
.init : 0xc130e000 - 0xc133b000 ( 180 kB)
.data : 0xc11fb9d9 - 0xc1309714 (1079 kB)
.text : 0xc1000000 - 0xc11fb9d9 (2030 kB)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay using timer specific routine.. 4262.67 BogoMIPS (lpj=8525343)
Security Framework v1.0.0 initialized
SELinux: Initializing.
SELinux: Starting in permissive mode
selinux_register_security: Registering secondary module capability
Capability LSM initialized as secondary
Mount-cache hash table entries: 512
CPU: Trace cache: 12K uops, L1 D cache: 8K
CPU: L2 cache: 256K
Checking 'hlt' instruction... OK.
SMP alternatives: switching to UP code
Freeing SMP alternatives: 11k freed
Brought up 1 CPUs
Grant table initialized
NET: Registered protocol family 16
Brought up 1 CPUs
PCI: Fatal: No config space access function found
PCI: setting up Xen PCI frontend stub
Setting up standard PCI resources
ACPI: Interpreter disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI: disabled
xen_mem: Initialising balloon driver.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PCI: System does not support PCI
PCI: System does not support PCI
NetLabel: Initializing
NetLabel: domain hash size = 128
NetLabel: protocols = UNLABELED CIPSOv4
NetLabel: unlabeled traffic allowed by default
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 10, 4194304 bytes)
TCP bind hash table entries: 65536 (order: 9, 2097152 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
checking if image is initramfs... it is
Freeing initrd memory: 7256k freed
IA-32 Microcode Update Driver: v1.14-xen <tigran(a)veritas.com>
audit: initializing netlink socket (disabled)
audit(1180379657.981:1): initialized
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
SELinux: Registering netfilter hooks
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
BUG: at kernel/fork.c:994 copy_process()
[<c1005d9a>] show_trace_log_lvl+0x1a/0x2f
[<c1006343>] show_trace+0x12/0x14
[<c10063be>] dump_stack+0x16/0x18
[<c101d044>] copy_process+0x195/0x1245
[<c101e144>] do_fork+0x50/0x117
[<c1003351>] kernel_thread+0x8e/0x96
[<c102c701>] __call_usermodehelper+0x2d/0x46
[<c102cd4f>] run_workqueue+0x89/0x145
[<c102d711>] worker_thread+0xd5/0x102
[<c102ff27>] kthread+0xb3/0xdc
[<c10058db>] kernel_thread_helper+0x7/0x10
=======================
rtc: IRQ 8 is not free.
Non-volatile memory driver v1.2
Linux agpgart interface v0.101 (c) Dave Jones
RAMDISK driver initialized: 16 RAM disks of 16384K size 4096 blocksize
input: Macintosh mouse button emulation as /class/input/input0
Xen virtual console successfully installed as xvc0
Event-channel device installed.
usbcore: registered new interface driver libusual
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
PNP: No PS/2 controller found. Probing ports directly.
i8042.c: No controller found.
mice: PS/2 mouse device common for all mice
TCP bic registered
Initializing XFRM netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
Using IPI No-Shortcut mode
XENBUS: Device with no driver: device/vbd/51712
XENBUS: Device with no driver: device/vif/0
Freeing unused kernel memory: 180k freed
Write protecting the kernel read-only data: 762k
^[Domain installation still in progress. You can reconnect
17 years, 5 months
Re: [Libvir] Error while run make: undefined reference to `xenHypervisorMakeCapabilitiesXML'
by Marco Sinhoreli
Thanks,
I had a problem with my libxen package. The /usr/lib/libxenstore.so wasn't
linked to /usr/lib/libxenstore.so.3.0.0.
Regards,
>
> On 5/29/07, Daniel Veillard <veillard(a)redhat.com> wrote:
> >
> > On Mon, May 28, 2007 at 11:26:18AM -0400, Daniel Veillard wrote:
> > > On Mon, May 28, 2007 at 12:15:31PM -0300, Marco Sinhoreli wrote:
> > > > Hello list,
> > > >
> > > > I'm with this error while I am compiling the libvirt:
> > > >
> > > > xencapstest.o: In function `testCompareFiles':
> > > > /usr/src/libvirt/tests/xencapstest.c:33: undefined reference to
> > > > `xenHypervisorMakeCapabilitiesXML'
> > > > collect2: ld returned 1 exit status
> > > >
> > > > Any idea?
> > >
> > > What version ? I guess it comes when compiling on a machine where
> > > Xen developments environment is not present, this ought to be fixed
> > > if not already in CVS,
> >
> > actually I can reproduce that to on CVs head, will fix !
> >
> > 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/
> >
>
>
>
> --
> Marco Sinhoreli
--
Marco Sinhoreli
17 years, 5 months
Re: [Libvir] Finally - fix the build on Debian
by Marco Sinhoreli
Hello,
I compiled the libvirt from last cvs source without to export CFLAGS
-fstack-protector option without problem. After it, I compiled the
virt-manger and it isn't working. Running virt-manager retur this error:
virt-manager
Traceback (most recent call last):
File "/usr/share/virt-manager/virt-manager.py", line 104, in ?
from virtManager.config import vmmConfig
File "/usr/share/virt-manager/virtManager/config.py", line 24, in ?
import libvirt
File "/usr/lib/python2.4/site-packages/libvirt.py", line 7, in ?
import libvirtmod
ImportError: /usr/lib/libvirt.so.0: undefined symbol: __stack_chk_guard
Also is necessáry correction in virt-manager code?
regards,
On 5/29/07, Richard W.M. Jones <rjones(a)redhat.com> wrote:
>
> > Daniel Veillard wrote:
> > > On Tue, May 29, 2007 at 03:21:48PM +0100, Richard W.M. Jones wrote:
> > >> The attached patch fixes three separate build problems on Debian:
> > >>
> > >> (1) The libtool autoconf macro is wrong in that it requires a C++
> > >> compiler and /lib/cpp, neither of which seems to be really needed.
> > >>
> > >> (2) If you pass -fstack-protector while compiling, then you also need
> > to
> > >> pass it while linking, so that gcc knows to link -lssp.
> > >>
> > >> (3) Long-standing problem that xencapstest.c won't compile
> > --without-xen.
> > >>
> > >> Well, OK so I didn't actually fix (1), but I did add a note to the
> > TODO
> > >> file pointing out the problem. So you'll still need to install the
> > >> Debian "g++" package before you can compile libvirt.
> > >
> > > None of this is actually Debian specific, it actually affects various
> > setups.
> > > Patch looks fine to me,
> >
> > Committed.
> >
> > Rich.
> >
> > --
> > Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/<http://et.redhat.com/%7Erjones/>
> > Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
> > Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
> > England and Wales under Company Registration No. 03798903
> >
> > --
> > Libvir-list mailing list
> > Libvir-list(a)redhat.com
> > https://www.redhat.com/mailman/listinfo/libvir-list
> >
> >
> >
>
>
> --
> Marco Sinhoreli
--
Marco Sinhoreli
17 years, 5 months
[Libvir] Finally - fix the build on Debian
by Richard W.M. Jones
The attached patch fixes three separate build problems on Debian:
(1) The libtool autoconf macro is wrong in that it requires a C++
compiler and /lib/cpp, neither of which seems to be really needed.
(2) If you pass -fstack-protector while compiling, then you also need to
pass it while linking, so that gcc knows to link -lssp.
(3) Long-standing problem that xencapstest.c won't compile --without-xen.
Well, OK so I didn't actually fix (1), but I did add a note to the TODO
file pointing out the problem. So you'll still need to install the
Debian "g++" package before you can compile libvirt.
Rich.
--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903
17 years, 5 months
[Libvir] [PATCH] Fix some memory leak
by Masayuki Sunou
Hi
This patch fixes some memory leak in libvirt.
1. The point that checks command-option in virsh.c
2. The point that checks version of Xen in xen_internal.c
3. The point that checks OS type of VM in xend_internal.c
And these memory leaks can be checked by valgrind.
Signed-off-by: Masayuki Sunou <fj1826dm(a)aa.jp.fujitsu.com>
Thanks,
Masayuki Sunou.
-------------------------------------------------------------------------------
Index: src/virsh.c
===================================================================
RCS file: /data/cvs/libvirt/src/virsh.c,v
retrieving revision 1.76
diff -u -p -r1.76 virsh.c
--- src/virsh.c 23 May 2007 15:09:19 -0000 1.76
+++ src/virsh.c 29 May 2007 07:43:48 -0000
@@ -3153,8 +3153,10 @@ vshCommandParse(vshControl * ctl, char *
c->def = cmd;
c->next = NULL;
- if (!vshCommandCheckOpts(ctl, c))
+ if (!vshCommandCheckOpts(ctl, c)) {
+ if(c) free(c);
goto syntaxError;
+ }
if (!ctl->cmd)
ctl->cmd = c;
Index: src/xen_internal.c
===================================================================
RCS file: /data/cvs/libvirt/src/xen_internal.c,v
retrieving revision 1.72
diff -u -p -r1.72 xen_internal.c
--- src/xen_internal.c 30 Apr 2007 17:30:11 -0000 1.72
+++ src/xen_internal.c 29 May 2007 07:43:48 -0000
@@ -1497,11 +1497,15 @@ xenHypervisorInit(void)
virXenError(VIR_ERR_XEN_CALL, " ioctl ", IOCTL_PRIVCMD_HYPERCALL);
close(fd);
in_init = 0;
+ if (ipt)
+ free(ipt);
return(-1);
done:
close(fd);
in_init = 0;
+ if (ipt)
+ free(ipt);
return(0);
}
Index: src/xend_internal.c
===================================================================
RCS file: /data/cvs/libvirt/src/xend_internal.c,v
retrieving revision 1.114
diff -u -p -r1.114 xend_internal.c
--- src/xend_internal.c 11 May 2007 14:21:28 -0000 1.114
+++ src/xend_internal.c 29 May 2007 07:43:49 -0000
@@ -3072,7 +3072,7 @@ xenDaemonCreateLinux(virConnectPtr conn,
static int
xenDaemonAttachDevice(virDomainPtr domain, char *xml)
{
- char *sexpr, *conf;
+ char *sexpr, *conf, *str;
int hvm = 0, ret;
xenUnifiedPrivatePtr priv;
@@ -3084,8 +3084,11 @@ xenDaemonAttachDevice(virDomainPtr domai
priv = (xenUnifiedPrivatePtr) domain->conn->privateData;
- if (strcmp(virDomainGetOSType(domain), "linux"))
+ str = virDomainGetOSType(domain);
+ if (strcmp(str, "linux"))
hvm = 1;
+ if (str)
+ free(str);
sexpr = virParseXMLDevice(domain->conn, xml, hvm, priv->xendConfigVersion);
if (sexpr == NULL)
return (-1);
-------------------------------------------------------------------------------
17 years, 5 months
[Libvir] [PATCH] Add Python binding for virGetVersion
by Richard W.M. Jones
This patch adds a Python binding for the virGetVersion call (called
libvirt.getVersion).
$ python
Python 2.4.4 (#1, Oct 23 2006, 13:58:18)
[GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libvirt;
>>> libvirt.getVersion (None);
(2002, 3000001)
>>> libvirt.getVersion ("QEMU");
(2002, 2002)
It also gives you a way to detect if a particular driver is compiled in,
which I guess could be quite useful:
>>> libvirt.getVersion ("not_here");
libvir: error : no support for hypervisor
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/home/rjones/local/lib/python2.4/site-packages/libvirt.py",
line 95, in getVersion
if ret is None: raise libvirtError ("virGetVersion() failed")
libvirt.libvirtError: virGetVersion() failed no support for hypervisor
Rich.
--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903
17 years, 5 months