Re: [libvirt] [PATCH] Disable IPv6 socket auto-binding to IPv4 socket

2009-11-12 Thread Daniel Veillard
On Wed, Nov 11, 2009 at 05:52:03PM +, Daniel P. Berrange wrote: Sometimes getaddrinfo returns IPv4 addresses before IPv4 addresses. IPv4 addresses before IPv6 if I understand correctly :-) IPv6 sockets default to attempting to bind to IPv4 addresses too. So if the IPv4 address is

Re: [libvirt] [PATCH] Exclude numactl on s390[x]

2009-11-12 Thread Daniel Veillard
On Wed, Nov 11, 2009 at 06:08:58PM +, Daniel P. Berrange wrote: The numactl package is not applicable for s390[x] arches, so do not enable it as a build dep. * libvirt.spec.in: Exclude numactl on s390[x] --- libvirt.spec.in |4 1 files changed, 4 insertions(+), 0 deletions(-)

Re: [libvirt] [PATCH] Fix error handling in qemuMonitorOpen

2009-11-12 Thread Daniel Veillard
On Thu, Nov 12, 2009 at 06:43:46AM +0900, Ryota Ozaki wrote: * src/qemu/qemu_monitor.c: add error check for qemuMonitorOpenXXX --- src/qemu/qemu_monitor.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index

[libvirt] [PATCH] Remove capng_lock() call when spawning LXC container init process

2009-11-12 Thread Daniel P. Berrange
The capng_lock() call sets the SECURE_NO_SETUID_FIXUP and SECURE_NOROOT bits on the process. This prevents the kernel granting capabilities to processes with an effective UID of 0, or with setuid programs. This is not actually what we want in the container init process. It should be allowed to run

Re: [libvirt] [PATCH] LXC implement missing lxcDomainInterfaceStats (domifstat)

2009-11-12 Thread Daniel P. Berrange
On Fri, Nov 06, 2009 at 08:33:37AM +0900, Ryota Ozaki wrote: Most part of code is just copied from qemu_driver.c. * src/lxc/lxc_driver.c: add lxcDomainInterfaceStats --- src/lxc/lxc_driver.c | 62 +- 1 files changed, 61 insertions(+), 1

Re: [libvirt] Interface script for qemu/kvm determinately fails?

2009-11-12 Thread Daniel P. Berrange
On Tue, Nov 10, 2009 at 07:03:53PM +0900, Ryota Ozaki wrote: Hi, I have a question about interface script (e.g., qemu-ifup) for qemu/kvm. qemu/kvm is dropped its all capabilities by libcap-ng before executed. So the script that is executed by qemu/kvm will fail if it executes privileged

Re: [libvirt] VirtualBox and windows.

2009-11-12 Thread Daniel P. Berrange
On Sat, Nov 07, 2009 at 07:55:05AM -0600, Varghese Mathew wrote: Does libvirt support running a virtualbox vm on windows.. ? Is there any limitations with this, vs. a linux environment? In theory the libvirt VirtualBox driver could be made to compile on Windows since the VirtualBox API is

Re: [libvirt] stat() vs. access()

2009-11-12 Thread Daniel P. Berrange
On Sun, Nov 08, 2009 at 12:52:35AM +0100, Maximilian Wilhelm wrote: Hi! While discussing some code with Matthias, we stumbled across many occurances of stat() calls within the libVirt code (virFileExists() for example) which could be implemented in a cheaper way when using access() instead

Re: [libvirt] kvm network modes

2009-11-12 Thread Daniel P. Berrange
On Tue, Nov 10, 2009 at 06:38:00AM +0300, Rakotomandimby Mihamina wrote: 11/09/2009 12:06 PM, Rakotomandimby Mihamina: Would you now some doecumentation on non NATing configuration? I would like to give my guests public IP adresses. I create my guests using: virt-install --connect

Re: [libvirt] Windows VM doesn't start as Linux one does

2009-11-12 Thread Daniel P. Berrange
On Wed, Nov 11, 2009 at 06:56:37PM +0100, Daniel Huhardeaux wrote: My start script -which started without any problem my XPHome VM- is: #!/bin/bash AUDIO=es1370 VGA=std sudo /usr/bin/kvm -localtime -cdrom /dev/scd0 -boot c -hda /media/XP/vdisk.img -hdb /media/XP/vdisk1.img -m 512

[libvirt] make install fails, missing HTML files

