Re: [libvirt] [PATCH] fix minor typo

2008-08-15 Thread Daniel P. Berrange
On Fri, Aug 15, 2008 at 10:32:48AM +0900, Atsushi SAKAI wrote:
 Hi, John
 
 Thank you for your suggestion.
 I am looking around the libvirt.pot and found 4 typos additionally.
 I am pushing these fixes.

ACK

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] fail to run virsh

2008-08-15 Thread Daniel P. Berrange
On Thu, Aug 14, 2008 at 05:27:14PM +0900, Jun Koi wrote:
 Hi,
 
 I installed libvirt (cvs version), and can confirm that libvirtd is
 running. However, virsh failed to work. I got the below message when
 running virsh with debugging information.


 # LIBVIRT_DEBUG=1 virsh
 DEBUG: libvirt.c: virInitialize (register drivers)

...

 DEBUG: libvirt.c: do_open (trying driver 5 (remote) ...)
 DEBUG: remote_internal.c: doRemoteOpen (proceeding with name = qemu:///system)
 libvir: Remote error : No such file or directory

This suggests that its not able to connect to the daemon. Are you using the
version of virsh that matches the libvirtd daemon you compiled ? If you
have a pre-built virsh from your distro installed, and then do a CVS build
with a different '--prefix' to configure that could explain this.

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


[libvirt] Re: [ANNOUNCE][RFC] sVirt: Integrating SELinux and Linux-basedvirtualization

2008-08-15 Thread Atsushi SAKAI
Hi, James

  Thank you for posting the announcement.
  This thread is very interesting.
Instead, I understand many things to be dicided.

- Utilize the new hierarchical types being proposed upstream by
  NEC.  (No analysis done yet).
Would you point the following document?


Thanks
Atsushi SAKAI




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


Re: [libvirt] fail to run virsh

2008-08-15 Thread Jun Koi
On Fri, Aug 15, 2008 at 4:21 PM, Daniel P. Berrange [EMAIL PROTECTED] wrote:
 On Thu, Aug 14, 2008 at 05:27:14PM +0900, Jun Koi wrote:
 Hi,

 I installed libvirt (cvs version), and can confirm that libvirtd is
 running. However, virsh failed to work. I got the below message when
 running virsh with debugging information.


 # LIBVIRT_DEBUG=1 virsh
 DEBUG: libvirt.c: virInitialize (register drivers)

 ...

 DEBUG: libvirt.c: do_open (trying driver 5 (remote) ...)
 DEBUG: remote_internal.c: doRemoteOpen (proceeding with name = 
 qemu:///system)
 libvir: Remote error : No such file or directory

 This suggests that its not able to connect to the daemon. Are you using the
 version of virsh that matches the libvirtd daemon you compiled ? If you
 have a pre-built virsh from your distro installed, and then do a CVS build
 with a different '--prefix' to configure that could explain this.

I tried to recompile libvirt cvs again, then got this error:


./.libs/libvirt.so: undefined reference to `xenUnifiedRegister'
./.libs/libvirt.so: undefined reference to `xenUnifiedRegister'
collect2: ld returned 1 exit status
make[3]: *** [virsh] Error 1


I searched around, but dont see how to fix this. (this is on Ubuntu 8.04)

Thank you,
Jun

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


[libvirt] Re: [ANNOUNCE][RFC] sVirt: Integrating SELinux and Linux-basedvirtualization

2008-08-15 Thread James Morris
On Fri, 15 Aug 2008, Atsushi SAKAI wrote:

 Hi, James
 
   Thank you for posting the announcement.
   This thread is very interesting.
 Instead, I understand many things to be dicided.
 
 - Utilize the new hierarchical types being proposed upstream by
   NEC.  (No analysis done yet).
 Would you point the following document?

http://marc.info/?l=selinuxm=121791579130877w=2



-- 
James Morris
[EMAIL PROTECTED]

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


Re: [libvirt] [PATCH] Fix serial console telnet protocol support

2008-08-15 Thread Daniel P. Berrange
On Wed, Aug 13, 2008 at 06:44:28PM +0100, Mark McLoughlin wrote:
 With e.g.:
 
   serial type='tcp'
 source mode='bind' host='127.0.0.1' service=''/
 protocol type='telnet'/
 target port='0'/
   /serial
 
 You currently get:
 
   Unknown option: listen
   qemu: could not open serial device 'telnet:127.0.0.1:,listen'
 
 With the telnet protocol, qemu expects server as an option
 rather than listen.

ACK, but can you also fix the test case for this to match before
committing. We're currently validating that it is 'listen' :-)

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] static ip address

2008-08-15 Thread Daniel P. Berrange
On Tue, Aug 12, 2008 at 05:24:01PM -0400, Daniel Veillard wrote:
 On Tue, Aug 12, 2008 at 03:39:28PM -0400, Daniel Veillard wrote:
  On Tue, Aug 12, 2008 at 06:49:59PM +0200, Olivier Deckmyn wrote:
   On Tue, Aug 12, 2008 at 5:17 PM, Daniel Veillard [EMAIL PROTECTED]wrote:
   
That said I'm working on a new version of the patch which would be 
adequate
  [...]
   Once again, if I can do anything to help, I will.
  
Then please try the following patch, tell me if it works for you, I didn't
  really tried it yet and parallel testing would help.
The things to test are:
  - no crash
  - the network definition is correctly parsed
  - virsh network define and dump still work
  - and IP as provided by dnsmasq as suggested
  in case of mismatches try to grab the full command line used by libvirtd
  for dnsmasq and report it in parallel of the XML file used,
 
   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='' ?

 @@ -1103,6 +1103,8 @@
  2 + /* --listen-address 10.0.0.1 */
  1 + /* --dhcp-leasefile=path */
  (2 * network-def-nranges) + /* --dhcp-range 10.0.0.2,10.0.0.254 */
 +/*  --dhcp-host 01:23:45:67:89:0a,hostname,10.0.0.3 */
 +(2 * network-def-nhosts) +

Using the --dhcp-host option means we can't easily update on the fly, but
this patch doesn't support on the fly updates anyway, so not a huge deal.
In the future we can switch to --dhcp-host-file instead.


ACK to including this.

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] introducing source name (for logical storage pools)

2008-08-15 Thread Daniel Berrange
On Fri, Aug 08, 2008 at 03:17:52PM -0400, David Lively wrote:
   Daniel B proposed having storage pool discovery return a bunch of XML
 storage source elements, rather than full pool elements (which
 contain target-dependent details like the local pool name and device
 or mount path -- things which don't need to be decided unless/until the
 pool is defined).  
 
   I like his suggestion a lot, and I think it addresses the final
 API-definition problem keeping storage pool discovery out of libvirt.
 But ... it doesn't quite work for logical storage pools because those
 are created from the pool name element (which is the same as the
 volume group name).

Yep, I half-expected that format decision to come back  haunt me :-( 

   ???This patch introduces a new source element name, which is
 distinct
 from the pool name.  name is used only by the logical storage
 backend, and represents the volume group name.  For convenience and
 back-compatibility, source name defaults to the pool name if not
 specified when the pool is defined, and pool name defaults to the
 source name if not specified.  There is no requirement that pool and
 source name be the same, though.
 
   While admittedly it seems a little weird, it does allow more
 flexibility (pool name not tied to vol group name), and allows source
 to fully specify a logical pool source, as it does for the other pool
 types[*].  Defaulting the source name from the pool name means all
 existing pool XML definitions continue to work.  Defaulting the pool
 name from the source name is simply a matter of convenience (but perhaps
 a step too far?)
 
   If this is accepted, logical pool discovery can then return a bunch of
 sources like:
sourcenameVolGroup00/name/source
sourcenameVolGroup01/name/source



 
   Please note I'll be on vacation next week (Aug 11-15), so I may not be
 responding until the following week.
 
 Thanks,
 Dave
 
 [*] Well ... almost.  Note that directory pools have a similar issue --
 the source of the pool is given by the target path -- there's no
 source.  I suppose implementing directory pool discovery (for the sake
 of completeness) means addressing this as well, maybe via some similar
 mechanism ...

We already have a sourcedirectory/directory/source element
we use for NFS exports. I didn't bother with it for directory pools
because it'd be duplicating info from the target path, but in retrospect
we should use it for directory pools. 

Perhaps we could even use it for the LVM pools instead of adding a new
name element - eg,  

   sourcedirectory/dev/VolGroup00/directory/source
   sourcedirectory/dev/VolGroup01/directory/source

I don't feel too strongly about this though - either name or directory
in the source would do the job for LVM pools nicely.


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] Fix serial console telnet protocol support

2008-08-15 Thread Mark McLoughlin
On Fri, 2008-08-15 at 10:39 +0100, Daniel P. Berrange wrote:
 On Wed, Aug 13, 2008 at 06:44:28PM +0100, Mark McLoughlin wrote:
 
  With the telnet protocol, qemu expects server as an option
  rather than listen.
 
 ACK, but can you also fix the test case for this to match before
 committing. We're currently validating that it is 'listen' :-)

Thanks, fixed and committed.

Cheers,
Mark.

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


[libvirt] virsh/virt-install for dummies

2008-08-15 Thread Jun Koi
Hi,

I am frustrated searching for a quick-start documentation for virsh,
just to no avail. Any help is greatly appreciated!

Here is what I did:
- Compile and install libvirt, virt-manager, virt-install and
virt-viewer from source code. This is done (on Ubuntu 8.04).
- Now I want to do install a new VM with QEMU or KVM. I got the below
error with virt-install:


