Tvrtko A. Uršulin
2004-Feb-16 09:20 UTC
[Xen-devel] Latest 1.2 tools fail to create new domain
xen:~ # xc_dom_create.py -f /etc/xc/test -D vmid=1
Parsing config file ''/etc/xc/test''
/usr/lib/python2.3/site-packages/XenoUtil.py:96: FutureWarning: x<<y
losing
bits or changing sign will return a long in Python 2.4 and up
a = ( (string.atoi(l[0])<<24) | (string.atoi(l[1])<<16) |
VM image : "/boot/xenolinux-new.gz"
VM ramdisk : ""
VM memory (MB) : "64"
VM IP address(es) : "10.0.0.4; 169.254.1.1"
VM block device(s) : "vd:1,sda1,w; vd:2,sda2,w"
VM cmdline : " root=/dev/sda1 VMID=1 "
Traceback (most recent call last):
File "/usr/bin/xc_dom_create.py", line 308, in ?
current_id = make_domain()
File "/usr/bin/xc_dom_create.py", line 266, in make_domain
extents=segments):
SystemError: NULL result without error in PyObject_Call
xen:~ # xc_dom_control.py list
Dom Name Mem(kb) CPU State Time(s)
0 Domain-0 131072 0 r- 58
1 Test domain [1] 65536 0 -s 0
xen:~ # cat /etc/xc/test
##### Edit this python file to reflect the configuration of your system
##### This example script expects a variable called ''vmid'' to
be set.
def config_usage ():
print >>sys.stderr,"""
The config file ''%s'' requires the following variable to be
defined:
vmid -- Numeric identifier for the new domain, used to calculate
the VM''s IP address and root partition. E.g.
-Dvmid=1
""" % config_file
try:
vmid=int(vmid) # convert to integer
except:
print >>sys.stderr,"%s: This script expects
''vmid'' to be set using -D
vmid=X" % config_file
assert()
if vmid == 0:
print >>sys.stderr,"%s: ''vmid'' must be greater
than 0" % config_file
assert()
# STEP 1. Specify kernel image file and otional ramdisk. Can be
gzip''ed.
image = "/boot/xenolinux.gz"
ramdisk = ""
#ramdisk = "/boot/initrd.gz"
builder_fn=''linux'' # this is a linux domain
# STEP 2. The initial memory allocation (in megabytes) for the new domain.
mem_size = 64
# STEP 3. A handy name for your new domain.
domain_name = "Test domain [%d]" % vmid
# STEP 4. Specify IP address(es), for the new domain. You need to
# configure IP addrs within the domain just as you do normally. This
# is just to let Xen know about them so it can route packets
# appropriately.
#vfr_ipaddr = ["111.222.333.444","222.333.444.555"]
vfr_ipaddr =
[XenoUtil.add_offset_to_ip(XenoUtil.get_current_ipaddr(),vmid+1),
XenoUtil.add_offset_to_ip(''169.254.1.0'',vmid),]
# STEP 5a. Identify any physcial partitions or virtual disks you want the
# domain to have access to, and what you want them accessible as
# e.g. vbd_list = [ (''phy:sda1'',''sda1'',
''w''),
# (''phy:sda%d'' % (3+vmid), ''hda2'',
''r''),
#
(''vd:as73gd784dh'',''hda1'',''w''),
#
(''phy:cdrom'',''hdd'',''r'')
vbd_list = [ (
''vd:1'',''sda1'',''w'' ),
(
''vd:2'',''sda2'',''w'' ) ]
# STEP 5b. Set the VBD expertise level. Most people should leave this
# on 0, at least to begin with - this script can detect most dangerous
# disk sharing between domains and with this set to zero it will only
# allow read only sharing.
vbd_expert = 0
# STEP 6. Build the command line for the new domain. Edit as req''d.
# You only need the ip= line if you''re NFS booting or the root file
system
# doesn''t set it later e.g. in ifcfg-eth0 or via DHCP
# You can use ''extrabit'' to set the runlevel and custom
environment
# variables used by custom rc scripts (e.g. VMID=, usr= )
netmask = XenoUtil.get_current_ipmask()
gateway = XenoUtil.get_current_ipgw()
nfsserv = ''169.254.1.0''
#cmdline_ip =
"ip="+vfr_ipaddr[0]+":"+nfsserv+":"+gateway+":"+netmask+"::eth0:off"
cmdline_root = "root=/dev/sda1 VMID=%d" % vmid
#cmdline_root = "root=/dev/nfs nfsroot=/full/path/to/root/directory"
#cmdline_extra = "4 VMID=%d usr=/dev/sda6" % vmid
# STEP 7. Set according to whether you want the script to watch the domain
# and auto-restart it should it die or exit.
auto_restart = False
#auto_restart = True
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Keir Fraser
2004-Feb-16 09:29 UTC
Re: [Xen-devel] Latest 1.2 tools fail to create new domain
> > xen:~ # xc_dom_create.py -f /etc/xc/test -D vmid=1 > Parsing config file ''/etc/xc/test'' > /usr/lib/python2.3/site-packages/XenoUtil.py:96: FutureWarning: x<<y losing > bits or changing sign will return a long in Python 2.4 and up > a = ( (string.atoi(l[0])<<24) | (string.atoi(l[1])<<16) | > VM image : "/boot/xenolinux-new.gz" > VM ramdisk : "" > VM memory (MB) : "64" > VM IP address(es) : "10.0.0.4; 169.254.1.1" > VM block device(s) : "vd:1,sda1,w; vd:2,sda2,w" > VM cmdline : " root=/dev/sda1 VMID=1 " > Traceback (most recent call last): > File "/usr/bin/xc_dom_create.py", line 308, in ? > current_id = make_domain() > File "/usr/bin/xc_dom_create.py", line 266, in make_domain > extents=segments): > SystemError: NULL result without error in PyObject_CallMake sure you you are using up-to-date Xc and XenoUtil python modules. You will need to ''make install'' within the ''tools'' directory. If this fails to help then I can add some error tracing to Xc. -- Keir ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Tvrtko A. Uršulin
2004-Feb-16 09:44 UTC
Re: [Xen-devel] Latest 1.2 tools fail to create new domain
On Monday 16 February 2004 10:29, Keir Fraser wrote:> Make sure you you are using up-to-date Xc and XenoUtil python modules. > You will need to ''make install'' within the ''tools'' directory.I made an clean bk clone this morning and ''make install''-ed it. So I think that part should be ok. Should it matter that kernel and tools are compiled with different GCC-s ? Becase tools fail to compile with 2.95.3 so I did them with 3.3.1> If this fails to help then I can add some error tracing to Xc.Please :) ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Keir Fraser
2004-Feb-16 09:55 UTC
Re: [Xen-devel] Latest 1.2 tools fail to create new domain
> On Monday 16 February 2004 10:29, Keir Fraser wrote: > > > Make sure you you are using up-to-date Xc and XenoUtil python modules. > > You will need to ''make install'' within the ''tools'' directory. > > I made an clean bk clone this morning and ''make install''-ed it. So I think > that part should be ok. > > Should it matter that kernel and tools are compiled with different GCC-s ? > Becase tools fail to compile with 2.95.3 so I did them with 3.3.1They compile okay for me with 2.95.3. It shouldn''t matter which compiler you use though.> > If this fails to help then I can add some error tracing to Xc. > > Please :)Okay, I''ve added some tracing to vbd_setextents. Pull the latest changes to 1.2, rebuild, and reinstall. -- Keir ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Tvrtko A. Uršulin
2004-Feb-16 10:14 UTC
Re: [Xen-devel] Latest 1.2 tools fail to create new domain
On Monday 16 February 2004 10:55, Keir Fraser wrote:> They compile okay for me with 2.95.3. It shouldn''t matter which > compiler you use though.Hmmm... what about this then: gcc -pthread -fno-strict-aliasing -DNDEBUG -D_FILE_OFFSET_BITS=64 -DHAVE_LARGEFILE_SUPPORT -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -fPIC -Wall -fPIC -I../lib -I/usr/include/python2.3 -c Xc.c -o build/temp.linux-i686-2.3/Xc.o In file included from /usr/include/asm/sigcontext.h:4, from /usr/include/bits/sigcontext.h:28, from /usr/include/signal.h:326, from /usr/include/python2.3/pyfpe.h:129, from /usr/include/python2.3/Python.h:135, from Xc.c:7: /usr/include/linux/compiler.h:71: warning: `__attribute_used__'' redefined /usr/include/sys/cdefs.h:195: warning: this is the location of the previous definition cc1: Invalid option `-fmessage-length=0'' error: command ''gcc'' failed with exit status 1> Okay, I''ve added some tracing to vbd_setextents. Pull the latest > changes to 1.2, rebuild, and reinstall.Here it is: xen:~/build/xeno-1.2.bk/tools # xc_dom_create.py -f /etc/xc/test -D vmid=1 Parsing config file ''/etc/xc/test'' /usr/lib/python2.3/site-packages/XenoUtil.py:96: FutureWarning: x<<y losing bits or changing sign will return a long in Python 2.4 and up a = ( (string.atoi(l[0])<<24) | (string.atoi(l[1])<<16) | VM image : "/boot/xenolinux.gz" VM ramdisk : "" VM memory (MB) : "64" VM IP address(es) : "10.0.0.4; 169.254.1.1" VM block device(s) : "vd:1,sda1,w; vd:2,sda2,w" VM cmdline : " root=/dev/sda1 VMID=1 " vbd_setextents: extent 0 -- ''nr_sectors'' is not a long. Traceback (most recent call last): File "/usr/bin/xc_dom_create.py", line 308, in ? current_id = make_domain() File "/usr/bin/xc_dom_create.py", line 266, in make_domain extents=segments): SystemError: NULL result without error in PyObject_Call ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Keir Fraser
2004-Feb-16 10:28 UTC
Re: [Xen-devel] Latest 1.2 tools fail to create new domain
> > They compile okay for me with 2.95.3. It shouldn''t matter which > > compiler you use though. > > Hmmm... what about this then: > > gcc -pthread -fno-strict-aliasing -DNDEBUG -D_FILE_OFFSET_BITS=64 > -DHAVE_LARGEFILE_SUPPORT -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -fPIC > -Wall -fPIC -I../lib -I/usr/include/python2.3 -c Xc.c -o > build/temp.linux-i686-2.3/Xc.o > In file included from /usr/include/asm/sigcontext.h:4, > from /usr/include/bits/sigcontext.h:28, > from /usr/include/signal.h:326, > from /usr/include/python2.3/pyfpe.h:129, > from /usr/include/python2.3/Python.h:135, > from Xc.c:7: > /usr/include/linux/compiler.h:71: warning: `__attribute_used__'' redefined > /usr/include/sys/cdefs.h:195: warning: this is the location of the previous > definition > cc1: Invalid option `-fmessage-length=0'' > error: command ''gcc'' failed with exit status 1Looks like a Python configuration issue. It''s selected a set of build options assuming a modern build environment that isn''t backward compatible to older GCC versions. Nothing to worry about.> > Okay, I''ve added some tracing to vbd_setextents. Pull the latest > > changes to 1.2, rebuild, and reinstall. > > Here it is:Okay, please pull and check another fix. I''ve added more debugging, and more robust parameter handling -- the problem is hopefully gone now. -- Keir ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
Tvrtko A. Uršulin
2004-Feb-16 10:49 UTC
Re: [Xen-devel] Latest 1.2 tools fail to create new domain
On Monday 16 February 2004 11:28, Keir Fraser wrote:> Okay, please pull and check another fix. I''ve added more debugging, > and more robust parameter handling -- the problem is hopefully gone > now.The problem is gone, confirmed. ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel