[libvirt] Ability to nice KVM processes

2008-09-09 Thread Henri Cook
Hey all,

I'd quite like the ability to nice my KVM process, on a home basis this
stops my Windows VM locking up my linux desktop when it's under load (or
at least limits it) and in a commercial setting it might be nice to
offer CPU priority to other customers or company backup-services over
customer VPS instances for example.

How does it sound? Any thoughts?

A quick chat in #virt revealed that a method for adding generic KVM
options has been under discussion for ages - I thought i'd throw my two
cents in, what about some sort of expression with variables like:

cmdstring{cmd} {options}/cmdstring (default)

for my nice proposition you could:

cmdstring/usr/bin/nice {cmd} {options}/cmdstring


Obviously people could use this to add conflicting options which is
concerning but perhaps that should be their own lookout - it seems to be
a fairly advanced request.

Thanks,

Henri

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


Re: [libvirt] Ability to nice KVM processes

2008-09-09 Thread Henri Cook
A good news - sorry I wasn't aware of the current stance on arbitrary
parameters and can say I completely agree with it.

Scheduler Parameters API sounds interesting - i'll see if I can find
time to look into it - if there's anyone who already knows how it works
that sees this as a quick patch though, massive points

Henri

Daniel P. Berrange wrote:
 On Tue, Sep 09, 2008 at 10:23:59PM +0100, Henri Cook wrote:
   
 Hey all,

 I'd quite like the ability to nice my KVM process, on a home basis this
 stops my Windows VM locking up my linux desktop when it's under load (or
 at least limits it) and in a commercial setting it might be nice to
 offer CPU priority to other customers or company backup-services over
 customer VPS instances for example.

 How does it sound? Any thoughts?

 A quick chat in #virt revealed that a method for adding generic KVM
 options has been under discussion for ages - I thought i'd throw my two
 cents in, what about some sort of expression with variables like:
 

 A method for adding arbitrary KVM options will never be merged in
 libvirt

   
 cmdstring{cmd} {options}/cmdstring (default)

 for my nice proposition you could:

 cmdstring/usr/bin/nice {cmd} {options}/cmdstring
 

 The intent of libvirt is to provide APIs which can be used across all
 hypervisors. Taking the 'nice' example, this is really a schedular
 parameter. If we added ability to set 'nice -20' in the XML for KVM,
 there is no way we could possibly implement this for Xen. 

 So the goal is to find a consistent API representation. Fortunately we
 do already have a 'schedular parameters' API in libvirt - we simply
 need to decide how to implement this for KVM - a 'nice' setting is
 certainly one schedular tunable we'd likely want to support.

 So if someone wants to implenment the schedular parameters driver API
 for KVM patches welcomed... 

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


Re: [libvirt] How does virt-manager send shutdown?

2008-08-01 Thread Henri Cook

Bryan Kearney wrote:
How does virt-manager send shutdown to guests? Does it depend on if 
you are running kvm or xen? I have been building images with acpid 
enabled and acpi=force on the command line. After upgrading to f9 and 
running kvm my images no longer respond to shutdown. Is there a tweak 
which I have missed?


- bk

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

Hi Bryan,

What version of KVM does this now mean you are running?

Rgds,

Henri

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


[libvirt] Web Interface - LibVirt Communication?

2008-07-09 Thread Henri Cook

Hi,

I want to write a web tool that lets me administer my cluster from one 
location (including operations that things like virt-manager don't 
provide) - what's the proper way of achieving this? Can i communicate 
over TCP with libvirt on each server (is this documented?) or should I 
be trying to get my web app to auth and run virsh commands over SSH?


Thanks.

Henri

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


Re: [Libvir] Wiki Pages?

2008-04-24 Thread Henri Cook
Brilliant, I really like the look of the site now! I look forward to
contributing in the future

Henri

Daniel Veillard wrote:
 On Mon, Apr 07, 2008 at 04:03:25PM +0100, Henri Cook wrote:
   
 On a different tack - what about making some Wiki pages, or the pages on
 the main site wiki-integrated? I would love to add more info for KVM
 users to the XML format page, there were a lot of things i had to trial
 and error figure out myself when importing a) DomUs from a past Xen
 Install and b) DomUs from kvm command-line only setups
 

   As part of the Web site update/cleanup by Dan, there is now a 
 wiki for libvirt, see http://wiki.libvirt.org/ it's linked from the
 main site. 
   Tell us if there is any problem, 

