[libvirt] qemud/.libs/libvirtd?

2008-08-20 Thread Jun Koi
Hi,

I added some new code to libvirt.c, and recompile. However, when make
install. qemud/.libs/libvirtd is installed but not qemud/libvirtd.
Why? Looks like a bug?

The problem is that qemud/libvirtd has my new code, but not
qemud/.libs/libvirtd! So make install installs the old binary, which
I dont know where it is from. (Perhaps from the first compilation?)

I am not familiar with the autoconf Makefile, and cannot figure it out
why it is working this way.

Many thanks,
Jun

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] PATCH: 2/5: Fix signal handler race condition

2008-08-20 Thread Daniel P. Berrange
On Tue, Aug 19, 2008 at 06:25:01PM +0200, Jim Meyering wrote:
 Daniel P. Berrange [EMAIL PROTECTED] wrote:
  This is the same patch from yesterday to fix the signal handler race
  condition. We block signals before doing a fork(), and then in the child
  reset all signal handlers before finally unblocking all signals. The
  parent will restore its original signal mask after fork. I've fixed the
  incorrect return code check on pthread_sigmask() and iterate from 1
  instead of 0. I'll switch to pid_t later, since that'll involve changing
  all callers too.
 
  In the internal.h file I also #define pthread_sigmask to sigprocmask
  for scenarios where we don't have pthread - as per other usage. This
  exposed a bug in remote_protocol.c file where it was not including
  the config.h file, hence that change here too
 
 This looks fine now.

Thanks, this is committed

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 :|

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] Re: qemud/.libs/libvirtd?

2008-08-20 Thread Daniel P. Berrange
On Wed, Aug 20, 2008 at 08:01:42PM +0900, Jun Koi wrote:
 On Wed, Aug 20, 2008 at 4:30 PM, Jun Koi [EMAIL PROTECTED] wrote:
  Hi,
 
  I added some new code to libvirt.c, and recompile. However, when make
  install. qemud/.libs/libvirtd is installed but not qemud/libvirtd.
  Why? Looks like a bug?

No, this is correct behaviour.  qemud/libvirtd is not a binary - it is
a mere shell script which calls into qemud/.libs/libvirtd. This is all
part of the libtool build process.

  The problem is that qemud/libvirtd has my new code, but not
  qemud/.libs/libvirtd! So make install installs the old binary, which
  I dont know where it is from. (Perhaps from the first compilation?)

You are mistaken - qemud/libvirtd is just a shell script wrapper.
The actual binaries are in the .libs directory.

  I am not familiar with the autoconf Makefile, and cannot figure it out
  why it is working this way.
 
 
 This is not getting funny anymore. I clean src/.libs/*, and
 qemud/.libs/*, and recompile and make install again. This step
 installed stuffs in .libs/ into system.

Run  'make distclean' and then start again from 'configure'

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 :|

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] Re: qemud/.libs/libvirtd?

2008-08-20 Thread Jun Koi
On Wed, Aug 20, 2008 at 8:05 PM, Daniel P. Berrange [EMAIL PROTECTED] wrote:
 On Wed, Aug 20, 2008 at 08:01:42PM +0900, Jun Koi wrote:
 On Wed, Aug 20, 2008 at 4:30 PM, Jun Koi [EMAIL PROTECTED] wrote:
  Hi,
 
  I added some new code to libvirt.c, and recompile. However, when make
  install. qemud/.libs/libvirtd is installed but not qemud/libvirtd.
  Why? Looks like a bug?

 No, this is correct behaviour.  qemud/libvirtd is not a binary - it is
 a mere shell script which calls into qemud/.libs/libvirtd. This is all
 part of the libtool build process.


Ah, that is so confused, the way to name files here.

So if qemu/.libs/libvirtd is installed into /usr/sbin/libvirtd, where
qemud/libvirtd is installed???
(It seems only qemud/libvirtd works for me)


Thanks,
Jun

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] Using Xen config files

2008-08-20 Thread Matthew Donovan
I am trying to programmatically start Xen guest VMs (HVM) with libvirt (on
Fedora Core 8) and I'm having some trouble with it. I've included my code
below.  Essentially, the domain seems to get created correctly but it
doesn't seem to run.  I don't receive any error messages from the libvirt
functions but the VM does not get any CPU time (as shown with xm list).  

[EMAIL PROTECTED] ~]$ xm list
NameID   Mem VCPUs  State
Time(s)
Domain-0 0  1462 2 r-
1313.5
fc8.conf 7   128 1 --
0.0

Can someone explain what I'm doing wrong here?  I've tried to get this
working with linux and windows guests with the same results.

I've seen references on this mailing list to libvirt's ability to handle Xen
configuration files but I haven't seen anything in the API documentation or
public header files that refer to it.  Is there a public interface to
specifying a configuration file?

Thanks 
-matthew


CODE:
#include stdio.h
#include libvirt/libvirt.h
#include libvirt/virterror.h

  //!--mac address='00:16:3e:5d:c7:9e'/--
//graphics type='vnc' port='5904'/

const char* fedora = 
domain type='xen'
namefc8.conf/name
os
typehvm/type
loader/usr/lib/xen/boot/hvmloader/loader
boot dev='hd'/
/os
memory1024/memory
vcpu1/vcpu
on_poweroffdestroy/on_poweroff
on_rebootrestart/on_reboot
on_crashrestart/on_crash
features
pae/
acpi/
apic/
/features
clock sync=\localtime\/
devices
emulator/usr/lib/xen/bin/qemu-dm/emulator
interface type='bridge'
 source bridge='xenbr0'/
  script path='vif-bridge'/
/interface
disk type='block'
  source dev='/dev/vgvms/fc8'/
  target dev='hda'/
/disk
disk type='block' device='cdrom'
  source dev='/dev/cdrom'/
  target dev='hdc'/
  readonly/
/disk
graphics type='vnc'/
  /devices
/domain;


int main (int argc, char** argv) 
{
virConnectPtr con;  /* connection to the Xen hypervisor */
virDomainPtr  domain;