# virt-install -c qemu:///system --name jeos2 --ram 500 --file
img.jeos2  --cdrom jeos-8.04.1-jeos-i386.iso
Fri, 15 Aug 2008 19:19:10 ERRORvirConnectOpen() failed
Traceback (most recent call last):
  File /usr/bin/virt-install, line 496, in module
main()
  File /usr/bin/virt-install, line 345, in main
conn = cli.getConnection(options.connect)
  File /usr/lib/python2.5/site-packages/virtinst/cli.py, line 92, in
getConnection
return libvirt.open(connect)
  File /usr/lib/python2.5/site-packages/libvirt.py, line 139, in open
if ret is None:raise libvirtError('virConnectOpen() failed')
libvirtError: virConnectOpen() failed



How to fix this? Perhaps I need to run libvirtd before using virsh???

What frustrates me is that there seems no documentation about this
process at libvirt.org at all (?).

Final question: I have an old QEMU image. How to import it to virsh
script? Is there any easy way to do that?

Thanks,
Jun

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


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

2008-08-15 Thread Jun Koi
On Fri, Aug 15, 2008 at 7:30 PM, Jun Koi [EMAIL PROTECTED] wrote:
 Hi,

 I am frustrated searching for a quick-start documentation for virsh,
 just to no avail. Any help is greatly appreciated!

 Here is what I did:
 - Compile and install libvirt, virt-manager, virt-install and
 virt-viewer from source code. This is done (on Ubuntu 8.04).
 - Now I want to do install a new VM with QEMU or KVM. I got the below
 error with virt-install:


 # virt-install -c qemu:///system --name jeos2 --ram 500 --file
 img.jeos2  --cdrom jeos-8.04.1-jeos-i386.iso
 Fri, 15 Aug 2008 19:19:10 ERRORvirConnectOpen() failed
 Traceback (most recent call last):
  File /usr/bin/virt-install, line 496, in module
main()
  File /usr/bin/virt-install, line 345, in main
conn = cli.getConnection(options.connect)
  File /usr/lib/python2.5/site-packages/virtinst/cli.py, line 92, in
 getConnection
return libvirt.open(connect)
  File /usr/lib/python2.5/site-packages/libvirt.py, line 139, in open
if ret is None:raise libvirtError('virConnectOpen() failed')
 libvirtError: virConnectOpen() failed



 How to fix this? Perhaps I need to run libvirtd before using virsh???

I tried to run libvirtd to see if that fixes the problem, but got the
below error:

# libvirtd
libvir: QEMU error : internal error failed to set bridge forward delay to 0
Failed to autostart network 'default': internal error failed to set
bridge forward delay to 0


Thanks,
Jun

--
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-15 Thread Daniel P. Berrange
On Fri, Aug 15, 2008 at 07:32:48PM +0900, Jun Koi wrote:
 On Fri, Aug 15, 2008 at 7:30 PM, Jun Koi [EMAIL PROTECTED] wrote:
  Hi,
 
  I am frustrated searching for a quick-start documentation for virsh,
  just to no avail. Any help is greatly appreciated!
 
  Here is what I did:
  - Compile and install libvirt, virt-manager, virt-install and
  virt-viewer from source code. This is done (on Ubuntu 8.04).
  - Now I want to do install a new VM with QEMU or KVM. I got the below
  error with virt-install:
 
 
  # virt-install -c qemu:///system --name jeos2 --ram 500 --file
  img.jeos2  --cdrom jeos-8.04.1-jeos-i386.iso
  Fri, 15 Aug 2008 19:19:10 ERRORvirConnectOpen() failed
  Traceback (most recent call last):
   File /usr/bin/virt-install, line 496, in module
 main()
   File /usr/bin/virt-install, line 345, in main
 conn = cli.getConnection(options.connect)
   File /usr/lib/python2.5/site-packages/virtinst/cli.py, line 92, in
  getConnection
 return libvirt.open(connect)
   File /usr/lib/python2.5/site-packages/libvirt.py, line 139, in open
 if ret is None:raise libvirtError('virConnectOpen() failed')
  libvirtError: virConnectOpen() failed
 
 
 
  How to fix this? Perhaps I need to run libvirtd before using virsh???
 
 I tried to run libvirtd to see if that fixes the problem, but got the
 below error:

Yes, for QEMU you need to have the libvirtd daemon up  running. Before
attempting to connect with virt-install, make sure you can connect with
virsh, eg as a good test run:

   virsh --connect qemu:///system  capabilities

 # libvirtd
 libvir: QEMU error : internal error failed to set bridge forward delay to 0
 Failed to autostart network 'default': internal error failed to set
 bridge forward delay to 0

This suggests you are missing the 'brctl' command - it is part
of the bridge-utils packages

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