thanks,

 Daniel

   

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


Re: [Libvir] RFC: get/set properties

2008-04-15 Thread Henri Cook
My first thought as a layman is that libvirt should only contain
information related to the actual running of the virtual machine i.e.
not things that might concern say, customer data (this may not be your
use case).

I would say that's up to the end user to manage with their own
databases, cross referenced with a virtual machine name or similar
unique identifier.

I'd be interested to hear what those who've actually contributed to the
project think though! :p

Henri

Ryan Scott wrote:

   I'd like to get some comments on the following...

   We would like to use libvirt to store some properties related to a
 domain.  This can be done by adding a simple get/set API as follows:

 /*
  * Domain property get/set interfaces
  *
  * For GetProp, the return value must be freed by the caller.
  */
 char *  virDomainGetProp(virDomainPtr domain,
 const char *propName);

 int virDomainSetProp(virDomainPtr domain,
 const char *propName,
 const char *value);


   Sample command-line usage:

 virsh # setprop solaris-pv-0 foo bar

 virsh # setprop solaris-pv-0 blah 3

 virsh # getprop solaris-pv-0 foo
 foo: bar

   The XML would look something like this:

 virsh # dumpxml solaris-pv-0
 domain type='xen' id='-1'
 [ snip ]
   properties
 blah value=3/
 foo value=bar/
   /properties
 /domain

   Looking at the Xen code, I'll need to do a bit of work on that API
 before I can implement this.  I don't know how well this will fit into
 the other hypervisors that Libvirt supports, so I'll leave those
 implementations up to someone else :)

   Any thoughts?

 -Ryan

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

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


Re: [Libvir] modele1000/model - Specifying model in XML Configs

2008-04-08 Thread Henri Cook
I've made a hack for this in the meantime that adds the model/model
option to the interface section and allows me to pass in any string
for addition - since I really wanted this functionality. Obviously this
means i'm now compiling my Ubuntu package from source which isn't ideal,
it'll probably get overwritten by apt at any moment :o

Also, i got in a bit of a pickle last night which I had to reboot to fix:

[EMAIL PROTECTED]:~# /usr/sbin/libvirtd -d
libvir: QEMU error : cannot create bridge 'virbr0' : File exists
Failed to autostart network 'default': cannot create bridge 'virbr0' :
File exists

Is there a way to fix this without rebooting? ifconfig virbr0 0.0.0.0
down  brctl delbr virbr0 - doesn't seem to be enough, what did I miss?

On the model options - an error message does seem like the best
option: with model=foo in the -net options

qemu: Unsupported NIC: foo

I'd love to put all that in myself but my C-fu is seriously limited - I
can only do simple work without more time to learn things properly, like
adding things to the XML based on all the previous examples *g*

Cheers,

Henri

Daniel Veillard wrote:
 On Tue, Apr 08, 2008 at 09:05:41AM +0100, Richard W.M. Jones wrote:
   
 On Mon, Apr 07, 2008 at 10:51:56PM +0100, Henri Cook wrote:
 
 I just tried to port a few customers over to this libvirt setup i'm
 hoping to run and I couldn't get their machines started because there's
 no mechanism to specify a model in the XML!

 I know redhat have changed KVM's default driver to e1000, which I think
 is the one I like the most and almost if not all of my VMs use. Ubuntu
 haven't done that yet however!

 Is there a model directive in the latest version? In the works? Just so
 I know which solution I should pursue (updating libvirt or harassing
 ubuntu to change the default)
   
 There isn't a way to select the model, but there ought to be.  In KVM
 64 the following NIC models are supported:

   i82551 i82557b i82559er ne2k_pci pcnet rtl8139 e1000 virtio

 Part of the problem with implementing this will be validating the
 model (unless we just pass the model string directly to qemu which
 could lead to errors).  The documentation suggests running qemu with
 '-net nic,model=?' to list the models, and there is code in
 qemu/hw/pci.c to implement this, but it just doesn't work for me.

 

 Then what happen if you pass a wrong string ? Is there any way to get a
 meaningful error back from qemu and report it. Thet would IMHO be quite
 better than tracking the evolution of the emulation in QEmu, plus the
 added benefit of not being tied to a strict version of QEmu,

 Daniel

   

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


