From: "Anand Gupta" Subject: Re: need to compile 32bit on x86_64 cpu Date: Fri, 23 Jun 2006 02:18:17 +0530 Message-ID: References: <200606221952.53577.ak@suse.de> <200606222006.25052.ak@suse.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0130431763==" Return-path: In-Reply-To: <200606222006.25052.ak@suse.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen Users Cc: Harry Butterworth , xen-devel@lists.xensource.com, Andi Kleen List-Id: xen-devel@lists.xenproject.org --===============0130431763== Content-Type: multipart/alternative; boundary="----=_Part_4499_12223541.1151009297254" ------=_Part_4499_12223541.1151009297254 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_4499_12223541.1151009297254 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_4499_12223541.1151009297254-- --===============0130431763== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0130431763==--