virInitialize();
con = virConnectOpen (xen:///);
if (!con) {
virErrorPtr err = virGetLastError ();
printf (virConnectOpen failed: %s\n,
err-message);
return -1;
}

domain = virDomainDefineXML (con, fedora);
if (!domain) {
virErrorPtr err = virGetLastError ();
printf (virDomainDefineXML failed: %s\n,
err-message);

} else {

if (virDomainCreate (domain)  0) {
virErrorPtr err = virGetLastError ();
printf (virDomainCreate failed: %s\n,
err-message);
} else {
virDomainInfo info = {0};
virDomainGetInfo (domain, info);
printf (state = %d\n, info.state);
}
}

virConnectClose (con);
return 0;
}

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] static ip address

2008-08-20 Thread Daniel Veillard
On Fri, Aug 15, 2008 at 10:43:15AM +0100, Daniel P. Berrange wrote:
 On Tue, Aug 12, 2008 at 05:24:01PM -0400, Daniel Veillard wrote:
New patch with just a pair of minor fixes which seems to work just fine 
  for
  me. The syntax is nearly the old one, just use host instead of statichost:
  
ip address=192.168.122.1 netmask=255.255.255.0
  dhcp
range start=192.168.122.4 end=192.168.122.254 /
host mac=00:16:3E:XX:XX:XX host=XXX
 
 Seems a little odd to have 'host' as the element name and attribute
 name at once. Perhaps the atribute should just be name='' ?

  Okidoc, so I commited the patch but changed the attribute to name
instead of host, nicer and makes more sense,

  thanks,

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard  | virtualization library  http://libvirt.org/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] check for XHTML1 DTDs availability

2008-08-20 Thread Daniel Veillard
On Wed, Aug 13, 2008 at 03:50:10PM +0200, Chris Lalancette wrote:
 Daniel Veillard wrote:
  On Wed, Aug 13, 2008 at 08:10:36AM -0400, Daniel Veillard wrote:
Well apparently the XSL output is post-processed by xmlling --valid 
  --format
  which then introduce a dependancy on the XHTML1 DTDs . If you don't have 
  them
  installed locally you will get validation error messages when building
  in docs and the output will diverge.
 
The simplest solution for you is probably to make sure you have XHTML1
  DTDs installed in your local XML catalog, which on RHEL/Fedora is as simple
  as having the package xhtml1-dtds installed on your machine(s).
  
The patch enclosed adds detection for the XHTML1 dtds at runtime on the 
  build machine, and should solve the problem of diverging docs, replace the
  XML validity warnings by a more general message and add the requirement
  when building the RPM. I guess this should solve the issue
 
 Yes, that did it for me.  I like the warning message too; at least that gives
 someone a fighting chance of figuring out what to install if they do want to
 generate the docs for some reason.

  Okay, that's far from perfect but better than the status quo, so
  commited !

   thanks,

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard  | virtualization library  http://libvirt.org/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] networking

2008-08-20 Thread James Bardin