Re: [Libvir] modele1000/model - Specifying model in XML Configs

2008-04-08 Thread Henri Cook
There's nothing in brctl show for virbr0 - br0 still exists but that's
in use (And shouldn't be causing the problem?)

Maybe it's a one off - i'll try to recreate

It could be a patch, maybe, I think bits of it are really bad C (i.e.
hackery at its worst) - i'll make sure it works then see if i can merge
it with source - unless someone who knows more and can do the error
checking beats me too it, it's only about 6 lines

Cheers,

Henri

Richard W.M. Jones wrote:
 On Tue, Apr 08, 2008 at 10:19:02AM +0100, Henri Cook wrote:
   
 I've made a hack for this in the meantime that adds the model/model
 

 You have a patch?

   
 Is there a way to fix this without rebooting? ifconfig virbr0 0.0.0.0
 down  brctl delbr virbr0 - doesn't seem to be enough, what did I miss?
 

 This should be enough to get rid of the bridge, but if not then you
 need to look at the error messages and the output of 'brctl show'.

 Rich.

   

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


Re: [Libvir] modele1000/model - Specifying model in XML Configs

2008-04-08 Thread Henri Cook
Sorry - I tried to make a patch, but it appears it makes libvirtd
segfault (it starts but when i try to use virsh -c qemu:///system create
vm.cfg it segfaults).

Also - when building my own copy of libvirt - I can connect via virsh -c
qemu:///system, but just 'virsh' says it cannot connect to the
hypervisor - any idea what could cause that? I'm root at the time

As I said, my C-fu is weak - it's probably not useable, if anyone feels
really generous i'd appreciate some criticism, otherwise probably best
if one of you guys made it :p

I think for the meantime i'm going to hard code model=e1000 into my
build, since all my VMs will use that (no windows ones)

Henri

Richard W.M. Jones wrote:
 On Tue, Apr 08, 2008 at 10:19:02AM +0100, Henri Cook wrote:
   
 I've made a hack for this in the meantime that adds the model/model
 

 You have a patch?

   
 Is there a way to fix this without rebooting? ifconfig virbr0 0.0.0.0
 down  brctl delbr virbr0 - doesn't seem to be enough, what did I miss?
 

 This should be enough to get rid of the bridge, but if not then you
 need to look at the error messages and the output of 'brctl show'.

 Rich.

   

--- libvirt-0.4.0/src/qemu_conf.h	2007-12-04 13:26:35.0 +
+++ libvirt-0.4.0-new/src/qemu_conf.h	2008-04-08 11:08:40.0 +0100
@@ -68,6 +68,7 @@
 
 #define QEMUD_MAC_ADDRESS_LEN 6
 #define QEMUD_OS_TYPE_MAX_LEN 10
+#define	QEMUD_NET_DRIVER_MAX_LEN 10
 #define QEMUD_OS_ARCH_MAX_LEN 10
 #define QEMUD_OS_MACHINE_MAX_LEN 10
 
@@ -90,6 +91,8 @@
 struct qemud_vm_net_def {
 int type;
 unsigned char mac[QEMUD_MAC_ADDRESS_LEN];
+unsigned char model[QEMUD_NET_DRIVER_MAX_LEN]; 
+
 union {
 struct {
 char ifname[BR_IFNAME_MAXLEN];

--- libvirt-0.4.0/src/qemu_conf.c	2007-12-12 13:30:49.0 +
+++ libvirt-0.4.0-new/src/qemu_conf.c	2008-04-08 12:36:02.0 +0100
@@ -605,6 +605,7 @@
 xmlChar *script = NULL;
 xmlChar *address = NULL;
 xmlChar *port = NULL;
+xmlChar *model = NULL;
 
 net-type = QEMUD_NET_USER;
 
@@ -666,6 +667,8 @@
(net-type == QEMUD_NET_ETHERNET) 
xmlStrEqual(cur-name, BAD_CAST script)) {
 script = xmlGetProp(cur, BAD_CAST path);
+} else if (xmlStrEqual(cur-name, BAD_CAST model)) {
+	model = xmlGetProp(cur, BAD_CAST type);
 }
 }
 cur = cur-next;
@@ -822,6 +825,17 @@
 }
 xmlFree(address);
 }
