Re: [Libvir] MinGW patch
Hi, Rich I have 2 questions about MinGW fixes. (It has already committed, sorry for delaying) 1)src/storage_driver.c patch I think storage_driver.c is not compiled on MinGW. So It should remove HAVE_PWD_H in src/storage_driver.c http://git.et.redhat.com/?p=libvirt.git;a=blobdiff;f=src/storage_driver.c;h=7f1ce0cdc99041ca6fa2ea84aaa9dc5f7764083d;hp=d0e38f66d3051fc2765a67ba932c3b11b2eafdaf;hb=ed8ae56bdc5e5e04ddca6a8839c53b3323783a8f;hpb=26dbf951a3e584b0efe649821ecc9c8b7c956605 2)src/util.c patch I think sys/wait.h(waitpid) has not supported on MinGW. So I think it should add check (HAVE_SYS_WAIT_H) on waitpid() to avoid compilation warnings. How do you think? Thanks Atsushi SAKAI Richard W.M. Jones [EMAIL PROTECTED] wrote: I got about 95% of the way towards compiling on MinGW using the MinGW cross-compiler from http://mirzam.it.vu.nl/mingw/. Attached are some fairly non-controversial patches which fix some of the problems I found. Build notes follow below. Rich. -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] MinGW patch
On Mon, Apr 21, 2008 at 03:56:39PM +0900, Atsushi SAKAI wrote: Hi, Rich I have 2 questions about MinGW fixes. (It has already committed, sorry for delaying) 1)src/storage_driver.c patch I think storage_driver.c is not compiled on MinGW. So It should remove HAVE_PWD_H in src/storage_driver.c Sure, but I left this one in because there may be other platforms which lack pwd.h which would need this. In theory every header of this type should be defended with #ifdef .. #endif 2)src/util.c patch I think sys/wait.h(waitpid) has not supported on MinGW. So I think it should add check (HAVE_SYS_WAIT_H) on waitpid() to avoid compilation warnings. OK thanks. This compiles for me, but I agree that if a version of MinGW doesn't support waitpid we should either find an alternate way or find some way to comment that out. Do you have any suggested Windows/MinGW patches? FWIW it looks like I'm going to use the cross-compiler approach to build libvirt for Windows in future because I don't have the time or energy to maintain a running copy of Windows itself. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] proposal: remove contradictory indentation directive
Daniel Veillard [EMAIL PROTECTED] wrote: On Thu, Apr 10, 2008 at 02:18:49PM +0200, Jim Meyering wrote: Daniel Veillard [EMAIL PROTECTED] wrote: for me in vi, the fingers type it by themselves without even asking the brain, that would be painful to change. Also i like the idea of having a more precise time, really, it's not like we do one commit every few days... If you do that, you still have to manually append your name and email address. How about teaching your fingers to type the shorter #d (or whatever you want to call it), which would add the entire line? Just add this to your .vimrc file (last byte is ctrl-M, aka C-vC-m): map #d :r!date '+\%F Daniel Veillard [EMAIL PROTECTED]' Heh, one more map for my .vimrc (I already have a bunch to of map and map! to mimick Turbo Pascal/Turbo C editor keystrokes, and i still use them all the time :-) Good! If you're actually going to use that let me know, then I can adjust (make more strict) the patch I proposed here: http://thread.gmane.org/gmane.comp.emulators.libvirt/5929 -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] PATCH: Make test suite debug mode more friendly
On Fri, Apr 18, 2008 at 01:28:55AM +0100, Daniel P. Berrange wrote: When the test suites fail, we have a DEBUG_TESTS=1 environment variable which can be set to show the full XML doc or string pair that failed to match. Unfortunately these docs can be quite large, so it is hard to spot the difference between the actual and expected output. So this patch introduces a virtTestDifference(actual, expect) method which will trim the head tail of the actual expected strings until the point at which they differ. This gives immediate clear feedback on where the bug is Second, it will enumerate each test condition pretty print align things a little better. Great ! Going though the diffs can be really painful at times +1 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: [Libvir] proposal: remove contradictory indentation directive
On Mon, Apr 21, 2008 at 10:22:11AM +0200, Jim Meyering wrote: Daniel Veillard [EMAIL PROTECTED] wrote: On Thu, Apr 10, 2008 at 02:18:49PM +0200, Jim Meyering wrote: Daniel Veillard [EMAIL PROTECTED] wrote: for me in vi, the fingers type it by themselves without even asking the brain, that would be painful to change. Also i like the idea of having a more precise time, really, it's not like we do one commit every few days... If you do that, you still have to manually append your name and email address. How about teaching your fingers to type the shorter #d (or whatever you want to call it), which would add the entire line? Just add this to your .vimrc file (last byte is ctrl-M, aka C-vC-m): map #d :r!date '+\%F Daniel Veillard [EMAIL PROTECTED]' Heh, one more map for my .vimrc (I already have a bunch to of map and map! to mimick Turbo Pascal/Turbo C editor keystrokes, and i still use them all the time :-) Good! If you're actually going to use that let me know, then I can adjust (make more strict) the patch I proposed here: http://thread.gmane.org/gmane.comp.emulators.libvirt/5929 Well except I still prefer the ChangeLog long form for dates. 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: [libvir] [PATCH] Bad permissions on /var/run/libvirt/
2008/4/17, Daniel Veillard [EMAIL PROTECTED]: On Mon, Apr 14, 2008 at 07:37:56PM +0400, Anton Protopopov wrote: Hi, Non-root can't use /var/run/libvirt/libvirt-sock even in the case unix_sock_group and unix_sock_rw_perms are set properly. The reason: # ls -l /var/run /var/run/libvirt | grep libvirt | grep -v pid drwx-- 2 root root 4096 Apr 14 19:14 libvirt srwxrwx--- 1 root libvirt 0 Apr 14 19:14 libvirt-sock srwxrwxrwx 1 root libvirt 0 Apr 14 19:14 libvirt-sock-ro i.e., bad permissions on /var/run/libvirt Hum, how did you get this ? Maybe this is more a packaging problem than anything else Yes, it was, sorry... , I have this here: [EMAIL PROTECTED] ~]# rpm -qf /var/run/libvirt libvirt-0.4.1-3.fc8 [EMAIL PROTECTED] ~]# rpm -V libvirt [EMAIL PROTECTED] ~]# ls -ld /var/run/libvirt drwxr-xr-x 2 root root 4096 2008-04-04 18:00 /var/run/libvirt [EMAIL PROTECTED] ~]# ls -l /var/run/libvirt total 0 srwxrwxrwx 1 root root 0 2008-03-29 14:56 libvirt-sock srwxrwxrwx 1 root root 0 2008-03-29 14:56 libvirt-sock-ro [EMAIL PROTECTED] ~]# One possible solution (implied in the attached patch) is the following: Every time libvirtd starts * it implicitly sets the group id of /var/run/libvirt: chown(/var/run/libvirt, -1, unix_sock_gid). * if unix_sock_group defined in /etc/libvirt/libvirtd.conf, libvirtd does chmod g+x /var/run/libvirt otherwise, chmod g-x /var/run/libvirt I don't know, that's doable too, but if there is a packaging problem maybe it's good to have it fixed instead of changing permissions at runtime. But the configuration data should override this, that's true. What do others think ? 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: [Libvir] FYI, typo fix
On Fri, Apr 18, 2008 at 11:28:19AM +0200, Jim Meyering wrote: I updated and couldn't compile. Here's the fix: avoid compile error when pthread.h is absent * src/internal.h (HAVE_PTHREAD_H): Test with #ifdef, not #if. yes, 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: [Libvir] MinGW patch
Hi, Rich Richard W.M. Jones [EMAIL PROTECTED] wrote: 2)src/util.c patch I think sys/wait.h(waitpid) has not supported on MinGW. So I think it should add check (HAVE_SYS_WAIT_H) on waitpid() to avoid compilation warnings. OK thanks. This compiles for me, but I agree that if a version of MinGW doesn't support waitpid we should either find an alternate way or find some way to comment that out. Do you have any suggested Windows/MinGW patches? I think following patch seems good (but not tested yet by me.) http://cvsweb.xfree86.org/cvsweb/cvs/windows-NT/waitpid.c?rev=HEAD FWIW it looks like I'm going to use the cross-compiler approach to build libvirt for Windows in future because I don't have the time or energy to maintain a running copy of Windows itself. I also hope to unite the development environment. Thanks Atsushi SAKAI -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[Libvir] Adding devices to a vm using virsh
Hi, I need to be able to attach a PCI device to an existing machine. I know that in Xen's configuration file we need to add a line PCI=[] The problem is that I didn't find any documentation on what the parametes are. When looking at virsh, there's an 'attach' function, but the only documented devices are disk and Ethernet card. Does anyone knows what is the format for adding a generic PCI card (or specifically, a Teradici card) using virsh attach Best Regards, Gabriel Kaufmann Software Engineer [EMAIL PROTECTED]mailto:[EMAIL PROTECTED] Ericom Software Tel (Dir): +972 2 591 1700 Ext 754 Tel (Main): +972 2 591 1700 http://www.ericom.com Access Done Right Empower Enterprise-Wide Access to Microsoft(r) Terminal Server, Virtual Desktops and Legacy Applications -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] PATCH: Re-structuring the libvirt.org website content
Have we lost the hvsupport page? It exists if I go to the URL directly but I can't see it listed in the left hand index. Also we seem to have lost some CSS from that page. Note that docs/libvirt.css should contain styles for table.top_table near the bottom of the file, but those are now missing from http://berrange.fedorapeople.org/libvirt/website-demo/libvirt.css 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: [Libvir] PATCH: Re-structuring the libvirt.org website content
On Mon, Apr 21, 2008 at 09:43:03AM +0100, Richard W.M. Jones wrote: Have we lost the hvsupport page? It exists if I go to the URL directly but I can't see it listed in the left hand index. Ah yes - I missed that in the sitemap - I'll add it back at the drivers section. Also we seem to have lost some CSS from that page. Note that docs/libvirt.css should contain styles for table.top_table near the bottom of the file, but those are now missing from I'll fix that too 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/ :| |: 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: [Libvir] Adding devices to a vm using virsh
On Mon, Apr 21, 2008 at 12:53:50PM +0300, Gabriel Kaufmann wrote: I need to be able to attach a PCI device to an existing machine. I know that in Xen's configuration file we need to add a line PCI=[] The problem is that I didn't find any documentation on what the parametes are. When looking at virsh, there's an 'attach' function, but the only documented devices are disk and Ethernet card. Does anyone knows what is the format for adding a generic PCI card (or specifically, a Teradici card) using virsh attach Unfortunately I'm pretty sure we don't support adding arbitrary devices (ie. PCI pass-thru). You should be able to do this by starting the domain using an ordinary Xen configuration file. 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: [Libvir] MinGW patch
On Mon, Apr 21, 2008 at 07:28:29PM +0900, Atsushi SAKAI wrote: I think following patch seems good (but not tested yet by me.) http://cvsweb.xfree86.org/cvsweb/cvs/windows-NT/waitpid.c?rev=HEAD Yes, that looks good. Gnulib actually contains a wait-process module which basically implements that in the same way (using _cwait on Win32[1]): http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/wait-process.c;h=97bc57fe5f19e1df178f93699dce5c283e801c4b;hb=HEAD Rich. [1] http://msdn2.microsoft.com/en-us/library/zb9ehy71(VS.80).aspx -- 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: [Libvir] PATCH: Re-structuring the libvirt.org website content
On Mon, Apr 21, 2008 at 11:54:59AM +0100, Daniel P. Berrange wrote: On Mon, Apr 21, 2008 at 09:43:03AM +0100, Richard W.M. Jones wrote: Have we lost the hvsupport page? It exists if I go to the URL directly but I can't see it listed in the left hand index. Ah yes - I missed that in the sitemap - I'll add it back at the drivers section. I changed my mind thought it better to put it alongside the API docs, since its highly relevant info when looking at the APIs. http://berrange.fedorapeople.org/libvirt/website-demo/hvsupport.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/ :| |: 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: [Libvir] PATCH 0/4: Serial / parallel device support
On Fri, Apr 18, 2008 at 09:20:40PM +0100, Daniel P. Berrange wrote: This patch series adds support for serial parallel devices to the QEMU driver, and updates the Xen driver to support new syntax for HVM guests too. The following syntax is used. Anywhere you see 'serial', you can equally use 'console' or 'parallel'. The 'serial' is for real serial devices only, likewise 'parallel' is for parallel port devices only. 'console' tag is for paravirtualized consoles. IF there is no paravirt console, then the first serial device (if any) is also duplicated as a 'console' tag. This provides backwards compatability with existing syntax. [...] This is sufficient flexibility to represent all QEMU character device modes, Xen paravirt console, LXC container fake console and the Solaris LDoms console, and VMWare serial devices. This series of patches updates the Xen and QEMU drivers, and their test suites. A later patch will also update the LXC driver to this new syntax. Fine by me, let's push this, feedback may lead to a bit of tweaking of the code but it will be easier to deal with as diff from CVS than on this patchset. I was going to document this all in the format.html page, but looking at the content there it needs a complete re-write. The split between Xen and QEMU formats is pointless because they share 95% of the their config. Both the Xen and QEMU descriptions are outdated, and the Xen PV vs HVM split is also less than useful since they have much more commmonaility now. I intend to re-write it to describe each element / attribute in turn, and then at the end provide some example configs for each driver. If we can achieve this then that means we should also be able to maintain the relaxng schemas, ship it with the distribution and even pissibly add a checking rule as part of virsh. 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: [Libvir] PATCH: Re-structuring the libvirt.org website content
On Sun, Apr 20, 2008 at 07:47:08PM +0100, Daniel P. Berrange wrote: In a nutshell, fantastic, I like this a lot ! - There is a page describing all applications using libvirt as their API http://berrange.fedorapeople.org/libvirt/website-demo/apps.html Shout if you have more applications you want added to this page... We need to add the CIM provider for libvirt http://libvirt.org/CIM/ CC'ing the CIM mailing-list as they will be impacted by this, an update of their site would make sense to keep the harmony. - Linked to the new wiki site, and added seemless integration betweeen the wiki navigation styling, and the main site. adding the Wiki is important, thanks, but I don't see the integration, c.f. http://wiki.libvirt.org/page/Main_Page , what did I missed ? - There is a new updated CSS graphic design - I can't take credit for that - it is from mockups done by one of the Red Hat designers. I like the design, just a couple of nits, the fonts are a bit small and when going to the API page it looks a bit bizarre. Again, if all this is too much to take in, just go straight to the sitemap page on the demo site and click around... For the API page, I would be a bit conservative, first because I hate when URLs for documentation break, second because it's part of the search index under the API, and as such the entries from the PHP or the database would have to be shuffled if you break the pages. Another thing to verify is that the indexer which fills up the database on libvirt.org/xmlsoft.org for the search works well with the new set of pages, I think that's okay but will have to be tested once we change the main site, still I like this a lot :-) 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: [libvir] [PATCH] Bad permissions on /var/run/libvirt/
On Mon, Apr 21, 2008 at 01:06:02PM +0400, Anton Protopopov wrote: 2008/4/17, Daniel Veillard [EMAIL PROTECTED]: On Mon, Apr 14, 2008 at 07:37:56PM +0400, Anton Protopopov wrote: Hi, Non-root can't use /var/run/libvirt/libvirt-sock even in the case unix_sock_group and unix_sock_rw_perms are set properly. The reason: # ls -l /var/run /var/run/libvirt | grep libvirt | grep -v pid drwx-- 2 root root 4096 Apr 14 19:14 libvirt srwxrwx--- 1 root libvirt 0 Apr 14 19:14 libvirt-sock srwxrwxrwx 1 root libvirt 0 Apr 14 19:14 libvirt-sock-ro i.e., bad permissions on /var/run/libvirt Hum, how did you get this ? Maybe this is more a packaging problem than anything else Yes, it was, sorry... So do you think the patch really make sense in a more general way. Except for the group from the configuration this looks like the wrong way to fix this. Do you agree ? If yes what about making a subset of the patch just for the socket group rights ? 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: [Libvir] PATCH: Re-structuring the libvirt.org website content
On Mon, Apr 21, 2008 at 11:49:27AM -0400, Daniel Veillard wrote: On Sun, Apr 20, 2008 at 07:47:08PM +0100, Daniel P. Berrange wrote: In a nutshell, fantastic, I like this a lot ! - There is a page describing all applications using libvirt as their API http://berrange.fedorapeople.org/libvirt/website-demo/apps.html Shout if you have more applications you want added to this page... We need to add the CIM provider for libvirt http://libvirt.org/CIM/ CC'ing the CIM mailing-list as they will be impacted by this, an update of their site would make sense to keep the harmony. Yes, I've already added this to the related links page along with links to all the language bindings. I'll also link the 'CIM provider' in the front page bullet list. - Linked to the new wiki site, and added seemless integration betweeen the wiki navigation styling, and the main site. adding the Wiki is important, thanks, but I don't see the integration, c.f. http://wiki.libvirt.org/page/Main_Page , what did I missed ? I changed the default site style, but if you're logged into the admin account you might need to change your account preferences to use the new skin - http://wiki.libvirt.org/page/Special:Preferences Select the 'Libvirt' skin. - There is a new updated CSS graphic design - I can't take credit for that - it is from mockups done by one of the Red Hat designers. I like the design, just a couple of nits, the fonts are a bit small and when going to the API page it looks a bit bizarre. Not sure what you mean about the API pages ? They're using the same style as the rest of the site. The only other style change there was that the table of contents puts everything within one pre intead of multiple to get rid of the repeated boxes in the TOC of the current page. The fonts display the same size as the current site when I compare them. Or do you want them bigger than the current site ? Again, if all this is too much to take in, just go straight to the sitemap page on the demo site and click around... For the API page, I would be a bit conservative, first because I hate when URLs for documentation break, second because it's part of the search index under the API, and as such the entries from the PHP or the database would have to be shuffled if you break the pages. The API pages are still using the same URLs as before. If we were to split it out into groups by virConnect/Domain/Network/Storage, then I'd suggest still keeping the same existing URLs for compatability, and use that page to link to the group pages. So if someone stored the URL they'd still get a valid page, and no 404's 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/ :| |: 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: [Libvir] PATCH: Re-structuring the libvirt.org website content
Oops, sorry resent, I forgot to Cc: the CIM list, On Sun, Apr 20, 2008 at 07:47:08PM +0100, Daniel P. Berrange wrote: In a nutshell, fantastic, I like this a lot ! - There is a page describing all applications using libvirt as their API http://berrange.fedorapeople.org/libvirt/website-demo/apps.html Shout if you have more applications you want added to this page... We need to add the CIM provider for libvirt http://libvirt.org/CIM/ CC'ing the CIM mailing-list as they will be impacted by this, an update of their site would make sense to keep the harmony. - Linked to the new wiki site, and added seemless integration betweeen the wiki navigation styling, and the main site. adding the Wiki is important, thanks, but I don't see the integration, c.f. http://wiki.libvirt.org/page/Main_Page , what did I missed ? - There is a new updated CSS graphic design - I can't take credit for that - it is from mockups done by one of the Red Hat designers. I like the design, just a couple of nits, the fonts are a bit small and when going to the API page it looks a bit bizarre. Again, if all this is too much to take in, just go straight to the sitemap page on the demo site and click around... For the API page, I would be a bit conservative, first because I hate when URLs for documentation break, second because it's part of the search index under the API, and as such the entries from the PHP or the database would have to be shuffled if you break the pages. Another thing to verify is that the indexer which fills up the database on libvirt.org/xmlsoft.org for the search works well with the new set of pages, I think that's okay but will have to be tested once we change the main site, still I like this a lot :-) 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: [libvir] [PATCH] Bad permissions on /var/run/libvirt/
2008/4/21, Daniel Veillard [EMAIL PROTECTED]: On Mon, Apr 21, 2008 at 01:06:02PM +0400, Anton Protopopov wrote: 2008/4/17, Daniel Veillard [EMAIL PROTECTED]: On Mon, Apr 14, 2008 at 07:37:56PM +0400, Anton Protopopov wrote: Hi, Non-root can't use /var/run/libvirt/libvirt-sock even in the case unix_sock_group and unix_sock_rw_perms are set properly. The reason: # ls -l /var/run /var/run/libvirt | grep libvirt | grep -v pid drwx-- 2 root root 4096 Apr 14 19:14 libvirt srwxrwx--- 1 root libvirt 0 Apr 14 19:14 libvirt-sock srwxrwxrwx 1 root libvirt 0 Apr 14 19:14 libvirt-sock-ro i.e., bad permissions on /var/run/libvirt Hum, how did you get this ? Maybe this is more a packaging problem than anything else Yes, it was, sorry... So do you think the patch really make sense in a more general way. Except for the group from the configuration this looks like the wrong way to fix this. Do you agree ? If yes what about making a subset of the patch just for the socket group rights ? Daniel Well, I think that there were two decisions: First one is to change the permissions of /var/run/libvirt to 0750 (by spcifying it in spec) and then change the group ownership of this directory in main(), right after the call to remoteReadConfigFile(). That must be done in main() because one can set unix_sock_group to non-root and then remove config file. The other (simple) one is to leave it as is :) If you want, I can make patch to fix the first case A. -- 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
[Libvir] [PATCH] sound support for qemu and xen
The patch below adds xml support for the soundhw option to qemu and xen. The new xml element takes the form: sound driver='drivername'/ Where driver name can be pcspk, sb16, es1370, or all. Everything seems to be in working order but I have a few implementation questions: 1) Should multiple drivers be able to be specified? qemu accommodates this, allowing '-soundhw sb16,pcspk' for example. If this should be allowed, what should the xml format be? 2) Should acceptable driver options be hardcoded? The other option is to just pass the input straight to qemu. This patch has the options hardcoded. Also I realize this will probably need to be rediff'd around Dan's serial + parallel device patch, but I figured I would just get this out there. Thanks, Cole diff --git a/src/qemu_conf.c b/src/qemu_conf.c index d9b82b2..bfd9ba4 100644 --- a/src/qemu_conf.c +++ b/src/qemu_conf.c @@ -1011,6 +1011,41 @@ static int qemudParseInputXML(virConnectPtr conn, return -1; } +/* Sound device helper functions */ +static int qemudSoundDriverFromString(virConnectPtr conn, + const char *driver) { +if (STREQ(driver, all)) { +return QEMU_SOUND_ALL; +} else if (STREQ(driver, sb16)) { +return QEMU_SOUND_SB16; +} else if (STREQ(driver, es1370)) { +return QEMU_SOUND_ES1370; +} else if (STREQ(driver, pcspk)) { +return QEMU_SOUND_PCSPK; +} + +qemudReportError(conn, NULL, NULL, VIR_ERR_INVALID_ARG, + _(invalid sound driver '%s'), driver); +return -1; +} + +static const char *qemudSoundDriverToString(virConnectPtr conn, +const int driver) { + +if (driver == QEMU_SOUND_ALL) { +return all; +} else if (driver == QEMU_SOUND_SB16) { +return sb16; +} else if (driver == QEMU_SOUND_ES1370) { +return es1370; +} else if (driver == QEMU_SOUND_PCSPK) { +return pcspk; +} + +qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, + _(invalid sound driver '%d'), driver); +return NULL; +} /* * Parses a libvirt XML definition of a guest, and populates the @@ -1486,6 +1521,25 @@ static struct qemud_vm_def *qemudParseXML(virConnectPtr conn, } } xmlXPathFreeObject(obj); + +/* Parse sound driver xml */ +obj = xmlXPathEval(BAD_CAST /domain/devices/sound, ctxt); +if ((obj == NULL) || (obj-type != XPATH_NODESET) || +(obj-nodesetval == NULL) || (obj-nodesetval-nodeNr == 0)) { +def-soundDriver = QEMU_SOUND_NONE; +} else if ((prop = xmlGetProp(obj-nodesetval-nodeTab[0], +BAD_CAST driver))) { + +if ((def-soundDriver = qemudSoundDriverFromString(conn, + (char *) prop)) 0) +goto error; + +xmlFree(prop); +prop = NULL; +} else { +def-soundDriver = QEMU_SOUND_NONE; +} +xmlXPathFreeObject(obj); obj = NULL; /* If graphics are enabled, there's an implicit PS2 mouse */ @@ -1694,6 +1748,7 @@ int qemudBuildCommandLine(virConnectPtr conn, (vm-def-os.cmdline[0] ? 2 : 0) + /* cmdline */ (vm-def-graphicsType == QEMUD_GRAPHICS_VNC ? 2 : (vm-def-graphicsType == QEMUD_GRAPHICS_SDL ? 0 : 1)) + /* graphics */ +(vm-def-soundDriver == QEMU_SOUND_NONE ? 0 : 2) + /* sound */ (vm-migrateFrom[0] ? 3 : 0); /* migrateFrom */ snprintf(memory, sizeof(memory), %lu, vm-def-memory/1024); @@ -1970,6 +2025,14 @@ int qemudBuildCommandLine(virConnectPtr conn, /* SDL is the default. no args needed */ } +/* Add sound hardware */ +if (vm-def-soundDriver != QEMU_SOUND_NONE) { +if (!((*argv)[++n] = strdup(-soundhw))) +goto no_memory; +if (!((*argv)[++n] = strdup((char *) qemudSoundDriverToString(conn, vm-def-soundDriver +goto no_memory; +} + if (vm-migrateFrom[0]) { if (!((*argv)[++n] = strdup(-S))) goto no_memory; @@ -3125,7 +3188,11 @@ char *qemudGenerateXML(virConnectPtr conn, break; } -if (def-graphicsType == QEMUD_GRAPHICS_VNC) { +if (def-soundDriver != QEMU_SOUND_NONE) { +if (virBufferVSprintf(buf, sound driver='%s'/\n, + qemudSoundDriverToString(conn, + def-soundDriver)) 0) +goto no_memory; } if (virBufferAddLit(buf, /devices\n) 0) diff --git a/src/qemu_conf.h b/src/qemu_conf.h index c59b1fa..1383c10 100644 --- a/src/qemu_conf.h +++ b/src/qemu_conf.h @@ -136,6 +136,14 @@ struct qemud_vm_input_def { struct qemud_vm_input_def *next; }; +enum qemu_vm_sound_driver { +QEMU_SOUND_NONE, +QEMU_SOUND_ALL, +QEMU_SOUND_SB16, +QEMU_SOUND_ES1370, +QEMU_SOUND_PCSPK, +}; + /* Flags for the 'type' field in next struct */ enum
Re: [Libvir] [PATCH] sound support for qemu and xen
On Mon, Apr 21, 2008 at 01:02:35PM -0400, Cole Robinson wrote: The patch below adds xml support for the soundhw option to qemu and xen. The new xml element takes the form: sound driver='drivername'/ Where driver name can be pcspk, sb16, es1370, or all. I'd like to use 'model' instead of 'driver', since we use 'model' in the network driver to specify the type of hardware and will do the same with disks too in the future. ie sound model='sb16'/ Everything seems to be in working order but I have a few implementation questions: 1) Should multiple drivers be able to be specified? qemu accommodates this, allowing '-soundhw sb16,pcspk' for example. If this should be allowed, what should the xml format be? It should be represented as multiple source tags in the XML. The fact that is multiplexes onto a single -soundhw arg is an implementation detail that should remain hidden. 2) Should acceptable driver options be hardcoded? The other option is to just pass the input straight to qemu. This patch has the options hardcoded. I prefer to have it hardcoded because it lets us explicitly block the string 'all'. The string 'all' is an implementation detail to which no reliable semantics can be assigned and should not be allowed by libvirt. Regards, 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/ :| |: 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: [Libvir] [PATCH] sound support for qemu and xen
Daniel P. Berrange wrote: On Mon, Apr 21, 2008 at 01:02:35PM -0400, Cole Robinson wrote: The patch below adds xml support for the soundhw option to qemu and xen. The new xml element takes the form: sound driver='drivername'/ Where driver name can be pcspk, sb16, es1370, or all. I'd like to use 'model' instead of 'driver', since we use 'model' in the network driver to specify the type of hardware and will do the same with disks too in the future. ie sound model='sb16'/ Makes sense. I'll make the change. Everything seems to be in working order but I have a few implementation questions: 1) Should multiple drivers be able to be specified? qemu accommodates this, allowing '-soundhw sb16,pcspk' for example. If this should be allowed, what should the xml format be? It should be represented as multiple source tags in the XML. The fact that is multiplexes onto a single -soundhw arg is an implementation detail that should remain hidden. Did you mean sound tags? Something like: sound model='d1'/ sound model='d2'/ 2) Should acceptable driver options be hardcoded? The other option is to just pass the input straight to qemu. This patch has the options hardcoded. I prefer to have it hardcoded because it lets us explicitly block the string 'all'. The string 'all' is an implementation detail to which no reliable semantics can be assigned and should not be allowed by libvirt. Okay, I follow. I'll remove 'all' from the whitelist. Thanks, Cole -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] [PATCH] sound support for qemu and xen
On Mon, Apr 21, 2008 at 02:20:29PM -0400, Cole Robinson wrote: Daniel P. Berrange wrote: On Mon, Apr 21, 2008 at 01:02:35PM -0400, Cole Robinson wrote: The patch below adds xml support for the soundhw option to qemu and xen. The new xml element takes the form: sound driver='drivername'/ Where driver name can be pcspk, sb16, es1370, or all. I'd like to use 'model' instead of 'driver', since we use 'model' in the network driver to specify the type of hardware and will do the same with disks too in the future. ie sound model='sb16'/ Makes sense. I'll make the change. Everything seems to be in working order but I have a few implementation questions: 1) Should multiple drivers be able to be specified? qemu accommodates this, allowing '-soundhw sb16,pcspk' for example. If this should be allowed, what should the xml format be? It should be represented as multiple source tags in the XML. The fact that is multiplexes onto a single -soundhw arg is an implementation detail that should remain hidden. Did you mean sound tags? Something like: sound model='d1'/ sound model='d2'/ yes, that's what i meant. 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/ :| |: 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