[Fedora-xen] "xm create" error: /usr/lib64/python2.4/site-packages/xen/xm/opts.py:452: DeprecationWarning: Non-ASCII character '\xeb'

Aleksander Adamowski aleksander.adamowski.redhat at altkom.com.pl
Thu Mar 30 11:23:52 UTC 2006


Introduction: when one installs a Xen guest using xenguest-install.py, 
at the end of the installation the guest is shutdown and 
xenguest-install.py prints out instructions to start it up with "xm 
create -c GUEST_NAME".

The instructions are wrong - the parameter to "-c" switch is a file 
name, so a full path is needed. So the instructions should read "xm 
create -c /etc/xen/GUEST_NAME" instead.

If one proceeds according to the instructions, and the current working 
directory isn't /etc/xen, an unhelpful error will occur:

--- SNIP ----

[root at domzero2 xen]# xm create -c svn
Using config file "svn".
/usr/lib64/python2.4/site-packages/xen/xm/opts.py:452: 
DeprecationWarning: Non-ASCII character '\xeb' in file svn on line 1, 
but no encoding declared; see http://www.python.org/peps/pep-0263.html 
for details
  execfile(defconfig, globs, locs)
Error: invalid syntax (svn, line 1)
[root at domzero2 xen]# hexdump -C /etc/xen/svn
00000000  23 20 41 75 74 6f 6d 61  74 69 63 61 6c 6c 79 20  |# 
Automatically |
00000010  67 65 6e 65 72 61 74 65  64 20 78 65 6e 20 63 6f  |generated 
xen co|
00000020  6e 66 69 67 20 66 69 6c  65 0a 6e 61 6d 65 20 3d  |nfig 
file.name =|
00000030  20 22 73 76 6e 22 0a 6d  65 6d 6f 72 79 20 3d 20  | 
"svn".memory = |
00000040  22 35 31 32 22 0a 64 69  73 6b 20 3d 20 5b 20 27  |"512".disk 
= [ '|
00000050  66 69 6c 65 3a 2f 76 61  72 2f 78 65 6e 2f 73 76  
|file:/var/xen/sv|
00000060  6e 2c 78 76 64 61 2c 77  27 20 5d 0a 76 69 66 20  |n,xvda,w' 
].vif |
00000070  3d 20 5b 20 27 6d 61 63  3d 30 30 3a 31 36 3a 33  |= [ 
'mac=00:16:3|
00000080  65 3a 33 62 3a 38 65 3a  34 63 27 20 5d 0a 62 6f  |e:3b:8e:4c' 
].bo|
00000090  6f 74 6c 6f 61 64 65 72  3d 22 2f 75 73 72 2f 62  
|otloader="/usr/b|
000000a0  69 6e 2f 70 79 67 72 75  62 22 0a 0a 6f 6e 5f 72  
|in/pygrub"..on_r|
000000b0  65 62 6f 6f 74 20 20 20  3d 20 27 72 65 73 74 61  |eboot   = 
'resta|
000000c0  72 74 27 0a 6f 6e 5f 63  72 61 73 68 20 20 20 20  
|rt'.on_crash    |
000000d0  3d 20 27 72 65 73 74 61  72 74 27 0a              |= 'restart'.|
000000dc

--- SNIP ----


Of course, there's no "EB" byte in this guest config file, as can be 
seen on the hexdump! When starting the guest using a full path all is OK:


--- SNIP ----

[root at domzero2 xen]# xm create -c /etc/xen/svn
    pyGRUB  version 0.3
 ┌────────────────────────
 │ Fedora Core (2.6.15-1.2054_FC5xenU)                                    │
 │                                                                        │
 │                                                                        │
 │                                                                        │
 │                                                                        │
 │                                                                        │
 │                                                                        │
 │                                                                        │
 └─────────────────────────
     Use the - and . keys to select which entry is highlighted.
     Press enter to boot the selected OS. 'e' to edit the
     commands before booting, 'a' to modify the kernel arguments
     before booting, or 'c' for a command line.

     Will boot selected entry in  1 seconds
Going to boot Fedora Core (2.6.15-1.2054_FC5xenU)
  kernel: /boot/vmlinuz-2.6.15-1.2054_FC5xenU
  initrd: /boot/initrd-2.6.15-1.2054_FC5xenU.img
Started domain svn
Bootdata ok (command line is  ro root=LABEL=/)
Linux version 2.6.15-1.2054_FC5xenU 
(bhcompile at hs20-bc1-7.build.redhat.com) (gcc version 4.1.0 20060304 (Red 
Hat 4.1.0-3)) #1 SMP Tue Mar 14 16:18:03 EST 2006
Built 1 zonelists
Kernel command line:  ro root=LABEL=/
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 131072 bytes)
Xen reported: 1804.087 MHz processor.
Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
Software IO TLB disabled
Memory: 507260k/532480k available (1891k kernel code, 24560k reserved, 
720k data, 116k init)
Calibrating delay using timer specific routine.. 4512.41 BogoMIPS 
(lpj=9024823)
Security Framework v1.0.0 initialized
SELinux:  Initializing.
SELinux:  Starting in permissive mode
selinux_register_security:  Registering secondary module capability
Capability LSM initialized as secondary
Mount-cache hash table entries: 256
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 1024K (64 bytes/line)
Brought up 1 CPUs
0
checking if image is initramfs... it is
Freeing initrd memory: 1890k freed
DMI not present or invalid.
Grant table initialized

.....
--- SNIP ----



-- 
Best Regards,
    Aleksander Adamowski
        GG#: 274614
        ICQ UIN: 19780575 
	http://olo.ab.altkom.pl




More information about the Fedora-xen mailing list