Charles Duffy wrote:
 James Bardin wrote:
 I'm not sure where to set this up, but I have a bridged device br0 that
 I would like to have available in virt-manager/virsh.

 Right now, I can edit the VM's xml interface element manually to use
 br0.
 
 AFAIK, you're doing the right thing (as long as you're doing a
 dump-xml to get the XML description out and then a define to put the
 updated one in; directly modifying /etc/libvirt/qemu/* is bad form).
 

Yeah, that's what I am doing. I can't seem to figure out what to do to
get br0 configured in libvirt, so that it can managed through
virsh/virt-manager. Right now I'm resorting to creating a vm with the
default adapter, then modifying the adapter in /etc/libvirt/qemu/*.xml.



--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] networking

2008-08-20 Thread Richard W.M. Jones
On Tue, Aug 19, 2008 at 04:12:06PM -0500, Charles Duffy wrote:
 James Bardin wrote:
 I'm not sure where to set this up, but I have a bridged device br0 that
 I would like to have available in virt-manager/virsh.

 Right now, I can edit the VM's xml interface element manually to use
 br0.

 AFAIK, you're doing the right thing (as long as you're doing a  
 dump-xml to get the XML description out and then a define to put the  
 updated one in; directly modifying /etc/libvirt/qemu/* is bad form).

 Personally, I use xmlstarlet [from shell scripts] or lxml [from python]  
 to automate tweaking the XML host descriptions, but the details are your  
 own call.

As a completely separate aside to this, in the new version of libvirt
(either CVS or 0.4.5 whenever that is released) you will be able to
do:

  virsh edit domain|ID|UUID
  virsh net-edit network
  virsh pool-edit storage

These do the dumpxml/edit/define sequence of operations, and have
sensible behaviour in the case of failure.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
Read my OCaml programming blog: http://camltastic.blogspot.com/
Fedora now supports 60 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] On shutdown Destroy/Delete

2008-08-20 Thread Richard W.M. Jones
On Tue, Aug 19, 2008 at 10:26:33PM +0200, Stefan de Konink wrote:
 I would really like to know how I can make a defined domain *gone* after  
 shutdown :) (instead of it still be defined, after shutdown)

virsh undefine?

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] On shutdown Destroy/Delete

2008-08-20 Thread Richard W.M. Jones
On Wed, Aug 20, 2008 at 02:31:52PM +0100, Richard W.M. Jones wrote:
 On Tue, Aug 19, 2008 at 10:26:33PM +0200, Stefan de Konink wrote:
  I would really like to know how I can make a defined domain *gone* after  
  shutdown :) (instead of it still be defined, after shutdown)

[...]

Oh right, so am I correct in thinking you want the domain to be
undefined after it has shutdown itself?  That's not possible
currently.  AIUI undefining a running domain is either an illegal
operation or shuts it down abruptly -- you'll need to look in the
source to see which.  So you'd need some sort of 'reaper' cronjob to
regularly undefine domains after they have gone into the shutdown
state.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
Read my OCaml programming blog: http://camltastic.blogspot.com/
Fedora now supports 60 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] Re: qemud/.libs/libvirtd?

2008-08-20 Thread Richard W.M. Jones
On Wed, Aug 20, 2008 at 08:22:00PM +0900, Jun Koi wrote:
 Ah, that is so confused, the way to name files here.
 
 So if qemu/.libs/libvirtd is installed into /usr/sbin/libvirtd, where
 qemud/libvirtd is installed???

It isn't installed anywhere.

 (It seems only qemud/libvirtd works for me)

This is a libtool thing.  Admittedly quite horrible and counter-
intuitive, but using libtool arguably beats trying to work out how
shared libraries are created on Windows / HP-UX / AIX / CP/M / etc.
which is what libtool gives us.

You can find out plenty more in the libtool manual:

  
http://www.gnu.org/software/libtool/manual/libtool.html#index-g_t_0040file_007b_0040value_007bobjdir_007d_007d-subdirectory-26

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
Read my OCaml programming blog: http://camltastic.blogspot.com/
Fedora now supports 60 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] On shutdown Destroy/Delete

2008-08-20 Thread Daniel P. Berrange
On Wed, Aug 20, 2008 at 02:34:22PM +0100, Richard W.M. Jones wrote:
 On Wed, Aug 20, 2008 at 02:31:52PM +0100, Richard W.M. Jones wrote:
  On Tue, Aug 19, 2008 at 10:26:33PM +0200, Stefan de Konink wrote:
   I would really like to know how I can make a defined domain *gone* after  
   shutdown :) (instead of it still be defined, after shutdown)
 
 [...]
 
 Oh right, so am I correct in thinking you want the domain to be
 undefined after it has shutdown itself?  That's not possible
 currently.  AIUI undefining a running domain is either an illegal
 operation or shuts it down abruptly -- you'll need to look in the
 source to see which.  So you'd need some sort of 'reaper' cronjob to
 regularly undefine domains after they have gone into the shutdown
 state.

The easy answer is to simply *not* define it in the first place. If
you use  virDomainCreateLinux() instead of virDomainDefine+virDomainCreate
then you'll get a running VM without any persistent config file behind
it. Then all trace will disappear when it shuts down.

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 :|

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] networking

2008-08-20 Thread Cole Robinson
James Bardin wrote:
 Hello,
 
 I'm having trouble digging up some documentation on libvirt's network
 config.
 
 I'm not sure where to set this up, but I have a bridged device br0 that
 I would like to have available in virt-manager/virsh.
 
 Right now, I can edit the VM's xml interface element manually to use
 br0. Virt-manager has an option for shared physical device, but it's
 empty, and I can't figure out how to see it from virsh.
 
 

cc-ing et-mgmt-tools which is the virt-manager list

The bridge should be showing up in shared physical device
drop down automatically, there shouldn't be anything you
need to teach libvirt.

What virt-manager version are you using?
Distro?
Is there anything showing up in the shared device drop
down (even if you can't select it?)

Also if you could attach ~/.virt-manager/virt-manager.log
it might help.

Thanks,
Cole

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] networking

2008-08-20 Thread James Bardin

Cole Robinson wrote:
 What virt-manager version are you using?
 Distro?

libvirt: 0.4.0-2ubuntu8
virt-manager: 0.5.3-0ubuntu10

Distro: Ubuntu 8.04.1 server x86_64

 Is there anything showing up in the shared device drop
 down (even if you can't select it?)
 

The drop-down activates, but is empty.

 Also if you could attach ~/.virt-manager/virt-manager.log
 it might help.
 

This group popped up a lot yesterday:

[Tue, 19 Aug 2008 14:55:19 virt-manager 5811] WARNING (connection:494)
Unable to list active networks
[Tue, 19 Aug 2008 14:55:19 virt-manager 5811] WARNING (connection:498)
Unable to list inactive networks
[Tue, 19 Aug 2008 14:55:19 virt-manager 5811] ERROR (engine:158) Could
not refresh connection qemu:///system
class 'libvirt.libvirtError' virConnectListDomainsID() failed Broken pipe
Traceback (most recent call last):
  File /usr/share/virt-manager/virtManager/engine.py, line 152, in _tick
self.connections[uri][connection].tick()
  File /usr/share/virt-manager/virtManager/connection.py, line 550, in
tick
newActiveIDs = self.vmm.listDomainsID()
  File /usr/lib/python2.5/site-packages/libvirt.py, line 795, in
listDomainsID
if ret is None: raise libvirtError ('virConnectListDomainsID()
failed', conn=self)
libvirtError: virConnectListDomainsID() failed Broken pipe


Here's the output when I try to add a new network device:

[Wed, 20 Aug 2008 10:57:39 virt-manager 6673] ERROR (connection:158)
Unable to connect to HAL to list network devices: '%s'class
'dbus.exceptions.DBusException'
org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Hal
was not provided by any .service files
Traceback (most recent call last):
  File /usr/share/virt-manager/virtManager/connection.py, line 144, in
detect_network_devices
hal_object = self.bus.get_object('org.freedesktop.Hal',
'/org/freedesktop/Hal/Manager')
  File /var/lib/python-support/python2.5/dbus/bus.py, line 244, in
get_object
follow_name_owner_changes=follow_name_owner_changes)
  File /var/lib/python-support/python2.5/dbus/proxies.py, line 241, in
__init__
self._named_service = conn.activate_name_owner(bus_name)
  File /var/lib/python-support/python2.5/dbus/bus.py, line 183, in
activate_name_owner
self.start_service_by_name(bus_name)
  File /var/lib/python-support/python2.5/dbus/bus.py, line 281, in
start_service_by_name
'su', (bus_name, flags)))
  File /var/lib/python-support/python2.5/dbus/connection.py, line 607,
in call_blocking
message, timeout)
DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name
org.freedesktop.Hal was not provided by any .service files
[Wed, 20 Aug 2008 10:57:47 virt-manager 6673] ERROR (console:106) Cannot
initialize notification
systemorg.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute
dbus-launch to autolaunch D-Bus session



Thanks
-jim

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] networking

2008-08-20 Thread James Bardin


Cole Robinson wrote:
 Make sure hald (or some equivalently named service) is
 running. Bar that, you'll probably have to ask the
 ubuntu folks.
 

It's running. I'll see if I can figure out where this went wrong.

Does this apply to virsh as well?

Thanks
-jim

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] networking

2008-08-20 Thread Cole Robinson
James Bardin wrote:
 
 Cole Robinson wrote:
 Make sure hald (or some equivalently named service) is
 running. Bar that, you'll probably have to ask the
 ubuntu folks.

 
 It's running. I'll see if I can figure out where this went wrong.
 
 Does this apply to virsh as well?
 
 Thanks
 -jim

No virsh/libvirt doesn't use hal.

If you want to try manually adding the bridge device to
the domain, try the following.

'virsh dumpxml vmname  tmpxml'

edit 'tmpxml', add to the devices section:

interface type='bridge'
  source bridge='br0'/
/interface

'virsh define tmpxml'

Hope that helps,
Cole

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] Using Xen config files

2008-08-20 Thread Richard W.M. Jones
On Wed, Aug 20, 2008 at 11:35:17AM -0400, Matthew Donovan wrote:
 Thanks for the quick reply!
 
 I set the LIBVIRT_DEBUG flag to 1 and ran it again.  (The output is below.)
[...]
 [EMAIL PROTECTED] ~]$ gcc -g virt_test.c -lvirt  ./a.out
 DEBUG: libvirt.c: virInitialize (register drivers)
 DEBUG: xen_internal.c: xenHypervisorInit (Using new hypervisor call: 30001
 )
 DEBUG: xen_internal.c: xenHypervisorInit (Using hypervisor call v2, sys ver3
 dom ver5
 )
 DEBUG: libvirt.c: virConnectOpen (name=xen:///)
 DEBUG: libvirt.c: do_open (name xen:/// to URI components:
   scheme xen
   opaque (null)
   authority (null)
   server (null)
   user (null)
   port 0
   path /
 )
 DEBUG: libvirt.c: do_open (trying driver 0 (Test) ...)
 DEBUG: libvirt.c: do_open (driver 0 Test returned DECLINED)
 DEBUG: libvirt.c: do_open (trying driver 1 (QEMU) ...)
 DEBUG: libvirt.c: do_open (driver 1 QEMU returned DECLINED)
 DEBUG: libvirt.c: do_open (trying driver 2 (Xen) ...)
 DEBUG: xen_unified.c: xenUnifiedOpen (Trying hypervisor sub-driver)
 DEBUG: xen_unified.c: xenUnifiedOpen (Activated hypervisor sub-driver)
 DEBUG: xen_unified.c: xenUnifiedOpen (Trying XenD sub-driver)
 DEBUG: xen_unified.c: xenUnifiedOpen (Activated XenD sub-driver)
 DEBUG: xen_unified.c: xenUnifiedOpen (Trying XS sub-driver)
 DEBUG: xen_unified.c: xenUnifiedOpen (Activated XS sub-driver)
 DEBUG: libvirt.c: do_open (driver 2 Xen returned SUCCESS)
 DEBUG: libvirt.c: do_open (network driver 0 Test returned DECLINED)
 DEBUG: libvirt.c: do_open (network driver 1 QEMU returned DECLINED)
 DEBUG: remote_internal.c: doRemoteOpen (proceeding with name = xen:///)
 DEBUG: libvirt.c: do_open (network driver 2 remote returned SUCCESS)
 DEBUG: libvirt.c: do_open (storage driver 0 Test returned DECLINED)
 DEBUG: libvirt.c: do_open (storage driver 1 storage returned DECLINED)
 DEBUG: libvirt.c: do_open (storage driver 2 remote returned SUCCESS)
 DEBUG: libvirt.c: virDomainDefineXML (conn=0x96fe478, xml=domain
 type='xen'namefc8.conf/nameostypehvm/typeloader/usr/lib/xen/boo
 t/hvmloader/loaderboot
 dev='hd'//osmemory1024/memoryvcpu1/vcpuon_poweroffdestroy/on_p
 oweroffon_rebootrestart/on_rebooton_crashrestart/on_crashfeatures
 pae/acpi/apic//featuresclock
 sync=localtime/devicesemulator/usr/lib/xen/bin/qemu-dm/emulatorint
 erface type='bridge'source bridge='xenbr0'/script
 path='vif-bridge'//interfacedisk type='block'source
 dev='/dev/vgvms/fc8'/target dev='hda'//diskdisk type='block'
 device='cdrom'source dev='/dev/cdrom'/target
 dev='hdc'/readonly//diskgraphics type='vnc'//devices/domain)
 DEBUG: libvirt.c: virDomainLookupByName (conn=0x96fe478, name=fc8.conf)
 DEBUG: hash.c: __virGetDomain (New hash entry 0x9702a18)
 DEBUG: libvirt.c: virDomainCreate (domain=0x9702a18)
 DEBUG: libvirt.c: virDomainGetInfo (domain=0x9702a18, info=0xbfa2b658)
 state = 0
 DEBUG: libvirt.c: virConnectClose (conn=0x96fe478)
 DEBUG: hash.c: virUnrefConnect (unref connection 0x96fe478 xen:/// 2)

It certainly looks OK, and it seems like the domain should run after
virDomainCreate.  Have you tried adding a delay of 30 seconds just to
check if the domain is starting up slowly?

Dan  Dan, any ideas?

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


RE: [libvirt] Using Xen config files

2008-08-20 Thread Matthew Donovan
Found it!  I added serial and console devices to the XML and it appears to
be running.  It's not working completely as expcted but it's doing more than
it was.

Thanks for your help.
-matthew

 -Original Message-
 From: Richard W.M. Jones [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, August 20, 2008 11:44 AM
 To: Matthew Donovan
 Cc: libvir-list@redhat.com
 Subject: Re: [libvirt] Using Xen config files
 
 On Wed, Aug 20, 2008 at 11:35:17AM -0400, Matthew Donovan wrote:
  Thanks for the quick reply!
  
  I set the LIBVIRT_DEBUG flag to 1 and ran it again.  (The 
 output is below.)
 [...]
  [EMAIL PROTECTED] ~]$ gcc -g virt_test.c -lvirt  ./a.out
  DEBUG: libvirt.c: virInitialize (register drivers)
  DEBUG: xen_internal.c: xenHypervisorInit (Using new 
 hypervisor call: 30001
  )
  DEBUG: xen_internal.c: xenHypervisorInit (Using hypervisor 
 call v2, sys ver3
  dom ver5
  )
  DEBUG: libvirt.c: virConnectOpen (name=xen:///)
  DEBUG: libvirt.c: do_open (name xen:/// to URI components:
scheme xen
opaque (null)
authority (null)
server (null)
user (null)
port 0
path /
  )
  DEBUG: libvirt.c: do_open (trying driver 0 (Test) ...)
  DEBUG: libvirt.c: do_open (driver 0 Test returned DECLINED)
  DEBUG: libvirt.c: do_open (trying driver 1 (QEMU) ...)
  DEBUG: libvirt.c: do_open (driver 1 QEMU returned DECLINED)
  DEBUG: libvirt.c: do_open (trying driver 2 (Xen) ...)
  DEBUG: xen_unified.c: xenUnifiedOpen (Trying hypervisor sub-driver)
  DEBUG: xen_unified.c: xenUnifiedOpen (Activated hypervisor 
 sub-driver)
  DEBUG: xen_unified.c: xenUnifiedOpen (Trying XenD sub-driver)
  DEBUG: xen_unified.c: xenUnifiedOpen (Activated XenD sub-driver)
  DEBUG: xen_unified.c: xenUnifiedOpen (Trying XS sub-driver)
  DEBUG: xen_unified.c: xenUnifiedOpen (Activated XS sub-driver)
  DEBUG: libvirt.c: do_open (driver 2 Xen returned SUCCESS)
  DEBUG: libvirt.c: do_open (network driver 0 Test returned DECLINED)
  DEBUG: libvirt.c: do_open (network driver 1 QEMU returned DECLINED)
  DEBUG: remote_internal.c: doRemoteOpen (proceeding with 
 name = xen:///)
  DEBUG: libvirt.c: do_open (network driver 2 remote returned SUCCESS)
  DEBUG: libvirt.c: do_open (storage driver 0 Test returned DECLINED)
  DEBUG: libvirt.c: do_open (storage driver 1 storage 
 returned DECLINED)
  DEBUG: libvirt.c: do_open (storage driver 2 remote returned SUCCESS)
  DEBUG: libvirt.c: virDomainDefineXML (conn=0x96fe478, xml=domain
  
 type='xen'namefc8.conf/nameostypehvm/typeloader/u
 sr/lib/xen/boo
  t/hvmloader/loaderboot
  
 dev='hd'//osmemory1024/memoryvcpu1/vcpuon_poweroff
 destroy/on_p
  
 oweroffon_rebootrestart/on_rebooton_crashrestart/on_cr
 ashfeatures
  pae/acpi/apic//featuresclock
  
 sync=localtime/devicesemulator/usr/lib/xen/bin/qemu-dm
 /emulatorint
  erface type='bridge'source bridge='xenbr0'/script
  path='vif-bridge'//interfacedisk type='block'source
  dev='/dev/vgvms/fc8'/target dev='hda'//diskdisk type='block'
  device='cdrom'source dev='/dev/cdrom'/target
  dev='hdc'/readonly//diskgraphics 
 type='vnc'//devices/domain)
  DEBUG: libvirt.c: virDomainLookupByName (conn=0x96fe478, 
 name=fc8.conf)
  DEBUG: hash.c: __virGetDomain (New hash entry 0x9702a18)
  DEBUG: libvirt.c: virDomainCreate (domain=0x9702a18)
  DEBUG: libvirt.c: virDomainGetInfo (domain=0x9702a18, 
 info=0xbfa2b658)
  state = 0
  DEBUG: libvirt.c: virConnectClose (conn=0x96fe478)
  DEBUG: hash.c: virUnrefConnect (unref connection 0x96fe478 
 xen:/// 2)
 
 It certainly looks OK, and it seems like the domain should run after
 virDomainCreate.  Have you tried adding a delay of 30 seconds just to
 check if the domain is starting up slowly?
 
 Dan  Dan, any ideas?
 
 Rich.
 
 -- 
 Richard Jones, Emerging Technologies, Red Hat  
 http://et.redhat.com/~rjones
 virt-df lists disk usage of guests without needing to install any
 software inside the virtual machine.  Supports Linux and Windows.
 http://et.redhat.com/~rjones/virt-df/
 

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: AW: [libvirt] libvirt-java: change org.libvirt.Error implementingSerializable

2008-08-20 Thread Daniel Veillard
On Wed, Aug 20, 2008 at 04:22:49PM +0200, Daniel Schwager wrote:
 Here we are:

  Okay, that didn't applied correctly due to mail reformating of
the patch but i applied those manually and commited,

  thanks !

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard  | virtualization library  http://libvirt.org/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] PATCH: 5/5: Make all code use virExec

2008-08-20 Thread Jim Meyering
Daniel P. Berrange [EMAIL PROTECTED] wrote:
 This final patch switches over all places which do fork()/exec() to use the
 new enhanced virExec() code. A fair amount of code is deleted, but that's
 not the whole story - the new impl is more robust that most of the existing
 code we're deleting here.

Nice clean-up!

 diff -r 2591ebc40bd7 src/bridge.c
...
 @@ -680,7 +645,10 @@

  argv[n++] = NULL;

 -retval = brctlSpawn(argv);
 +if (virRun(NULL, argv, NULL)  0)
 +retval = errno;

Using errno here isn't always kosher, since _virExec doesn't always
preserve it when things go wrong (the ReportError call and close
calls after cleanup: can clobber errno).
But one can argue that it doesn't matter too much, since virExec
does diagnose each failure.  However, that would suggest not
using errno upon virRun failure.

...
 -retval = brctlSpawn(argv);
 +if (virRun(NULL, argv, NULL)  0)
 +retval = errno;

Likewise.

...
 diff -r 2591ebc40bd7 src/qemu_conf.c
 --- a/src/qemu_conf.c Tue Aug 12 15:29:29 2008 +0100
 +++ b/src/qemu_conf.c Tue Aug 12 15:33:42 2008 +0100
 @@ -397,116 +397,88 @@


  int qemudExtractVersionInfo(const char *qemu, int *version, int *flags) {
 +const char *const qemuarg[] = { qemu, -help, NULL };
 +const char *const qemuenv[] = { LANG=C, NULL };

If you have to use just one environment variable, use LC_ALL=C.
It trumps all others, when it comes to locale-related things.

  pid_t child;
 -int newstdout[2];
 +int newstdout = -1;
 +char help[8192]; /* Ought to be enough to hold QEMU help screen */
 +int got = 0, ret = -1, status;
 +int major, minor, micro;
 +int ver;