+
+// Model can apply to all interface configurations, should we check for all the known supported model types?
+// Otherwise it's an optional parameter, so no real checking need be done
+if (model != NULL) {
+	int len = 0;
+	if ((len = xmlStrlen(model)) = QEMUD_NET_DRIVER_MAX_LEN) {
+		qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+ _(Interface model type '%s' is too long), model);
+goto error;
+	}		
+}
 
 return 0;
 
@@ -838,6 +852,8 @@
 xmlFree(script);
 if (bridge)
 xmlFree(bridge);
+if (model)
+	xmlFree(model);
 return -1;
 }
 
@@ -1679,13 +1695,27 @@
 int vlan = 0;
 while (net) {
 char nic[100];
+char model[QEMUD_NET_DRIVER_MAX_LEN];
 
-if (snprintf(nic, sizeof(nic), nic,macaddr=%02x:%02x:%02x:%02x:%02x:%02x,vlan=%d,
+			// Model's optional, if it's not set simply set the temporary 'model' variable to ''
+			if (net-model == NULL)
+			{
+snprintf(model, sizeof(model), ,);
+			}
+			else
+			{
+snprintf(model, sizeof(model), ,model=%s,, net-model);
+			}
+			
+if (snprintf(nic, sizeof(nic), nic%smacaddr=%02x:%02x:%02x:%02x:%02x:%02x,vlan=%d,
+			 model,
  net-mac[0], net-mac[1],
  net-mac[2], net-mac[3],
  net-mac[4], net-mac[5],
  vlan) = sizeof(nic))
 goto error;
+
+free(model);
 
 if (!((*argv)[++n] = strdup(-net)))
 goto no_memory;
--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [Libvir] [PATCH] Allow selection of the NIC model in QEMU/KVM

2008-04-08 Thread Henri Cook
What about when the model name doesn't include an underscore? like e1000

H

Richard W.M. Jones wrote:
 This patch allows selection of the NIC model for QEMU/KVM domains.
 The selection is done by adding a model/ element to the XML, as in
 this example:

 interface type='user'
   mac address='00:16:3e:33:b8:d3'/
   model type='ne2k_pci'/
 /interface

 The model type string is only checked to make sure it's a short
 alpha-numeric + underscore, since it seems impractical to extract the
 actual list of supported models.

 If you choose a supported model then QEMU starts up with this extra
 -nic parameter:

   /usr/bin/qemu-kvm -M pc -m 500 -smp 1 -monitor pty \
 -boot c -hda /var/lib/xen/images/rhel51x32kvm.img \
 -net nic,macaddr=00:16:3e:33:b8:d3,vlan=0,model=ne2k_pci -net user,vlan=0 
 \
 -usb -vnc 127.0.0.1:0

 If you choose a non-existant model then you get the error:

   libvir: QEMU error : internal error QEMU quit during monitor startup

 Rich.

   
 

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

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


Re: [Libvir] [PATCH] Allow selection of the NIC model in QEMU/KVM

2008-04-08 Thread Henri Cook
I'm sorry , didn't read the patch properly first!





Richard W.M. Jones wrote:
 This patch allows selection of the NIC model for QEMU/KVM domains.
 The selection is done by adding a model/ element to the XML, as in
 this example:

 interface type='user'
   mac address='00:16:3e:33:b8:d3'/
   model type='ne2k_pci'/
 /interface

 The model type string is only checked to make sure it's a short
 alpha-numeric + underscore, since it seems impractical to extract the
 actual list of supported models.

 If you choose a supported model then QEMU starts up with this extra
 -nic parameter:

   /usr/bin/qemu-kvm -M pc -m 500 -smp 1 -monitor pty \
 -boot c -hda /var/lib/xen/images/rhel51x32kvm.img \
 -net nic,macaddr=00:16:3e:33:b8:d3,vlan=0,model=ne2k_pci -net user,vlan=0 
 \
 -usb -vnc 127.0.0.1:0

 If you choose a non-existant model then you get the error:

   libvir: QEMU error : internal error QEMU quit during monitor startup

 Rich.

   
 

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

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


[Libvir] Zombie KVMs?

2008-04-08 Thread Henri Cook
Hey all,

Does anyone ever see:

root 18628  3.2  0.0  0 0 ?Z17:30   0:40  \_
[kvm] defunct

Zombie copies of KVM under libvirtd? They're unkillable (without
restarting libvirtd) - although libvirt all still functions as normal

Henri

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


Re: [Libvir] Web Interface Question

2008-04-07 Thread Henri Cook
This is why I asked the question! I've already started developing my own
which is a pain, i've got it functional and doing
reboots/startup/shutdown - i'm really annoyed i couldn't find oVirt when
I was googling; Enomalism I found but for some reason discounted - i'll
take another look at them both now but i'm not sure which route i'll take.

Cheers for getting back to me,

Henri

Daniel Veillard wrote:
 On Sat, Apr 05, 2008 at 09:35:33PM +0100, Henri Cook wrote:
   
 Hey guys,

 I'm designing a web interface for libvirt so that my customers can
 manage their DomUs - unless you know of a good one that already exists???

 I'm thinking that the best way to run this is have the web server
 connected to libvirtd - but I can't find any documentation about the API
 it presents - can you help?

 I considered giving the web server access to virsh and parsing that, but
 that has obvious security implications as it would need root/sudo access
 

   There is also Ovirt which is in development
 http://ovirt.org/

 and enomalism
 http://www.enomalism.com/

 I guess the problem is not to find a web interface for managing the domains,
 but to select the one with the features you need, or help finish one of the
 open source tools already around. Restarting from scratch at this point
 sounds a bit like wasted time, no ;-) ?


 Daniel

   

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


Re: [Libvir] Web Interface Question

2008-04-07 Thread Henri Cook
Thanks, I think the way forward for me is as follows:

- I've had to discard oVirt and Enomalism, thanks for letting me know
they exist on here/IRC. oVirt seems to be a complete solution that would
require me to reconfigure many of my existing vms and Enomalism is just
inappropriate for VPS hosts and more company-with-lots-of-machines
centric it appears.

- I'm really after something that can slot into my existing setup of
'/home/virt/domains/Machine/vm.cfg' (a name I just chose arbitrarily)
and use the cfg files to provide info about the machine to a user over
the web, then the perl bindings to start/stop/restart.

- So, the perl bindings and a socket with permissions for the web user
or possibly a 'vmadmins' group

- Eventually i hope to package it up into a standalone web server (a-la
webmin) style solution and release it, but i've got to finish my degree
first so that will be months, my customers are my immediate concern and
I have a basic version of the above which can do
shutdowns/reboots/startups in action at the moment.

- It was regrettably necessary to have to have some actions contingent
on things like libvirt error code: 42 i.e. If you try to retrieve a
domain that doesn't exist (and is not defined). I expect these to break
when the ubuntu package maintainers upgrade to 0.4.1 - but i'll have to
deal with that when the time comes

I'll keep hanging out in #virt for as long as i can remember to stay
connected :p

Thanks,

Henri

Richard W.M. Jones wrote:
 On Sat, Apr 05, 2008 at 09:35:33PM +0100, Henri Cook wrote:
   
 I'm designing a web interface for libvirt so that my customers can
 manage their DomUs - unless you know of a good one that already exists???

 I'm thinking that the best way to run this is have the web server
 connected to libvirtd - but I can't find any documentation about the API
 it presents - can you help?
 

 I sort of gathered from IRC that you are using Perl  Dan's Perl
 bindings.  This is the right approach.

 In order to be able to contact libvirtd without needing to run
 anything as root you (may) need to change the permissions on the
 libvirtd socket (normally /var/run/libvirt/libvirt-sock).  If your
 libvirt was configured to use PolicyKit you may also need to edit the
 configuration file /etc/PolicyKit/PolicyKit.conf to allow your web
 server user access to the privilege 'org.libvirt.unix.manage'.

 I would test this out using 'virsh -c ... list' as the web daemon user
 first of all.

 Rich.

   

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


[Libvir] Wiki Pages?

2008-04-07 Thread Henri Cook
On a different tack - what about making some Wiki pages, or the pages on
the main site wiki-integrated? I would love to add more info for KVM
users to the XML format page, there were a lot of things i had to trial
and error figure out myself when importing a) DomUs from a past Xen
Install and b) DomUs from kvm command-line only setups

