I upgraded the xen packages on CentOS 5.1 with the Xen 3.2 packages from www.xen.org and seem to hit a few bugs in the python code of the tools. For instance, "xm new" creates the following error: Unexpected error: exceptions.ImportError Please report to xen-devel@lists.xensource.com Traceback (most recent call last): File "/usr/sbin/xm", line 10, in ? main.main(sys.argv) File "/usr/lib/python2.4/site-packages/xen/xm/main.py", line 2531, in main _, rc = _run_cmd(cmd, cmd_name, args) File "/usr/lib/python2.4/site-packages/xen/xm/main.py", line 2555, in _run_cmd return True, cmd(args) File "<string>", line 1, in <lambda> File "/usr/lib/python2.4/site-packages/xen/xm/main.py", line 1308, in xm_importcommand cmd = __import__(command, globals(), locals(), ''xen.xm'') File "/usr/lib/python2.4/site-packages/xen/xm/new.py", line 26, in ? from xen.xm.xenapi_create import * File "/usr/lib/python2.4/site-packages/xen/xm/xenapi_create.py", line 23, in ? from xml.parsers.xmlproc import xmlproc, xmlval, xmldtd ImportError: No module named xmlproc I see that others had the same problem on other platforms in the past and where advised to install "python-xml" or such. However, there is no "python-xml" for CentOS and other users on the same platform do not have this problem. So, what can I do to fix this? Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Kai, I believe the package is called "PyXML" from the CentOS repositories which contains xmlproc. So either PyXML.x86_64 or PyXML.i386. I have version 0.8.4-4 installed for Xen 3.2 under CentOS 5.1 x86_64. Good luck! Cheers, Daniel Kai Schaetzl wrote:> I upgraded the xen packages on CentOS 5.1 with the Xen 3.2 packages from > www.xen.org and seem to hit a few bugs in the python code of the tools. > For instance, "xm new" creates the following error: > > Unexpected error: exceptions.ImportError > > Please report to xen-devel@lists.xensource.com > Traceback (most recent call last): > File "/usr/sbin/xm", line 10, in ? > main.main(sys.argv) > File "/usr/lib/python2.4/site-packages/xen/xm/main.py", line 2531, in > main > _, rc = _run_cmd(cmd, cmd_name, args) > File "/usr/lib/python2.4/site-packages/xen/xm/main.py", line 2555, in > _run_cmd > return True, cmd(args) > File "<string>", line 1, in <lambda> > File "/usr/lib/python2.4/site-packages/xen/xm/main.py", line 1308, in > xm_importcommand > cmd = __import__(command, globals(), locals(), ''xen.xm'') > File "/usr/lib/python2.4/site-packages/xen/xm/new.py", line 26, in ? > from xen.xm.xenapi_create import * > File "/usr/lib/python2.4/site-packages/xen/xm/xenapi_create.py", line > 23, in ? > from xml.parsers.xmlproc import xmlproc, xmlval, xmldtd > ImportError: No module named xmlproc > > > I see that others had the same problem on other platforms in the past and > where advised to install "python-xml" or such. However, there is no > "python-xml" for CentOS and other users on the same platform do not have > this problem. So, what can I do to fix this? > > Kai > >-- Cheers, Daniel Kao, Übermind Seattle, WA dkao@ubermind.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Daniel Kao wrote on Tue, 01 Apr 2008 18:15:13 -0700:> I believe the package is called "PyXML" from the CentOS repositories > which contains xmlproc.Many thanks. I had grepped for "xml" in the yum output, but not for "XML". There''s obviously a dependency missing in the rpms. After installing PyXML I can now use xen new, but I see it doesn''t work like I hoped it would work. It can''t read the plain text config files that were created by virt-manager. There is an option -F for using "sxp" config files and I was assuming that might be the correct one, but it''s not working either (it always says the file is not there, although it is). Is there a conversion tool or are we supposed to convert manually? Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Kai, I noticed that also. It will read my "old" configuration files located in /etc/xen either using "xm create" to start a guest domain from the CLI/shell or in the Virtual Machine Manager in GNOME. All the new files created for new guests with Xen 3.2 are stored in /var/lib/xend/domains/ with a UID and a single config.sxp. To start up a guest domain with the new config.sxp files, I use the following command from the CLI/shell: # xm create --config=/var/lib/xend/domains/UID/config.sxp For the old Python ones: # xm create guest_domain_name If the above doesn''t work, this should (Note: this is for the old config files): # xm create --defconfig=/etc/xen/guest_domain_config You can replace --config with -F and --defconfig with -f. They''re synonymous with the capital "F" being for newer XML configuration files and the lowercase "f" for the older python scripts. Good luck! Kai Schaetzl wrote: Many thanks. I had grepped for "xml" in the yum output, but not for "XML". There''s obviously a dependency missing in the rpms. After installing PyXML I can now use xen new, but I see it doesn''t work like I hoped it would work. It can''t read the plain text config files that were created by virt-manager. There is an option -F for using "sxp" config files and I was assuming that might be the correct one, but it''s not working either (it always says the file is not there, although it is). Is there a conversion tool or are we supposed to convert manually? Kai -- Daniel Kao Übermind, Inc. dkao@ubermind.com Seattle, WA, U.S.A. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Daniel Kao wrote on Wed, 02 Apr 2008 12:30:48 -0700:> I noticed that also. It will read my "old" configuration files located in/etc/xen either using "xm create" to start a guest domain from the CLI/shell or in the Virtual Machine Manager in GNOME. Yes, xm create works like normal, but then you don''t get the "advantages" of xenstore. I understood the scarce documentation about "xm new" to provide just that: add a domain to xenstore.> > All the new files created for new guests with Xen 3.2 are stored in/var/lib/xend/domains/ with a UID and a single config.sxp. To start up a guest domain with the new config.sxp files, I use the following command from the CLI/shell:> # xm create --config=/var/lib/xend/domains/UID/config.sxpI created a file with> For the old Python ones: > # xm create guest_domain_name > If the above doesn''t work, this should (Note: this is for the old config files): > # xm create --defconfig=/etc/xen/guest_domain_config > You can replace --config with -F and --defconfig with -f.I tried that now with create instead of new. The results are "mixed" to say the least. xm create -f /etc/xen/news -n > /etc/xen/news.sxp creates an sxp file format with a plain text line "using file blabla" in the first line. So, you have to remove/comment that line before it works (actually, it still doesn''t work, see below). xm create -F /etc/xen/news -n > /etc/xen/news.sxp doesn''t create any XML output, just that first line I mention above. I In other words: it doesn''t work at all. Also, there''s a bug in all the help output -f=FILE, --defconfig=FILE is not correct, what works is: -f FILE, --defconfig=FILE e.g. the - parameter still doesn''t like =, it takes it as part of the path. Well, now that I have created /etc/xen/lvmtest2.sxp I want to make use of it: mambo:~ xm create --defconfig=/etc/xen/lvmtest2.sxp Using config file "/etc/xen/lvmtest2.sxp". Error: Errors were found at line 3 while processing /etc/xen/lvmtest2.sxp: (name lvmtest2) So, what''s wrong with that? It doesn''t like the configuration it created by its own? Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
While I''ve located a few threads on this topic from a few months ago, I have not been successful at producing a working build given the discussions from those threads, specifically the thread including: http://lists.xensource.com/archives/html/xen-users/2008-01/msg00699.html I followed the instructions of the above message ... downloaded the xen-3.2 tarball and unpacked it. Installed mercurial. (I''m doing this on a Suse 10.3 distro which does not include mercurial.) Cloned the mercurial source tree at the same level as the ''xen-3.2.0'' directory (i.e. ''xen-3.2.0'' and ''linux-2.6.18-xen.hg'' are in the same parent directory). Then after cd''ing to the xen-3.2.0 directory I did a ''make prep-kernels'' ... that all seemed to work fine. I copied a config file over to ''build-linux-2.6.18-xen_x86_32'' and then did a ''make dist''. Eventually this died with the error "No rule to make target ''vmlinuz''". I then cd''d to ''build-linux-2.6.18-xen_x86_32'' and executed ''make''. This appeared to succeed but created a vmlinux file instead of a vmlinuz file. I proceeded to repeat the previously failed ''make dist'' but it eventually failed with the same complaint about not having a rule to make vmlinuz. I''m also a bit concerned that any of the above is doing the right thing. I say this because as the first make executed, it appeared as though ketchup was downloading kernel source rather than using the mercurial build tree that I had previously manually downloaded. There are directories ''linux-2.6.18'' and ''build-linux-2.6.18-xen_x86_32'' created, but they seem to have a fair number of differences with the files from ''linux-2.6.18-xen.hg''. Can anyone shed some light on what might be going on or what I''m doing wrong? I also noted that the linux-2.6.18 source that''s offered on the xen.org download page doesn''t seem to be used in any of these build procedures. It that correct? Bernie Lofaso _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Bernie, You can try putting the linux-2.6.18-xen.hg inside the xen-3.2.0 directory and trying again. That has always worked for me. Cheers, Tait -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Bernie Lofaso Sent: Friday, April 04, 2008 1:27 PM To: xen-users@lists.xensource.com Subject: [Xen-users] Building Xen 3.2 from source While I''ve located a few threads on this topic from a few months ago, I have not been successful at producing a working build given the discussions from those threads, specifically the thread including: http://lists.xensource.com/archives/html/xen-users/2008-01/msg00699.html I followed the instructions of the above message ... downloaded the xen-3.2 tarball and unpacked it. Installed mercurial. (I''m doing this on a Suse 10.3 distro which does not include mercurial.) Cloned the mercurial source tree at the same level as the ''xen-3.2.0'' directory (i.e. ''xen-3.2.0'' and ''linux-2.6.18-xen.hg'' are in the same parent directory). Then after cd''ing to the xen-3.2.0 directory I did a ''make prep-kernels'' ... that all seemed to work fine. I copied a config file over to ''build-linux-2.6.18-xen_x86_32'' and then did a ''make dist''. Eventually this died with the error "No rule to make target ''vmlinuz''". I then cd''d to ''build-linux-2.6.18-xen_x86_32'' and executed ''make''. This appeared to succeed but created a vmlinux file instead of a vmlinuz file. I proceeded to repeat the previously failed ''make dist'' but it eventually failed with the same complaint about not having a rule to make vmlinuz. I''m also a bit concerned that any of the above is doing the right thing. I say this because as the first make executed, it appeared as though ketchup was downloading kernel source rather than using the mercurial build tree that I had previously manually downloaded. There are directories ''linux-2.6.18'' and ''build-linux-2.6.18-xen_x86_32'' created, but they seem to have a fair number of differences with the files from ''linux-2.6.18-xen.hg''. Can anyone shed some light on what might be going on or what I''m doing wrong? I also noted that the linux-2.6.18 source that''s offered on the xen.org download page doesn''t seem to be used in any of these build procedures. It that correct? Bernie Lofaso _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
where did your .config file copy from? after make prep-kernels, you can go to build-linux-2.6.18-xen_xxx directory and "make menuconfig" to generate a .config after that, do "make all", "make modules_install", and "make install" to install the xen linux. weimng On Fri, Apr 4, 2008 at 1:27 PM, Bernie Lofaso <bjlofaso@arlut.utexas.edu> wrote:> While I''ve located a few threads on this topic from a few months ago, I > have not been successful at producing a working build given the > discussions from those threads, specifically the thread including: > > http://lists.xensource.com/archives/html/xen-users/2008-01/msg00699.html > > > I followed the instructions of the above message ... downloaded the > xen-3.2 tarball and unpacked it. Installed mercurial. (I''m doing this on > a Suse 10.3 distro which does not include mercurial.) Cloned the > mercurial source tree at the same level as the ''xen-3.2.0'' directory > (i.e. ''xen-3.2.0'' and ''linux-2.6.18-xen.hg'' are in the same parent > directory). Then after cd''ing to the xen-3.2.0 directory I did a ''make > prep-kernels'' ... that all seemed to work fine. I copied a config file > over to ''build-linux-2.6.18-xen_x86_32'' and then did a ''make dist''. > Eventually this died with the error "No rule to make target ''vmlinuz''". > I then cd''d to ''build-linux-2.6.18-xen_x86_32'' and executed ''make''. > This appeared to succeed but created a vmlinux file instead of a vmlinuz > file. I proceeded to repeat the previously failed ''make dist'' but it > eventually failed with the same complaint about not having a rule to > make vmlinuz. > > I''m also a bit concerned that any of the above is doing the right thing. > I say this because as the first make executed, it appeared as though > ketchup was downloading kernel source rather than using the mercurial > build tree that I had previously manually downloaded. There are > directories ''linux-2.6.18'' and ''build-linux-2.6.18-xen_x86_32'' created, > but they seem to have a fair number of differences with the files from > ''linux-2.6.18-xen.hg''. > > Can anyone shed some light on what might be going on or what I''m doing > wrong? > > I also noted that the linux-2.6.18 source that''s offered on the xen.org > download page doesn''t seem to be used in any of these build procedures. > It that correct? > > Bernie Lofaso > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Here is my post from a few weeks ago. Are you building a Dom0/DomU or a super Xen kernel that can do either? My instructions are you build 2 separate kernels but you could easily build just one. The .config for each should be in the "build-linux-2.6.18-xen0_x86_32" and "build-linux-2.6.18-xenU_x86_32", respectively. Hi Bernie, a fellow Austin-ite. :) I''ll assume you want to build under Xen 3.2. Here are the steps that I have been writing up from my own documentation. I''m running my Dom0 on CentOS 4.4 ( moving to 5.1 soon). 1. Make sure the following is installed: binutils zlib-devel python-devel ncurses ncurses-devel openssl-devel xorg-x11-devel bridge-utils iproute hotplug udev curl curl-devel mercurial 0.9.5 or better 2. Download Xen 3.2 tar ball from http://bits.xensource.com/oss-xen/release/3.2.0/xen-3.2.0.tar.gz 3. tar -zxf xen-3.2.0.tar.gz 4. cd xen-3.2.0/ 5. Since the official Xen kernel is now in Mercurial instead of just patches to a vanilla kernel you need to setup your PYTHONPATH to point to the mercurial Python library. It should look something like: export PYTHONPATH=/usr/lib/python2.3:/usr/local/lib/python2.3/site-packages 6. Pull the 2.6.18 kernel from Mercurial: hg clone http://xenbits.xensource.com/linux-2.6.18-xen.hg 7. In my configuration I build a Dom0 kernel and a DomU kernel. The Dom0 will have all the xen backend drivers and hardware drivers for my system and the DomU will not. Here is how you would create two kernels... (xen0=Dom0, xenU=DomU) make linux-2.6-xen0-config CONFIGMODE=menuconfig make linux-2.6-xen0-build make linux-2.6-xen0-install make linux-2.6-xenU-config CONFIGMODE=menuconfig make linux-2.6-xenU-build make linux-2.6-xenU-install That should install the kernels and I believe (I''m not past this point becuase of lack of hardware to run it on) it should install it in grub as well. Let me know how this works for you. Ryan>> While I''ve located a few threads on this topic from a few months ago, I >> have not been successful at producing a working build given the >> discussions from those threads, specifically the thread including: >> >> http://lists.xensource.com/archives/html/xen-users/2008-01/msg00699.html >> >> >> I followed the instructions of the above message ... downloaded the >> xen-3.2 tarball and unpacked it. Installed mercurial. (I''m doing this on >> a Suse 10.3 distro which does not include mercurial.) Cloned the >> mercurial source tree at the same level as the ''xen-3.2.0'' directory >> (i.e. ''xen-3.2.0'' and ''linux-2.6.18-xen.hg'' are in the same parent >> directory). Then after cd''ing to the xen-3.2.0 directory I did a ''make >> prep-kernels'' ... that all seemed to work fine. I copied a config file >> over to ''build-linux-2.6.18-xen_x86_32'' and then did a ''make dist''. >> Eventually this died with the error "No rule to make target ''vmlinuz''". >> I then cd''d to ''build-linux-2.6.18-xen_x86_32'' and executed ''make''. >> This appeared to succeed but created a vmlinux file instead of a vmlinuz >> file. I proceeded to repeat the previously failed ''make dist'' but it >> eventually failed with the same complaint about not having a rule to >> make vmlinuz. >> >> I''m also a bit concerned that any of the above is doing the right thing. >> I say this because as the first make executed, it appeared as though >> ketchup was downloading kernel source rather than using the mercurial >> build tree that I had previously manually downloaded. There are >> directories ''linux-2.6.18'' and ''build-linux-2.6.18-xen_x86_32'' created, >> but they seem to have a fair number of differences with the files from >> ''linux-2.6.18-xen.hg''. >> >> Can anyone shed some light on what might be going on or what I''m doing >> wrong? >> >> I also noted that the linux-2.6.18 source that''s offered on the xen.org >> download page doesn''t seem to be used in any of these build procedures. >> It that correct? >> >> Bernie Lofaso_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
please do not hijack threads. If you want to post a new message, then please hit "new" and not "reply" ! Thanks. Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Kai Schaetzl wrote:> please do not hijack threads. If you want to post a new message, then > please hit "new" and not "reply" ! Thanks. > > Kai >My apologies. I didn''t realize there was a difference but now I see what you mean. To all that responded to my original posting, thank you for your comments. I moved my mercurial repository inside the xen-3.2.0 directory and that seems to have corrected the (current) problem. Now I get to see if it runs. :-) Thanks again. Bernie Lofaso _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users