WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-devel] Re: need to compile 32bit on x86_64 cpu

To: "Xen Users" <Xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: need to compile 32bit on x86_64 cpu
From: "Anand Gupta" <xen.mails@xxxxxxxxx>
Date: Fri, 23 Jun 2006 02:18:17 +0530
Cc: Harry Butterworth <harry@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Andi Kleen <ak@xxxxxxx>
Delivery-date: Thu, 22 Jun 2006 13:48:47 -0700
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=hj1bmVVW9QsqHwKTqKoqhTsb1hPsaK4kWn1VQO8p4YuEBHEZzjtIjYsaNcZEWQ9s20VfsB1RgD+B8KPuk89ekw4KRILFhdWxvvU5sCX0RdlPunkNeKlm01SM/gxP2ndV8k7/xrEyS3SvspRU1FtfWExfeLlHc83+5H5HNfQZfO4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200606222006.25052.ak@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <acb757c00606220941m54a85ddy8c504a17f11c9ab8@xxxxxxxxxxxxxx> <200606221952.53577.ak@xxxxxxx> <acb757c00606221054q5795807dm4fe845e9cc538123@xxxxxxxxxxxxxx> <200606222006.25052.ak@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
I finally got the compilation done and copied the kernel and init image for use for domU for 32bit OS.

When i try to use the kernel i get an error "Error: (9, 'Bad file descriptor')"

Here is the extract from xend.log,

[2006-06-22 13:33:16 xend.XendDomainInfo] DEBUG (XendDomainInfo:877) XendDomainInfo.handleShutdownWatch
[2006-06-22 13:33:16 xend.XendDomainInfo] DEBUG (XendDomainInfo:877) XendDomainInfo.handleShutdownWatch
[2006-06-22 13:33:30 xend.XendDomainInfo] INFO (XendDomainInfo:836) Domain has shutdown: name=anand01 id=5 reason=poweroff.
[2006-06-22 13:33:30 xend.XendDomainInfo] DEBUG (XendDomainInfo:1327) XendDomainInfo.destroy : domid=5
[2006-06-22 13:33:30 xend.XendDomainInfo] DEBUG (XendDomainInfo:1335) XendDomainInfo.destroyDomain(5)
[2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:178) XendDomainInfo.create(['vm', ['name', 'anand01'], ['memory', 256], ['vcpus', 1], ['image', ['linux', ['kernel', '/home/vmlinuz- 2.6.16.13-xen-x86_32'], ['ramdisk', '/home/initrd-2.6.16-xen-x86_32.img'], ['ip', 'x.x.x.x:1.2.3.4:y.y.y.y:255.255.255.128::eth0:off'], ['root', '/dev/sda1 ro'], ['args', 'selinux=0 3']]], ['device', ['vbd', ['uname', 'phy:/dev/vg01/anand01'], ['dev', 'sda1'], ['mode', 'w']]], ['device', ['vbd', ['uname', 'phy:/dev/vg01/anand01-swap'], ['dev', 'sda2'], ['mode', 'w']]], ['device', ['vif', ['ip', ' x.x.x.x'], ['mac', '00:16:00:18:99:FB'], ['vifname', 'anand01'], ['bridge', 'xenbr0']]]])
[2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:284) parseConfig: config is ['vm', ['name', 'anand01'], ['memory', 256], ['vcpus', 1], ['image', ['linux', ['kernel', '/home/vmlinuz- 2.6.16.13-xen-x86_32'], ['ramdisk', '/home/initrd-2.6.16-xen-x86_32.img'], ['ip', 'x.x.x.x:1.2.3.4:y.y.y.y:255.255.255.128::eth0:off'], ['root', '/dev/sda1 ro'], ['args', 'selinux=0 3']]], ['device', ['vbd', ['uname', 'phy:/dev/vg01/anand01'], ['dev', 'sda1'], ['mode', 'w']]], ['device', ['vbd', ['uname', 'phy:/dev/vg01/anand01-swap'], ['dev', 'sda2'], ['mode', 'w']]], ['device', ['vif', ['ip', ' x.x.x.x'], ['mac', '00:16:00:18:99:FB'], ['vifname', 'anand01'], ['bridge', 'xenbr0']]]]
[2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:380) parseConfig: result is {'ssidref': None, 'uuid': None, 'on_crash': None, 'on_reboot': None, 'image': ['linux', ['kernel', '/home/vmlinuz- 2.6.16.13-xen-x86_32'], ['ramdisk', '/home/initrd-2.6.16-xen-x86_32.img'], ['ip', 'x.x.x.x:1.2.3.4:y.y.y.y:255.255.255.128::eth0:off'], ['root', '/dev/sda1 ro'], ['args', 'selinux=0 3']], 'on_poweroff': None, 'cpus': None, 'name': 'anand01', 'backend': [], 'vcpus': 1, 'cpu_weight': None, 'vcpu_avail': None, 'memory': 256, 'device': [('vbd', ['vbd', ['uname', 'phy:/dev/vg01/anand01'], ['dev', 'sda1'], ['mode', 'w']]), ('vbd', ['vbd', ['uname', 'phy:/dev/vg01/anand01-swap'], ['dev', 'sda2'], ['mode', 'w']]), ('vif', ['vif', ['ip', ' x.x.x.x'], ['mac', '00:16:00:18:99:FB'], ['vifname', 'anand01'], ['bridge', 'xenbr0']])], 'bootloader': None, 'cpu': None, 'maxmem': None}
[2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:1164) XendDomainInfo.construct : None 0
[2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:1196) XendDomainInfo.initDomain: 6 1.0
[2006-06-22 13:34:10 xend] DEBUG (balloon:126) Balloon: free 257; need 257; done.
[2006-06-22 13:34:10 xend] INFO (image:135) buildDomain os=linux dom=6 vcpus=1
[2006-06-22 13:34:10 xend] DEBUG (image:173) dom            = 6
[2006-06-22 13:34:10 xend] DEBUG (image:174) image          = /home/vmlinuz-2.6.16.13-xen-x86_32
[2006-06-22 13:34:10 xend] DEBUG (image:175) store_evtchn   = 1
[2006-06-22 13:34:10 xend] DEBUG (image:176) console_evtchn = 2
[2006-06-22 13:34:10 xend] DEBUG (image:177) cmdline        =  ip=x.x.x.x:1.2.3.4:y.y.y.y:255.255.255.128::eth0:off root=/dev/sda1 ro selinux=0 3
[2006-06-22 13:34:10 xend] DEBUG (image:178) ramdisk        = /home/initrd- 2.6.16-xen-x86_32.img
[2006-06-22 13:34:10 xend] DEBUG (image:179) vcpus          = 1
[2006-06-22 13:34:10 xend] DEBUG (image:180) features       =
[2006-06-22 13:34:10 xend.XendDomainInfo] ERROR (XendDomainInfo:190) Domain construction failed
Traceback (most recent call last):
  File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/XendDomainInfo.py", line 183, in create
    vm.initDomain()
  File "/home/xen/xen-3.0.2-2 /dist/install/usr/lib64/python/xen/xend/XendDomainInfo.py", line 1225, in initDomain
    channel_details = self.image.createImage()
  File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/image.py", line 118, in createImage
    return self.createDomain()
  File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/image.py", line 137, in createDomain
    result = self.buildDomain()
  File "/home/xen/xen-3.0.2-2 /dist/install/usr/lib64/python/xen/xend/image.py", line 188, in buildDomain
    features       = self.features)