P.S. Do we say DomU in the libvirt/KVM world? :-)

Thanks,

Henri

Richard W.M. Jones wrote:
 On Mon, Apr 07, 2008 at 03:00:52PM +0100, Richard W.M. Jones wrote:
   
   $ ./test
   libvir: Domain error : invalid domain pointer in virDomainFree
 

 Stranger and stranger is that I cannot reproduce this with libvirt
 from CVS, only with libvirt 0.4.1 in Fedora 8.

 However there is no change in either src/hash.c or src/libvirt.c that
 I can point to which could have fixed this.  So I don't know if this
 bug has really been fixed or is just in hiding (evidence suggests that
 the F8 problem is caused by memory corruption, so this is exactly the
 sort of bug which might just disappear by a simple recompilation).
 Valgrind doesn't see anything.

 Rich.

   

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


Re: [Libvir] Web Interface Question

2008-04-07 Thread Henri Cook
Yes, the perl bindings with 0.4.0 at least often error - e.g. how do I
check whether a domain is online? I could list all the domains or I
could simply try and retrieve the domain by name, if error 42 (the
'unknown' error) comes back then the domain is not online.

Maybe i'm using the perl bindings wrong?

H

Richard W.M. Jones wrote:
 On Mon, Apr 07, 2008 at 04:01:12PM +0100, Henri Cook wrote:
   
 - It was regrettably necessary to have to have some actions contingent
 on things like libvirt error code: 42 i.e. If you try to retrieve a
 domain that doesn't exist (and is not defined). I expect these to break
 when the ubuntu package maintainers upgrade to 0.4.1 - but i'll have to
 deal with that when the time comes
 

 I don't understand this -- do you mean you had to hard-code libvirt
 error numbers into your program?

 Rich.

   

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