If you make the above 4 variables unsigned
and adjust the %d formats accordingly, the version
parsing will be a little tighter.

  if (flags)
  *flags = 0;
  if (version)
  *version = 0;

 -if (pipe(newstdout)  0) {
 +if (virExec(NULL, qemuarg, qemuenv, child,
 +-1, newstdout, NULL, VIR_EXEC_NONE)  0)
  return -1;
 +
 +
 +while (got  (sizeof(help)-1)) {
 +int len;
 +if ((len = read(newstdout, help+got, sizeof(help)-got-1)) = 0) {
 +if (!len)
 +break;
 +if (errno == EINTR)
 +continue;
 +goto cleanup2;
 +}
 +got += len;
 +}

Any reason not to use saferead in place of this while-loop?

 +help[got] = '\0';
 +
 +if (sscanf(help, QEMU PC emulator version %d.%d.%d, major,minor, 
 micro) != 3) {
 +goto cleanup2;
  }

 -if ((child = fork())  0) {
 -close(newstdout[0]);
 -close(newstdout[1]);
 -return -1;
 +ver = (major * 1000 * 1000) + (minor * 1000) + micro;
 +if (version)
 +*version = ver;
 +if (flags) {
 +if (strstr(help, -no-kqemu))
 +*flags |= QEMUD_CMD_FLAG_KQEMU;
 +if (strstr(help, -no-reboot))
 +*flags |= QEMUD_CMD_FLAG_NO_REBOOT;
 +if (strstr(help, -name))
 +*flags |= QEMUD_CMD_FLAG_NAME;
 +if (strstr(help, -drive))
 +*flags |= QEMUD_CMD_FLAG_DRIVE;
 +if (strstr(help, boot=on))
 +*flags |= QEMUD_CMD_FLAG_DRIVE_BOOT;
 +if (ver = 9000)
 +*flags |= QEMUD_CMD_FLAG_VNC_COLON;
 +}
 +ret = 0;
 +
 +qemudDebug(Version %d %d %d  Cooked version: %d, with flags ? %d,

If version can really be NULL, as the above if (version) tests
suggest, then you'll want to change *version here, to e.g.,
version ? *version : NA

Same for *flags.

 +   major, minor, micro, *version, *flags);
 +
 +cleanup2:
 +if (close(newstdout)  0)
 +ret = -1;
 +
 +rewait:
 +if (waitpid(child, status, 0) != child) {
 +if (errno == EINTR)
 +goto rewait;
 +
 +qemudLog(QEMUD_ERR,
 + _(Unexpected exit status from qemu %d pid %lu),
 + status, (unsigned long)child);

You've probably already fixed this, but status here is a
combination of exit status and signal number.

 +ret = -1;
 +}
 +/* Check  log unexpected exit status, but don't fail,
 + * as there's really no need to throw an error if we did
 + * actually read a valid version number above */
 +if (WEXITSTATUS(status) != 0) {
 +qemudLog(QEMUD_WARN,
 + _(Unexpected exit status '%d', qemu probably failed),
 + status);
  }
...
  int qemudExtractVersion(virConnectPtr conn,
 diff -r 2591ebc40bd7 src/remote_internal.c
 --- a/src/remote_internal.c   Tue Aug 12 15:29:29 2008 +0100
 +++ b/src/remote_internal.c   Tue Aug 12 15:33:42 2008 +0100
 @@ -72,6 +72,7 @@
  #include remote_internal.h
  #include remote_protocol.h
  #include memory.h
 +#include util.h

  #define DEBUG(fmt,...) VIR_DEBUG(__FILE__, fmt,__VA_ARGS__)
  #define DEBUG0(msg) VIR_DEBUG(__FILE__, %s, msg)
 @@ -221,61 +222,21 @@
  remoteForkDaemon(virConnectPtr conn)
  {
  const char 

[libvirt] [PATCH] Don't list capabilities entries if emulators can't be accessed

2008-08-20 Thread Cole Robinson
The patch below fixes capabilities xml generation for
the qemu driver if the emulators aren't found in the
hardcoded paths. Current behavior will add a guest
entry for the emulator even if it does not exist, patch
fixes this to check that we actually have access.

This brings up another issue, that hardcoded paths
aren't exactly distro friendly. I'm not really familiar
with what options we have to allow specifying these
at build time (or something else). Anyone have an
idea?

Thanks,
Cole
diff --git a/src/qemu_conf.c b/src/qemu_conf.c
index dc9e42a..0328cc1 100644
--- a/src/qemu_conf.c
+++ b/src/qemu_conf.c
@@ -230,6 +230,10 @@ qemudCapsInitGuest(virCapsPtr caps,
 virCapsGuestPtr guest;
 int i;
 
+/* Check for existance of base emulator */
+if (access(info-binary, X_OK) == -1)
+return 0;
+
 if ((guest = virCapabilitiesAddGuest(caps,
  hvm ? hvm : xen,
  info-arch,
@@ -241,9 +245,7 @@ qemudCapsInitGuest(virCapsPtr caps,
 return -1;
 
 if (hvm) {
-/* Check for existance of base emulator */
-if (access(info-binary, X_OK) == 0 
-virCapabilitiesAddGuestDomain(guest,
+if (virCapabilitiesAddGuestDomain(guest,
   qemu,
   NULL,
   NULL,
@@ -263,6 +265,7 @@ qemudCapsInitGuest(virCapsPtr caps,
 return -1;
 
 if (access(/dev/kvm, F_OK) == 0 
+access(/usr/bin/qemu-kvm, X_OK) == 0 
 virCapabilitiesAddGuestDomain(guest,
   kvm,
   /usr/bin/qemu-kvm,
--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] Using Xen config files

2008-08-20 Thread Daniel P. Berrange
On Wed, Aug 20, 2008 at 04:44:04PM +0100, Richard W.M. Jones wrote:
 On Wed, Aug 20, 2008 at 11:35:17AM -0400, Matthew Donovan wrote:
 
 It certainly looks OK, and it seems like the domain should run after
 virDomainCreate.  Have you tried adding a delay of 30 seconds just to
 check if the domain is starting up slowly?

Yep, that debug suggests the libvirt part of creation has completed OK.
I think if anything is going wrong, its going to be in XenD's arena. I'd
recommend looking in /var/log/xen for any further hints of trouble

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 :|

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] Libvirt Xen daemon interaction in Red Hat Enterprise with virtualization

2008-08-20 Thread Daniel P. Berrange
On Wed, Aug 20, 2008 at 10:15:49AM -0700, vaibhav chugh wrote:
 Hi,
 
 I am new to libvirt and I am trying to figure out that how libvert connects
 to Xend in Red Hat Enterprise with virtualization. I read a few posts but
 was not able to find this out.
 
 The eariler versions of Xen were using xen_session_login_with_password()
 function call to connect to Xen daemon but I am not able to find anything
 similar to this in libvirt.

Libvirt talks to XenD using its UNIX socket, and SEXPR interface. This
page gives a quick list of config settings you need in XenD to make it
work with libvirt:

  http://libvirt.org/drvxen.html

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 :|

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] Implement vol delete for disk pools

2008-08-20 Thread Daniel P. Berrange
On Tue, Aug 12, 2008 at 11:58:07PM -0400, Cole Robinson wrote:
 Daniel P. Berrange wrote:
 
  This isn't correct because the target path is not guarenteed to point to
  the master device name /dev/sda1.  The user could have configured it to
  use a stable path such as 
  /dev/disk/by-uuid/4cb23887-0d02-4e4c-bc95-7599c85afc1a
 

 
 Hmm, I couldn't actually get /dev/disk/by-uuid to work. Seems like the
 vol populating code for disks doesn't take into account the the pools
 target path, and just uses the real partition path.

Yes it does - this is what the virStorageBackendStablePath() method call
does.  What I expect is going on is that you merely created a bunch of
partitions, but don't have any filesystems formatted in them. The UUID
stuff is actually the UUID of the filesystem. If you try with a target
path of /dev/disk/by-path  you'll probably have more luck. If it can't
find a stable path under the target you give, it automatically falls
back to the generic /dev/sdXX path.

The following config should show it in action

pool type='disk'
  namemydisk/name
  source
device path='/dev/sda'
/device
  /source
  target
path/dev/disk/by-path/path
  /target
/pool

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 :|

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] Re: virsh/virt-install for dummies

2008-08-20 Thread Jun Koi
On Thu, Aug 21, 2008 at 1:57 AM, Cole Robinson [EMAIL PROTECTED] wrote:
 Jun Koi wrote:
 On Wed, Aug 20, 2008 at 1:23 AM, Cole Robinson [EMAIL PROTECTED] wrote:
 Jun Koi wrote:
 Hmm, yeah we should check that and throw a more clear error message.

 However, the root cause is that your capabilities xml is screwy
 (posted a few messages back.) There is only a domain element
 for x86_64 qemu but you're host arch is reported as i686.

 What libvirt version are you using?
 What virt-install/python-virtinst version are you using?

 I use libvirt-0.4.4-cvs, and virt-install-0.300.3.

 Is kvm installed?

 Yes, but does that really matter? I guess qemu is not even started at this 
 step.


 Yes it does matter because I am trying to figure out why your
 capabilities xml is messed up.

 Here is a piece of the capabilities xml you posted:

  guest
os_typehvm/os_type
arch name='i686'
  wordsize32/wordsize
  emulator/usr/bin/qemu/emulator
  machinepc/machine
  machineisapc/machine
/arch
features
...
/features
  /guest

 This piece here should have a domain element, but since
 it doesn't that means libvirt didn't have executable access
 to /usr/bin/qemu. Is this named differently on Ubuntu?

Though I use Ubuntu, I installed KVM from source code. And the vanilla
QEMU is not installed. And I use the KVM binary for QEMU (so no
accelerator is active in that case)

And there is no /usr/bin/qemu, but only /usr/bin/qemu-system-x86_64 in
KVM installation.


  guest
os_typehvm/os_type
arch name='x86_64'
  wordsize64/wordsize
  emulator/usr/bin/qemu-system-x86_64/emulator
  machinepc/machine
  machineisapc/machine
  domain type='qemu'
  /domain
/arch
features
...
/features
  /guest

 If kvm is installed, then this should have a kvm domain
 entry. Is /dev/kvm present/kvm module loaded? Is
 /usr/bin/qemu-kvm present?

There is nothing like qemu-kvm anywhere in my box. I guess that is
from Fedora package only? (I compiled and installed KVM from source
code)

Thanks,
J

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] Re: qemud/.libs/libvirtd?

2008-08-20 Thread Jun Koi
On Wed, Aug 20, 2008 at 10:39 PM, Richard W.M. Jones [EMAIL PROTECTED] wrote:
 On Wed, Aug 20, 2008 at 08:22:00PM +0900, Jun Koi wrote:
 Ah, that is so confused, the way to name files here.

 So if qemu/.libs/libvirtd is installed into /usr/sbin/libvirtd, where
 qemud/libvirtd is installed???

 It isn't installed anywhere.

 (It seems only qemud/libvirtd works for me)

 This is a libtool thing.  Admittedly quite horrible and counter-
 intuitive, but using libtool arguably beats trying to work out how
 shared libraries are created on Windows / HP-UX / AIX / CP/M / etc.
 which is what libtool gives us.

 You can find out plenty more in the libtool manual:

  
 http://www.gnu.org/software/libtool/manual/libtool.html#index-g_t_0040file_007b_0040value_007bobjdir_007d_007d-subdirectory-26


OK, but now running /usr/sbin/libvirtd fails ( ... failed to connect
to the hypervisor), meanwhile qemud/libvirtd works for me. What
should I do now to run libvirtd???

Thanks,
Jun

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] pthread_sigmask undefined reference error

2008-08-20 Thread Jun Koi
Hi,

The latest cvs version has an error when compiling:

make[3]: Entering directory `/home/jun/projects/libvirt-0821/src'
/bin/bash ../libtool --tag=CC   --mode=link gcc   -g -O2 -Wall
-Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings
-Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls
-Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fasynchronous-unwind-tables-o virsh virsh-console.o
virsh-util-lib.o virsh-virsh.o -Wall -Wformat -Wformat-security
-Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow
-Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes
-Winline -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fasynchronous-unwind-tables  libvirt.la
../gnulib/lib/libgnu.la
gcc -g -O2 -Wall -Wformat -Wformat-security -Wmissing-prototypes
-Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align
-Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline
-Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fasynchronous-unwind-tables -o .libs/virsh
virsh-console.o virsh-util-lib.o virsh-virsh.o -Wall -Wformat
-Wformat-security -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings
-Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls
-Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fasynchronous-unwind-tables  ./.libs/libvirt.so
../gnulib/lib/.libs/libgnu.a
./.libs/libvirt.so: undefined reference to `pthread_sigmask'
collect2: ld returned 1 exit status
make[3]: *** [virsh] Error 1
make[3]: Leaving directory `/home/jun/projects/libvirt-0821/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/jun/projects/libvirt-0821/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jun/projects/libvirt-0821'
make: *** [all] Error 2


It seems I lack a particular library??


Thanks,
Jun

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list