2009-11-12 Thread Thomas Treutner
Hi, I'm not sure if this is a bug or if I'm missing some tools: When doing a fresh git clone ./autogen.sh, make install fails because it complains about some missing HTML doc files. # ./autogen.sh .. configure: Libraries configure: configure: libxml: -I/usr/include/libxml2 -lxml2

Re: [libvirt] make install fails, missing HTML files

2009-11-12 Thread Daniel P. Berrange
On Thu, Nov 12, 2009 at 12:30:22PM +0100, Thomas Treutner wrote: Hi, I'm not sure if this is a bug or if I'm missing some tools: When doing a fresh git clone ./autogen.sh, make install fails because it complains about some missing HTML doc files. # ./autogen.sh .. configure:

Re: [libvirt] Windows VM doesn't start as Linux one does

2009-11-12 Thread Daniel Huhardeaux
Daniel P. Berrange a écrit : Hi Daniel, On Wed, Nov 11, 2009 at 06:56:37PM +0100, Daniel Huhardeaux wrote: My start script -which started without any problem my XPHome VM- is: #!/bin/bash AUDIO=es1370 VGA=std sudo /usr/bin/kvm -localtime -cdrom /dev/scd0 -boot c -hda /media/XP/vdisk.img

Re: [libvirt] [PATCH 0/2] Fix xen domain listing

2009-11-12 Thread Daniel P. Berrange
On Fri, Oct 09, 2009 at 10:35:47AM +0100, Daniel P. Berrange wrote: These patches are a re-post of Jonas Eriksson's work from a couple of months ago, that we mistakenly forgot to commit. The first patch is unchanged, apart from being adjusted for new source code layout. The second patch is

Re: [libvirt] make install fails, missing HTML files

2009-11-12 Thread Daniel Veillard
On Thu, Nov 12, 2009 at 11:34:13AM +, Daniel P. Berrange wrote: On Thu, Nov 12, 2009 at 12:30:22PM +0100, Thomas Treutner wrote: Hi, I'm not sure if this is a bug or if I'm missing some tools: When doing a fresh git clone ./autogen.sh, make install fails because it complains

Re: [libvirt] [PATCH] Fix save and restore with non-privileged guests and SELinux