Re: [Libvir] Wiki Pages?

2008-04-07 Thread Henri Cook
It sounds great, but is indeed a lot of maintenance. I'd like the chance
to expand the xml section more for KVM users though! Perhaps just a
definitive run down of all the possible XML options in a generic context.

The rest of the project's obviously open source - is the website under a
source tree? Can I come on board as a contributor in some sense and
propose 'patches' for the site?

Henri

Richard W.M. Jones wrote:
 On Mon, Apr 07, 2008 at 11:47:37AM -0400, Daniel Veillard wrote:
   
 My previous experience hosting a Wiki on xmlsoft.org (a.k.a. libvirt.org)
 has been rather painful, admitedly that was a few years ago ...
 I'm not sure what's the best way, hosting yet another wiki or reusing
 an existing one.
 

 Wikis, as you point out, require active management.

 I'm running several low-traffic OCaml wikis (might as well advertise
 them: http://ocaml-tutorial.org/ and http://cocan.org/) with
 reasonable success.  We require authenticated email addresses for all
 editing, a diff of all edits are CC'd daily to subscribers, and we
 have people who act as editors for particular pages / sections of the
 wiki.

 This has controlled spam reasonably successfully.  One Ubuntu
 developer who shall remain nameless turned out to have a sideline in
 blackhat SEO (wiki spamming) and actually signed up with his valid
 email address to spam the wiki.  This was spotted almost instantly and
 he was kicked off.  We had another case where someone signed up using
 http://mailinator.com and set up a http://bugmenot.com account which
 we also found quickly and eliminated.  The daily emailed diffs of the
 whole wiki, plus the ability to roll back a day, basically make any
 long-term wiki spam impossible to carry out (or so we think ...[1])

 The benefits of all this management can be useful, user-driven
 resources, and _if_ carefully structured and edited, this can be
 better than Google + mailing lists or asking the same questions over
 and over on IRC.

 Just my 2p (about $1).

 Rich.

 [1] And if you think of a way, rather than making lots of work for our
 editors by proving it, just email me OK?

   

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


Re: [Libvir] Web Interface Question

2008-04-07 Thread Henri Cook
I'd be very interested in the output, I really enjoy learning languages
by-project although in my case the result isn't often the best way of
doing things :p Maybe it's the way I learn!!