error: (9, 'Bad file descriptor')
[2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:1327) XendDomainInfo.destroy: domid=6
[2006-06-22 13:34:10 xend.XendDomainInfo] DEBUG (XendDomainInfo:1335) XendDomainInfo.destroyDomain(6)
[2006-06-22 13:34:10 xend] ERROR (xmlrpclib2:124) (9, 'Bad file descriptor')
Traceback (most recent call last):
  File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/util/xmlrpclib2.py", line 103, in _marshaled_dispatch
    response = self._dispatch(method, params)
  File "/usr/lib64/python2.3/SimpleXMLRPCServer.py", line 407, in _dispatch
    return func(*params)
  File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/server/XMLRPCServer.py", line 63, in domain_create
    info = XendDomain.instance().domain_create(config)
  File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/XendDomain.py", line 227, in domain_create
    dominfo = XendDomainInfo.create(config)
  File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/XendDomainInfo.py", line 183, in create
    vm.initDomain()
  File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/XendDomainInfo.py", line 1225, in initDomain
    channel_details = self.image.createImage()
  File "/home/xen/xen- 3.0.2-2/dist/install/usr/lib64/python/xen/xend/image.py", line 118, in createImage
    return self.createDomain()
  File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/image.py", line 137, in createDomain
    result = self.buildDomain()
  File "/home/xen/xen-3.0.2-2/dist/install/usr/lib64/python/xen/xend/image.py", line 188, in buildDomain
    features       = self.features)
error: (9, 'Bad file descriptor')

This probably would mean that the kernel compiled is a non xen kernel ? (Please correct me if i am wrong)

I used the following to compile the kernel (after i used setarch linux32 bash)

make linux-2.6-xen-config CONFIGMODE=menuconfig
make linux-2.6-xen-build

I then copied the dist/install/lib/modules to /lib/modules and then used depmod and mkinitrd to create the initrd image. Moved the kernel from dist/install/boot to /home where i call them from inside the config files.

Can anyone tell me how to resolve the above problem ?

--
regards,

Anand Gupta
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>