Bug 189166

Summary: xm create bombs out with (22, 'Invalid argument')
Product: [Fedora] Fedora Reporter: Michael De La Rue <mvyynqbgerqungqbgpbz.yeuhc>
Component: xenAssignee: Xen Maintainance List <xen-maint>
Status: CLOSED WORKSFORME QA Contact: Brian Brock <bbrock>
Severity: high Docs Contact:
Priority: medium    
Version: 5CC: bstein, katzj
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
URL: http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=611
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-03-26 20:17:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
xm dmesg output after boot.
none
output in xend.log from a failed run
none
various random system information
none
various random system information none

Description Michael De La Rue 2006-04-17 19:33:59 UTC
Description of problem:
during xenguest-install.py the error 
Error: Error creating domain: (22, 'Invalid argument')
is output and the install aborts.  The filesystem is created for the new guest,
but it is empty.  

Version-Release number of selected component (if applicable):
xen-3.0.1-4
kernel-xen0-2.6.16-1.2080_FC5
kernel-xenU-2.6.16-1.2080_FC5


How reproducible:
every time.

Steps to Reproduce:
1. install FC5 clean, selecting various package sets e.g. development
2. login as own user on graphical console and su to root
3. "yum update" "yum install xen" "yum install kernel-xen0" "yum install
kernel-xenU"
4. edit /etc/grub.conf add dom0_mem=512M to kernel line of xen boot item
5. reboot 
6. login as own user on graphical console and su to root
7. /usr/sbin/xenguest-install.py
What is the name of your virtual machine? test3
 How much RAM should be allocated (in megabytes)? 384
 What would you like to use as the disk (path)? /root/test3
 How large would you like the disk to be (in gigabytes)? 4
 What is the install location?
http://sunsite.icm.edu.pl/pub/Linux/fedora/linux/core/5/i386/os/


Actual results:
The install process runs producing only the following output.

Starting install...
Using config file "/etc/xen/test3".
Error: Error creating domain: (22, 'Invalid argument')
If your install has exited, you can restart your guest by running
'xm create -c test3'.  Otherwise, you can reconnect to the console
by running 'xm console test3'

The system file is created but is empty.
[root@localhost ~]# ls -l /root/test3
-rwxr-xr-x 1 root root 4294967297 Apr 17 12:35 /root/test3
[root@localhost ~]# ls -s /root/test3
16 /root/test3

Expected results:
the system installer should automatically start within the xen session and it
should be possible to install fedora core in the image file.

Additional info:
"service xend status" gives no output
xend status returns 0

xm list ---->
Name                              ID Mem(MiB) VCPUs State  Time(s)
Domain-0                           0      512     1 r-----  8865.6

I just list the following since it seemed coincidental that the error message is
the same.  I found it whilst trying to work out if the xm command was working
generally. 

xm unpause 0 ---->
Error: (22, 'Invalid argument')

Running in the python debugger I have traced this to an xm create command run
like this:
['/usr/sbin/xm', 'create', '-c', 'kernel=/var/lib/xen/vmlinuz.kbMJrQ',
'ramdisk=/var/lib/xen/initrd.img.-UDASm',
'extra=method=http://sunsite.icm.edu.pl/pub/Linux/fedora/linux/core/5/i386/os/
', '/etc/xen/test4']

I managed to trace the failure to a call to self.xendPost() on line 206 of
/usr/lib/python2.4/site-packages/xen/xend/XendClient.py.  The following config
was given as an argument:

['vm', ['name', 'test4'], ['memory', '384'], ['on_reboot', 'destroy'],
['on_crash', 'destroy'], ['vcpus', 1], ['image', ['linux', ['kernel',
'/var/lib/xen/vmlinuz.kbMJrQ'], ['ramdisk', '/var/lib/xen/initrd.img.-UDASm'],
['args',
'method=http://sunsite.icm.edu.pl/pub/Linux/fedora/linux/core/5/i386/os/']]],
['device', ['vbd', ['uname', 'file:/root/test4'], ['dev', 'xvda'], ['mode',
'w']]], ['device', ['vif', ['mac', '00:16:3e:33:48:c5']]]]


all of the appropriate files existed correctly at the time this call was going
to be made.  

xen bug 611 looks remarkably similar to this one. 
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=611 
however, it's also on FC5, so this is quite likely to be a Fedora specific issue.  

For some reason the system install is now working for me.  I have
/etc/selinux/config with SELINUX=permissive and I'm logged in via ssh.

Comment 1 Michael De La Rue 2006-04-17 19:33:59 UTC
Created attachment 127823 [details]
xm dmesg output after boot.

Comment 2 Michael De La Rue 2006-04-17 20:30:10 UTC
Created attachment 127860 [details]
output in xend.log from a failed run

attached file shows xend.log from one of my test runs.	

xend-debug.log reads like this

Supported features  = { 0000001f }.
Required features   = { 00000000 }.
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/xen/xend/server/SrvDomainDir.py", line
77, in op_create
    dominfo = self.xd.domain_create(config)
  File "/usr/lib/python2.4/site-packages/xen/xend/XendDomain.py", line 226, in
domain_create
    dominfo = XendDomainInfo.create(config)
  File "/usr/lib/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 182,
in create
    vm.initDomain()
  File "/usr/lib/python2.4/site-packages/xen/xend/XendDomainInfo.py", line
1215, in initDomain
    self.introduceDomain()
  File "/usr/lib/python2.4/site-packages/xen/xend/XendDomainInfo.py", line
1168, in introduceDomain
    raise XendError(str(exn))
XendError: (22, 'Invalid argument')

Comment 3 Michael De La Rue 2006-04-17 20:55:16 UTC
Created attachment 127862 [details]
various random system information

The system is an IBM R51 laptop.  It has 2Gb RAM and a single ethernet
interface. 

in the attachment is the output from:
 xm info
 cat /proc/cpuinfo
 cat /proc/ioports
 cat /proc/interrupts
 lspci
 cat /etc/grub.conf

Comment 4 Michael De La Rue 2006-04-17 21:02:30 UTC
Created attachment 127895 [details]
various random system information

The system is an IBM R51 laptop.  It has 2Gb RAM and a single ethernet
interface. 

in the attachment is the output from:
 xm info
 cat /proc/cpuinfo
 cat /proc/ioports
 cat /proc/interrupts
 lspci
 cat /etc/grub.conf

Comment 5 Daniel Berrangé 2007-03-26 20:17:14 UTC
Closing on the basis that FC5 is now updated to Xen 3.0.3 which has almost
certainly fixed the original problem. The latest Xen in Fedora 7 will also
replace the 'Invalid arguemnt' error message with something useful which will
make diagnosis of future problems easier.

Please re-open in the unlikely even the latest FC5 errata are still giving the
same problem