The bonus of python presumably is that you can use the api straight from
a python website, at the moment i'm using PHP (which i know extremely
well and can whack up a website in in no time) to exec() perl scripts
which do the administrative tasks for me.

There's certainly an open source project in here somewhere, something
where sysadmins can slot in a solution with their existing setup without
having to do enormous amounts of reconfiguration - in an operating
system independent manner (even the webserver could be packaged, like
webmin or cpanel)). Glad to hear i'm not the only one out there, let me
know if I can help at all.

Henri

Spencer Parker wrote:
 I am actually in the process of trying to develop one of these in
 Python.  Since I am pretty new to python or programming in general, it
 has been a really good learning experience.  I haven't really gotten
 very far yet...since its all learning about basically everything...its
 been fun.  I have made some basic calls to the API and had the info
 shoved into a MySQL database...but thats about...nothing grand.

 On Mon, Apr 7, 2008 at 12:44 PM, Daniel P. Berrange
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

 On Mon, Apr 07, 2008 at 02:38:17PM +0100, Richard W.M. Jones wrote:
  On Sat, Apr 05, 2008 at 09:35:33PM +0100, Henri Cook wrote:
   I'm designing a web interface for libvirt so that my customers can
   manage their DomUs - unless you know of a good one that
 already exists???
  
   I'm thinking that the best way to run this is have the web server
   connected to libvirtd - but I can't find any documentation
 about the API
   it presents - can you help?
 
  I sort of gathered from IRC that you are using Perl  Dan's Perl
  bindings.  This is the right approach.
 
  In order to be able to contact libvirtd without needing to run
  anything as root you (may) need to change the permissions on the
  libvirtd socket (normally /var/run/libvirt/libvirt-sock).  If your
  libvirt was configured to use PolicyKit you may also need to
 edit the
  configuration file /etc/PolicyKit/PolicyKit.conf to allow your web
  server user access to the privilege 'org.libvirt.unix.manage'.

 PolicyKit is one option - you'd need to edit
 /etc/PolicyKit/PolicyKit.conf
 to add an explicit rule allowing the httpd user access.

 Alternatively you could switch the UNIX socket to use SASL as its auth
 method, and setup a SASL username  password

 There's some docs here

 http://libvirt.org/auth.html

 Dan.
 --
 |: Red Hat, Engineering, Boston   -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/
 http://search.cpan.org/%7Edanberr/ :|
 |: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742
 7D3B 9505 :|

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




 -- 
 Spencer Parker
 ___

 if you can't go to heaven, may you at least die in Ireland.

 ___
 

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

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


Re: [Libvir] Wiki Pages?

2008-04-07 Thread Henri Cook
I'd happily host wiki.libvirt.org or similar for free, it's a bit of a
conversion effort to move the entire site as it exists into a wiki
structure - so maybe it would be progressive i.e. new documentation goes
into the wiki

It would be a lot of admin i'm sure, keeping rubbish posts out - it
would take time to configure, time which I don't unfortunately have at
the moment although will hopefully have in a couple of months. If
someone wants to take it on and finds RHEL4 too restrictive as
described, I can provide a php5/mysql5 web enabled shell for freebies
(perhaps an acknowledgement)

Henri


Daniel Veillard wrote:
 On Mon, Apr 07, 2008 at 05:38:48PM +0100, Richard W.M. Jones wrote:
   
 On Mon, Apr 07, 2008 at 11:47:37AM -0400, Daniel Veillard wrote:
 
 My previous experience hosting a Wiki on xmlsoft.org (a.k.a. libvirt.org)
 has been rather painful, admitedly that was a few years ago ...
 I'm not sure what's the best way, hosting yet another wiki or reusing
 an existing one.
   
 Wikis, as you point out, require active management.

 I'm running several low-traffic OCaml wikis (might as well advertise
 them: http://ocaml-tutorial.org/ and http://cocan.org/) with
 reasonable success.  We require authenticated email addresses for all
 editing, a diff of all edits are CC'd daily to subscribers, and we
 have people who act as editors for particular pages / sections of the
 wiki.

 This has controlled spam reasonably successfully.  One Ubuntu
 developer who shall remain nameless turned out to have a sideline in
 blackhat SEO (wiki spamming) and actually signed up with his valid
 email address to spam the wiki.  This was spotted almost instantly and
 he was kicked off.  We had another case where someone signed up using
 http://mailinator.com and set up a http://bugmenot.com account which
 we also found quickly and eliminated.  The daily emailed diffs of the
 whole wiki, plus the ability to roll back a day, basically make any
 long-term wiki spam impossible to carry out (or so we think ...[1])

 The benefits of all this management can be useful, user-driven
 resources, and _if_ carefully structured and edited, this can be
 better than Google + mailing lists or asking the same questions over
 and over on IRC.
 

 Well if you have maintainance experience, why not ... except libvirt.org
 is a RHEL-4 box, i.e. not the easiest for bleeding edge stuff.
 if you feel this is reasonnable, and won't waste too much time, I agree
 this can be really useful too, I'm fine with the idea.

 Daniel

   

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