2009-11-12 Thread Jamie Strandboge
On Wed, 11 Nov 2009, Daniel P. Berrange wrote: +typedef int (*virSecurityDomainRestoreSavedStateLabel) (virConnectPtr conn, +const char *savefile); ... +static int +SELinuxRestoreSavedStateLabel(virConnectPtr conn, +

Re: [libvirt] [PATCH] Fix save and restore with non-privileged guests and SELinux

2009-11-12 Thread Daniel P. Berrange
On Thu, Nov 12, 2009 at 06:48:29AM -0600, Jamie Strandboge wrote: On Wed, 11 Nov 2009, Daniel P. Berrange wrote: +typedef int (*virSecurityDomainRestoreSavedStateLabel) (virConnectPtr conn, +const char *savefile); ... +static int

[libvirt] libvirt strange behavior possibly bug with version 0.7.2

2009-11-12 Thread Ricardo Mendes
import libvirt con=libvirt.open('xen:///') libvirt.getVersion() 7002 dom=con.defineXML('domain type=xennamertiago_test2/nameclock offset=utc/vcpu8/vcpuon_poweroffrestart/on_poweroffdevicesdisk device=disk type=filesource file=/images/SLC-4-x86.img/driver name=file/target bus=xen

Re: [libvirt] Windows VM doesn't start as Linux one does

2009-11-12 Thread Daniel Huhardeaux
Daniel P. Berrange a écrit : [...] The most likely problem here is that the libvirt args have acpi turned off. Add the 'acpi/' element within features in the libvirt XML. That should get rid of the '-no-acpi' flag libvirt added. Yes, that did the trick, thanks! One more likely problem here

[libvirt] [PATCH] Support for SATA Disks in virDomainDiskBus

2009-11-12 Thread pritesh
Hi All, I have just added support for SATA Disks in virDomainDiskBus and the patch for same is as below. Regards, Pritesh commit 9d43b33fdd595db45d943d074fe6a071fe9cde8f Author: pritesh prit...@krishna.(none) Date: Thu Nov 12 14:00:50 2009 +0100 libvirt: Support for SATA Harddisks. diff

Re: [libvirt] [PATCH] LXC implement missing lxcDomainInterfaceStats (domifstat)

2009-11-12 Thread Daniel Veillard
On Fri, Nov 06, 2009 at 08:33:37AM +0900, Ryota Ozaki wrote: Most part of code is just copied from qemu_driver.c. * src/lxc/lxc_driver.c: add lxcDomainInterfaceStats --- src/lxc/lxc_driver.c | 62 +- 1 files changed, 61 insertions(+), 1

Re: [libvirt] [PATCH] Add virConnectGetLibvirtVersion API

2009-11-12 Thread Cole Robinson
On 11/12/2009 06:49 AM, Daniel P. Berrange wrote: On Mon, Nov 02, 2009 at 03:52:28PM -0500, Cole Robinson wrote: Hi all, The attached patch adds a new API call for retrieving the libvirt version used by a connection: virConnectGetLibvirtVersion. Without this, there is currently no way to

Re: [libvirt] [PATCH] Support for SATA Disks in virDomainDiskBus

2009-11-12 Thread Daniel Veillard
On Thu, Nov 12, 2009 at 02:17:41PM +0100, pritesh wrote: Hi All, I have just added support for SATA Disks in virDomainDiskBus and the patch for same is as below. Hum, I'm surprized, it's just added in the emuns and the list, but no actual code seems affected in your patch ... I'm

Re: [libvirt] [PATCH] Support for SATA Disks in virDomainDiskBus

2009-11-12 Thread pritesh
Hi Daniel, I have just added support for SATA Disks in virDomainDiskBus and the patch for same is as below. Hum, I'm surprized, it's just added in the emuns and the list, but no actual code seems affected in your patch ... I'm missing something :-) In target dev='sda' bus='sata'/ tag,

Re: [libvirt] [PATCH] Support for SATA Disks in virDomainDiskBus

2009-11-12 Thread Daniel Veillard
On Thu, Nov 12, 2009 at 03:34:22PM +0100, pritesh wrote: Hi Daniel, I have just added support for SATA Disks in virDomainDiskBus and the patch for same is as below. Hum, I'm surprized, it's just added in the emuns and the list, but no actual code seems affected in your patch ...

Re: [libvirt] make install fails, missing HTML files

2009-11-12 Thread Thomas Treutner
On Thursday 12 November 2009 13:47:32 Daniel Veillard wrote: On Thu, Nov 12, 2009 at 11:34:13AM +, Daniel P. Berrange wrote: You are missing the XHTML DTDs on your system. On Fedora/RHEL this is in the RPM called xhtml1-dtds-1.0-20020801.4.noarch Note that it should not be a hard

[libvirt] [PATCH 1/5] Fix formatting of XML for an inactive guest

2009-11-12 Thread Daniel P. Berrange
If the virDomainDefPtr object has an 'id' of -1, then forcably set the VIR_DOMAIN_XML_INACTIVE flag to ensure generated XML does not include any cruft from the previously running guest such as console PTY path, or VNC port. * src/conf/domain_conf.c: Set VIR_DOMAIN_XML_INACTIVE if def-id is -1.

[libvirt] [PATCH 2/5] Fix race condition in HAL driver startup

2009-11-12 Thread Daniel P. Berrange
There is a race condition in HAL driver startup where the callback can get triggered before we have finished startup. This then causes a deadlock in the driver. * src/node_device/node_device_hal.c: RElease driver lock before registering DBus callbacks --- src/node_device/node_device_hal.c |

[libvirt] [PATCH 3/5] Fix check for existance of cgroups at creation

2009-11-12 Thread Daniel P. Berrange
In the scenario where the cgroups were mounted but the particular group did not exist, and the caller had not requested auto-creation, the code would fail to return an error condition. This caused the lxc_controller to think the cgroup existed, and it then later failed when attempting to use it *

[libvirt] [PATCH 4/5] Fix incorrect variable passed to LXC event callback

2009-11-12 Thread Daniel P. Berrange
The wrong variable was being passed in with the LXC event callback resulting in a later deadlock or crash * src/lxc/lxc_driver.c: Pass 'vm' instead of 'driver' to event callback --- src/lxc/lxc_driver.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH 5/5] Check that domain is running when starting console

2009-11-12 Thread Daniel P. Berrange
The 'virsh console' command did not check if the domain was already running before attempting to fetch the XML and extract the console PTY path. This caused a slightly unhelpful / misleading error message for the user. The explicit check ensures the user gets an explicit 'domain is not running'

Re: [libvirt] make install fails, missing HTML files

2009-11-12 Thread Matthias Bolte
2009/11/12 Thomas Treutner tho...@scripty.at: On Thursday 12 November 2009 13:47:32 Daniel Veillard wrote: On Thu, Nov 12, 2009 at 11:34:13AM +, Daniel P. Berrange wrote: You are missing the XHTML DTDs on your system. On Fedora/RHEL this is in the RPM called  

Re: [libvirt] make install fails, missing HTML files

2009-11-12 Thread Daniel P. Berrange
On Thu, Nov 12, 2009 at 04:01:39PM +0100, Matthias Bolte wrote: 2009/11/12 Thomas Treutner tho...@scripty.at: On Thursday 12 November 2009 13:47:32 Daniel Veillard wrote: On Thu, Nov 12, 2009 at 11:34:13AM +, Daniel P. Berrange wrote: You are missing the XHTML DTDs on your system. On

Re: [libvirt] Re: [PATCH] Implement finer grained migration control for Xen

2009-11-12 Thread Daniel Veillard
On Sat, Nov 07, 2009 at 03:26:15AM +0100, Maximilian Wilhelm wrote: Anno domini 2009 Daniel Veillard scripsit: [persistent migration for Xen] Yes adding a different error with a clear semantic so that the management code can understand the current situation and not assume the domain in

Re: [libvirt] libvirt strange behavior possibly bug with version 0.7.2

2009-11-12 Thread Dan Kenigsberg
On Wed, Nov 11, 2009 at 07:48:41PM +0100, Ricardo Mendes wrote: import libvirt con=libvirt.open('xen:///') libvirt.getVersion() 7002 dom=con.defineXML('domain type=xennamertiago_test2/nameclock offset=utc/vcpu8/vcpuon_poweroffrestart/on_poweroffdevicesdisk device=disk type=filesource

Re: [libvirt] [PATCH] Add virConnectGetLibvirtVersion API

2009-11-12 Thread Cole Robinson
On 11/02/2009 03:52 PM, Cole Robinson wrote: Hi all, The attached patch adds a new API call for retrieving the libvirt version used by a connection: virConnectGetLibvirtVersion. Without this, there is currently no way to determine the libvirt version of a remote qemu connection for example.

Re: [libvirt] make install fails, missing HTML files

2009-11-12 Thread Daniel Veillard
On Thu, Nov 12, 2009 at 03:52:38PM +0100, Thomas Treutner wrote: On Thursday 12 November 2009 13:47:32 Daniel Veillard wrote: On Thu, Nov 12, 2009 at 11:34:13AM +, Daniel P. Berrange wrote: You are missing the XHTML DTDs on your system. On Fedora/RHEL this is in the RPM called

Re: [libvirt] udev node device backend

2009-11-12 Thread Daniel P. Berrange
On Wed, Nov 11, 2009 at 05:06:18PM -0500, Dave Allan wrote: From 94d99c19668d3c804c84ff878023b0f93560dc81 Mon Sep 17 00:00:00 2001 From: David Allan dal...@redhat.com Date: Fri, 16 Oct 2009 16:52:40 -0400 Subject: [PATCH 1/6] Add several fields to node device capabilities ---

Re: [libvirt] make install fails, missing HTML files

2009-11-12 Thread Daniel Veillard
On Thu, Nov 12, 2009 at 03:03:49PM +, Daniel P. Berrange wrote: On Thu, Nov 12, 2009 at 04:01:39PM +0100, Matthias Bolte wrote: 2009/11/12 Thomas Treutner tho...@scripty.at: On Thursday 12 November 2009 13:47:32 Daniel Veillard wrote: On Thu, Nov 12, 2009 at 11:34:13AM +, Daniel

[libvirt] [PATCH 0/4] AppArmor updates

2009-11-12 Thread Jamie Strandboge
Hi, The following patchset contains various cleanups for the AppArmor driver. It assumes that the patch contained in the email with the following subject is already applied: [libvirt] [PATCH] fix virt-aa-helper failure when host arch and os.type arch are different This patch was ACKed but

Re: [libvirt] [PATCH 1/4] AppArmor updates

2009-11-12 Thread Jamie Strandboge
On Thu, 12 Nov 2009, Jamie Strandboge wrote: 1_aa_profile_updates.patch: Adds pulseaudio, alsa and preliminary save/restore to the example apparmor abstraction. Also allows libvirtd access to inet dgram, inet6 dgram, inet6 stream and /usr/lib/libvirt/*. -- Jamie Strandboge |

Re: [libvirt] [PATCH 2/4] AppArmor updates

2009-11-12 Thread Jamie Strandboge
On Thu, 12 Nov 2009, Jamie Strandboge wrote: 2_aa_require_absolute_path.patch: Require absolute path for dynamic added files. This is required by AppArmor and conveniently prevents adding tcp consoles to the profile. This fixes https://launchpad.net/bugs/460271. -- Jamie Strandboge

Re: [libvirt] [PATCH 3/4] AppArmor updates

2009-11-12 Thread Jamie Strandboge
On Thu, 12 Nov 2009, Jamie Strandboge wrote: 3_aa_deny_write_to_readonly.patch: Suppress confusing and misleading apparmor denied message when kvm/qemu tries to open a libvirt specified readonly file (such as a cdrom) with write permissions. libvirt uses the readonly attribute for the

Re: [libvirt] [PATCH 4/4] AppArmor updates

2009-11-12 Thread Jamie Strandboge
On Thu, 12 Nov 2009, Jamie Strandboge wrote: 4_aa_driver_cleanups.patch: Implements all changes requested by DV except for getting rid of readlink(). I can't use virFileResolveLink() because it lstat()s the file and uses st.st_size to create a buffer. Unfortunately, running lstat() on

[libvirt] [PATCH] Fix initscript to check daemon pidfile

2009-11-12 Thread Daniel P. Berrange
The libvirtd initscript could get confused between the system and session instances of the daemon. To avoid this it is neccessary to check the pidfile explicitly. * daemon/libvirtd.init.in: Always check the pidfile of the system daemon to avoid confusion with the session daemons ---

Re: [libvirt] [PATCH 4/5] Fix incorrect variable passed to LXC event callback

2009-11-12 Thread Ryota Ozaki
On Fri, Nov 13, 2009 at 12:00 AM, Daniel P. Berrange berra...@redhat.com wrote: The wrong variable was being passed in with the LXC event callback resulting in a later deadlock or crash * src/lxc/lxc_driver.c: Pass 'vm' instead of 'driver' to event  callback ---  src/lxc/lxc_driver.c |    5

Re: [libvirt] [PATCH 3/5] Fix check for existance of cgroups at creation

2009-11-12 Thread Ryota Ozaki
On Fri, Nov 13, 2009 at 12:00 AM, Daniel P. Berrange berra...@redhat.com wrote: In the scenario where the cgroups were mounted but the particular group did not exist, and the caller had not requested auto-creation, the code would fail to return an error condition. This caused the

Re: [libvirt] Interface script for qemu/kvm determinately fails?

2009-11-12 Thread Ryota Ozaki
On Thu, Nov 12, 2009 at 8:20 PM, Daniel P. Berrange berra...@redhat.com wrote: On Tue, Nov 10, 2009 at 07:03:53PM +0900, Ryota Ozaki wrote: Hi, I have a question about interface script (e.g., qemu-ifup) for qemu/kvm. qemu/kvm is dropped its all capabilities by libcap-ng before executed. So

Re: [libvirt] [PATCH] Remove capng_lock() call when spawning LXC container init process

2009-11-12 Thread Ryota Ozaki
On Thu, Nov 12, 2009 at 8:05 PM, Daniel P. Berrange berra...@redhat.com wrote: The capng_lock() call sets the SECURE_NO_SETUID_FIXUP and SECURE_NOROOT bits on the process. This prevents the kernel granting capabilities to processes with an effective UID of 0, or with setuid programs. This is

Re: [libvirt] udev node device backend

2009-11-12 Thread Daniel Veillard
On Thu, Nov 12, 2009 at 04:11:08PM -0500, Dave Allan wrote: Okay I have finally applied and pushed the 5 patches, @@ -394,10 +403,20 @@ char *virNodeDeviceDefFormat(virConnectPtr conn, /media_available\n, avl ? 1 : 0);

[libvirt] device type 'interface' cannot be attached

2009-11-12 Thread Gerry Reno
I'm using libvirt 0.6.2 on F11 x86_64 and CPU supports hw virtualization. When I try to do 'virsh attach-interface ...' I get an error that the function is not supported by the hypervisor device type 'interface' cannot be attached. Is this command not supported? Or is there something