[Libvir] modele1000/model - Specifying model in XML Configs

2008-04-07 Thread Henri Cook
Hi guys,

I just tried to port a few customers over to this libvirt setup i'm
hoping to run and I couldn't get their machines started because there's
no mechanism to specify a model in the XML!

I know redhat have changed KVM's default driver to e1000, which I think
is the one I like the most and almost if not all of my VMs use. Ubuntu
haven't done that yet however!

Is there a model directive in the latest version? In the works? Just so
I know which solution I should pursue (updating libvirt or harassing
ubuntu to change the default)

Thanks,

Henri

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


Re: [Libvir] modele1000/model - Specifying model in XML Configs

2008-04-07 Thread Henri Cook
P.S. I'd take even a hack to get this working in the meantime



Henri Cook wrote:
 Hi guys,

 I just tried to port a few customers over to this libvirt setup i'm
 hoping to run and I couldn't get their machines started because there's
 no mechanism to specify a model in the XML!

 I know redhat have changed KVM's default driver to e1000, which I think
 is the one I like the most and almost if not all of my VMs use. Ubuntu
 haven't done that yet however!

 Is there a model directive in the latest version? In the works? Just so
 I know which solution I should pursue (updating libvirt or harassing
 ubuntu to change the default)

 Thanks,

 Henri

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

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


Re: [Libvir] Web Interface Question

2008-04-06 Thread Henri Cook
That sounds quite exciting; is it open source?

I'm looking at build something that works with KVM/Xen but i'm sure many
of the operations are the same; especially for status type, read only
queries.

Do you know if there's anything like an RFC document for libvirtd? What
did you base all your queries off while making the product?

Thanks for getting back to me,

Henri

Shuveb Hussain wrote:
 Hello Henri,

 On Sun, Apr 6, 2008 at 2:05 AM, Henri Cook
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

 Hey guys,

 I'm designing a web interface for libvirt so that my customers can
 manage their DomUs - unless you know of a good one that already
 exists???


 We, from BinaryKarma are the folks who contributed OpenVZ support for
 Libvirt and are experts in the area. We already have a product FluidVM
 that manages Xen and OpenVZ based virtual machines with support for
 Linux Containers and VMWare ESX coming up. FluidVM also ships with a
 browser based interface.

 Currently, there is also VPSCart, a free application built on top of
 the FluidVM platform available where you can create plans and expose
 them on a portal.  customers can then choose and buy any of them.
 Users with the right privileges are automatically provisioned. They
 can login and manage their VPSs. Usage of VPSCart is completely optional.

 FluidVM ships with support for Local and SAN storage as well. You can
 evaluate a fully capable copy of FluidVM for a period of 45 days by
 downloading it from our web site. Here are the details:

 *FluidVM Screenshots:*
 http://www.binarykarma.com/fluidvm_screenshots.php

 *FluidVM Demo Videos:*
 http://www.binarykarma.com/demo.php

 *FluidVM Manuals, free License and User Manuals:*
 http://www.binarykarma.com/download.php

 If you have any further questions, we'll be happy to clarify them.


 Thanks  regards,
 -- 
 Shuveb Hussain
 B I N A R Y K A R M A
 Chennai, India.
 Phone : +91 44-64621656
 Mobile: +91 98403-80386
 http://www.binarykarma.com 

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