Arndale: domU not booting
Dear all,
I followed the steps described in the wiki in order to get an Arnadle board running Xen, but I'm having trouble in starting a domU. Let me describe you the steps I followed. Sorry for such a long mail, but I think that a verbose description is necessary so you can point me what I'm doing wrong.
I couldn't boot properly over the network. This is why I modified the boot script so everything was loaded from the microSD (assuming it only contains one partition, which starts at sector 10240 and has all the necessary files in it at its root, along with the filesystem). To achieve it, simply take the source file I attach in this mail and convert it to an img file with:
/mkimage -T script -C none -d load-xen-mmc.scr.txt load-xen-mmc.img/
Then set up the environment variables in the board with:
/setenv xen_addr_r 0x50000000//
//setenv kernel_addr_r 0x60000000//
//setenv dtb_addr_r 0x42000000//
//setenv script_addr_r 0x40080000//
//
//setenv bootcmd_load_linux_mmc 'ext2load mmc 0:1 $kernel_addr_r /zImage'//
//setenv bootcmd_load_xen_mmc 'ext2load mmc 0:1 $xen_addr_r /xen-uImage'//
//setenv bootcmd_load_dtb_mmc 'ext2load mmc 0:1 $dtb_addr_r /exynos5250-arndale.dtb'//
//setenv bootcmd_load_script_mmc 'ext2load mmc 0:1 $script_addr_r /load-xen-mmc.img'//
//
//setenv bootcmd 'run bootcmd_load_script_mmc; source $script_addr_r'//
//setenv xen_bootargs 'sync_console console=dtuart dtuart=/serial@12C20000'//
//setenv dom0_bootargs 'console=hvc0 ignore_loglevel psci=enable clk_ignore_unused root=/dev/mmcblk1p1 rw rootwait earlyprintk'/
Save the changes with saveenv and simply boot.
At this point, I was able to launch the kernel and Xen successfully, and to log into the dom0. I couldn't find any reference on the exact steps to follow in order to be able to execute the "xl" command properly, as the wiki only says that a native compilation of the tools is necessary. So, what I did was to copy the xen source code in the board and compiled it with "make install-tools" (after running ./configure and installing the required packages).
I had to modify some library paths (apend "include /usr/local/lib/" to /etc/ld.so.conf and run ldconfig), start xencommons manually (/etc/init.d/xencommons start) and finally I've been able to run "xl list". Nevertheless, when xencommons is started, it outputs:
/
//root@arndale:/# /etc/init.d/xencommons start// //Starting C xenstored...WARNING: Failed to open connection to gnttab// //Setting domain 0 name...// //Starting xenconsoled...// //Starting QEMU as disk backend for dom0// ///etc/init.d/xencommons: line 120: /usr/local/lib/xen/bin/qemu-system-i386: No such file or directory/
At this point, xl list displays:
/root@arndale:/# xl list// //Name ID Mem VCPUs State Time(s)// //Domain-0 0 128 2 r----- 309.8/
Then I tried to create the VM described in the wiki, but to no avail. I copied all the necessary files, concatenated the domU kernel with the xenvm dtb, but in the end I get the following output:
/
//root@arndale:~# xl create -c vmDescriptor.cfg // //Parsing config from vmDescriptor.cfg// ///etc/xen/scripts/block: line 3: dirname: command not found// ///etc/xen/scripts/block: line 4: /block-common.sh: No such file or directory// ///etc/xen/scripts/block: line 208: xenstore_read_default: command not found// //libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/block add [15289] exited with error status 1// //libxl: error: libxl_create.c:935:domcreate_launch_dm: unable to add disk devices// ///etc/xen/scripts/block: line 3: dirname: command not found// ///etc/xen/scripts/block: line 4: /block-common.sh: No such file or directory// ///etc/xen/scripts/block: line 208: xenstore_read_default: command not found// //libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/block remove [15297] exited with error status 1// //Aborted/
Could you please tell me what is happening? Is there a step I'm not taking into consideration?
Many thanks. Best regards,
Josep Subirats
WARNING / LEGAL TEXT: This message is intended only for the use of the individual or entity to which it is addressed and may contain information which is privileged, confidential, proprietary, or exempt from disclosure under applicable law. If you are not the intended recipient or the person responsible for delivering the message to the intended recipient, you are strictly prohibited from disclosing, distributing, copying, or in any way using this message. If you have received this communication in error, please notify the sender and destroy and delete any copies you may have received.
# Load Linux in memory
run bootcmd_load_linux_mmc
# Load Xen in memory
run bootcmd_load_xen_mmc
# Load the device tree in memory
run bootcmd_load_dtb_mmc
## Fixup the device tree
# Be sure U-boot is using our FDT
fdt addr $dtb_addr_r
# Resize the FDT just in case
fdt resize
# Set Xen arguments based on $xen_bootargs
fdt set /chosen xen,xen-bootargs \"$xen_bootargs\"
#setenv bootargs $xen_bootargs # On Xen unstable, xen cmdline is in bootargs # Set Dom0 arguments based on $dom0_bootargs
fdt set /chosen xen,dom0-bootargs \"$dom0_bootargs\"
# Create modules node
fdt mknode /chosen modules
fdt set /chosen/modules '#address-cells' <1>
fdt set /chosen/modules '#size-cells' <1>
# Create node for the linux located at $kernel_addr_r
# It seems U-boot doesn't have command to retrieve the size, so the size is
# set to a big value (10Mb) fdt mknode /chosen/modules module@0 fdt set /chosen/modules/module@0 compatible xen,linux-zimage xen,multiboot-module fdt set /chosen/modules/module@0 reg <$kernel_addr_r 0x00a00000>
## Boot Xen
bootm $xen_addr_r - $dtb_addr_r
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
I just observed the following output in the serial console, too:
/
//[ 3112.311649] platform 122f0000.sata: Driver exynos-sata requests probe deferral//
//[ 3113.060272] attempt to access beyond end of device//
//[ 3113.063630] mmcblk1p1: rw=0, want=15886903136, limit=30210048//
//[ 3113.069404] attempt to access beyond end of device//
//[ 3113.074168] mmcblk1p1: rw=0, want=15886903136, limit=30210048//
//udevd[15288]: '/sbin/modprobe -b xen-backend:vbd' [15290] terminated by signal 7 (Bus error)//
//
//udevd[15302]: failed to execute '/etc/xen/scripts/xen-hotplug-cleanup' '/etc/xen/scripts/xen-hotplug-cleanup': Exec format error// //
//[ 3113.272567] Failed to unmap pfn:a7525 rc:-2//
//INIT: Id "T0" respawning too fast: disabled for 5 minutes//
//[ 3339.357270] EXT3-fs error (device mmcblk1p1): ext3_lookup: deleted inode referenced: 814983//
//[ 3339.364160] Aborting journal on device mmcblk1p1.//
//[ 3340.185603] EXT3-fs (mmcblk1p1): error: remounting filesystem read-only//
/
Thanks,
Josep
Quoted 58 lines · Josep Subirats
Dear all,
I followed the steps described in the wiki in order to get an Arnadle board running Xen, but I'm having trouble in starting a domU. Let me describe you the steps I followed. Sorry for such a long mail, but I think that a verbose description is necessary so you can point me what I'm doing wrong.
I couldn't boot properly over the network. This is why I modified the boot script so everything was loaded from the microSD (assuming it only contains one partition, which starts at sector 10240 and has all the necessary files in it at its root, along with the filesystem). To achieve it, simply take the source file I attach in this mail and convert it to an img file with:
/mkimage -T script -C none -d load-xen-mmc.scr.txt load-xen-mmc.img/
Then set up the environment variables in the board with:
/setenv
xen_addr_r0x50000000//
//setenvkernel_addr_r0x60000000//
//setenvdtb_addr_r0x42000000//
//setenvscript_addr_r0x40080000//
//
//setenvbootcmd_load_linux_mmc'ext2load mmc 0:1 $kernel_addr_r /zImage'//
//setenvbootcmd_load_xen_mmc'ext2load mmc 0:1 $xen_addr_r /xen-uImage'//
//setenvbootcmd_load_dtb_mmc'ext2load mmc 0:1 $dtb_addr_r /exynos5250-arndale.dtb'//
//setenvbootcmd_load_script_mmc'ext2load mmc 0:1 $script_addr_r /load-xen-mmc.img'//
//
//setenv bootcmd 'runbootcmd_load_script_mmc; source $script_addr_r'//
//setenvxen_bootargs'sync_consoleconsole=dtuart dtuart=/serial@12C20000'//
//setenvdom0_bootargs'console=hvc0ignore_loglevelpsci=enableclk_ignore_unusedroot=/dev/mmcblk1p1 rw rootwait earlyprintk'/Save the changes with saveenv and simply boot.
At this point, I was able to launch the kernel and Xen successfully, and to log into the dom0. I couldn't find any reference on the exact steps to follow in order to be able to execute the "xl" command properly, as the wiki only says that a native compilation of the tools is necessary. So, what I did was to copy the xen source code in the board and compiled it with "make install-tools" (after running ./configure and installing the required packages).
I had to modify some library paths (apend "include
/usr/local/lib/" to/etc/ld.so.confand run ldconfig), start xencommons manually (/etc/init.d/xencommonsstart) and finally I've been able to run "xl list". Nevertheless, when xencommons is started, it outputs:
///root@arndale:/# /etc/init.d/xencommons start// //Starting C xenstored...WARNING: Failed to open connection to gnttab// //Setting domain 0 name...// //Starting xenconsoled...// //Starting QEMU as disk backend for dom0// ///etc/init.d/xencommons: line 120: /usr/local/lib/xen/bin/qemu-system-i386: No such file or directory/At this point, xl list displays:
/root@arndale:/# xl list// //Name ID Mem VCPUs State Time(s)// //Domain-0 0 128 2 r----- 309.8/Then I tried to create the VM described in the wiki, but to no avail. I copied all the necessary files, concatenated the domU kernel with the xenvm dtb, but in the end I get the following output:
///root@arndale:~# xl create -c vmDescriptor.cfg // //Parsing config from vmDescriptor.cfg// ///etc/xen/scripts/block: line 3: dirname: command not found// ///etc/xen/scripts/block: line 4: /block-common.sh: No such file or directory// ///etc/xen/scripts/block: line 208: xenstore_read_default: command not found// //libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/block add [15289] exited with error status 1// //libxl: error: libxl_create.c:935:domcreate_launch_dm: unable to add disk devices// ///etc/xen/scripts/block: line 3: dirname: command not found// ///etc/xen/scripts/block: line 4: /block-common.sh: No such file or directory// ///etc/xen/scripts/block: line 208: xenstore_read_default: command not found// //libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/block remove [15297] exited with error status 1// //Aborted/
Quoted 5 lines
Could you please tell me what is happening? Is there a step I'm not taking into consideration?
Many thanks. Best regards,
Josep Subirats
WARNING / LEGAL TEXT: This message is intended only for the use of the individual or entity to which it is addressed and may contain information which is privileged, confidential, proprietary, or exempt from disclosure under applicable law. If you are not the intended recipient or the person responsible for delivering the message to the intended recipient, you are strictly prohibited from disclosing, distributing, copying, or in any way using this message. If you have received this communication in error, please notify the sender and destroy and delete any copies you may have received.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 2 lines · Josep Subirats
root@arndale:/# /etc/init.d/xencommons start Starting C xenstored...WARNING: Failed to open connection to gnttab
Make sure you have all the Xen drivers enabled in your kernel, including the gnttab one. Also make sure the modules are loaded, or better build them into the kernel statically.
Quoted 7 lines
Then I tried to create the VM described in the wiki, but to no avail. I copied all the necessary files, concatenated the domU kernel with the xenvm dtb, but in the end I get the following output:
root@arndale:~# xl create -c vmDescriptor.cfg Parsing config from vmDescriptor.cfg /etc/xen/scripts/block: line 3: dirname: command not found
Your root filesystem seems to be missing the coreutils package (or something else which provides dirname). The following errors all look like fallout from this.
Ian.
Dear Mr. Campbell,
Many thanks for your answer. I recompiled the dom0 kernel with GNTDEV (couldn't find gnttab, were you referring to gntdev?) built into the kernel, and any other XEN driver. Should I also recompile the domU kernel with this option? I also gave execution rights to the "image" (kernel+xendtb) file, just in case. I installed qemu-system and qemu-utils and linked /usr/local/lib/xen/bin/qemu-system-i386 to the path where qemu-system-i386 was actually located. When I boot, I execute:
/root@arndale:~/vmTest# /etc/init.d/xencommons start// //Starting C xenstored...// //Setting domain 0 name...// //Starting xenconsoled...// //Starting QEMU as disk backend for dom0 Option xen-domid not supported for this target // //root@arndale:~/vmTest# /etc/init.d/xendomains start/
What I now get when I try to create the VM is:
/root@arndale:~/vmTest# xl create -c vmTest.cfg // //Parsing config from vmTest.cfg// ///etc/xen/scripts/block-common.sh: line 1: Jն�:���ʗ/_y�^�����A�: No such file or directory// ///etc/xen/scripts/block-common.sh: line 2: $'\247\206\261p\252\036#t\207\216#\301T\317': command not found// ///etc/xen/scripts/block-common.sh: line 3: ��0��: Input/output error// ///etc/xen/scripts/block-common.sh: line 4: $'\313\361+K\364\260Z\375\271\314\005\275\366v\276\035\2776\032j\324KsoW\276OJ:': command not found// // //malloc: ../bash/subst.c:8485: assertion botched// //malloc: block on free list clobbered // //Aborting...libxl: error: libxl_exec.c:129:libxl_report_child_exitstatus: /etc/xen/scripts/block add [3155] died due to fatal signal Aborted // //libxl: error: libxl_create.c:935:domcreate_launch_dm: unable to add disk devices // //libxl: error: libxl_xshelp.c:212:libxl__xs_transaction_start: could not create xenstore transaction: Read-only file system // //libxl: error: libxl_device.c:798:libxl__initiate_device_remove: unable to start transaction // //libxl: error: libxl_xshelp.c:212:libxl__xs_transaction_start: could not create xenstore transaction: Read-only file system// //libxl: error: libxl.c:1456:devices_destroy_cb: libxl__devices_destroy failed for 1/
After this, the filesystem becomes read-only and I have to reboot the whole board. What can be happening?
Many thanks for your help.
Kind regards,
Josep
Quoted 12 lines · Ian Campbell
Quoted 2 lines · Josep Subirats
root@arndale:/# /etc/init.d/xencommons start Starting C xenstored...WARNING: Failed to open connection to gnttabMake sure you have all the Xen drivers enabled in your kernel, including the gnttab one. Also make sure the modules are loaded, or better build them into the kernel statically.
Quoted 4 lines
Then I tried to create the VM described in the wiki, but to no avail. I copied all the necessary files, concatenated the domU kernel with the xenvm dtb, but in the end I get the following output:
Quoted 9 lines
Quoted 3 lines
root@arndale:~# xl create -c vmDescriptor.cfg Parsing config from vmDescriptor.cfg /etc/xen/scripts/block: line 3: dirname: command not foundYour root filesystem seems to be missing the coreutils package (or something else which provides dirname). The following errors all look like fallout from this.
Ian.
WARNING / LEGAL TEXT: This message is intended only for the use of the individual or entity to which it is addressed and may contain information which is privileged, confidential, proprietary, or exempt from disclosure under applicable law. If you are not the intended recipient or the person responsible for delivering the message to the intended recipient, you are strictly prohibited from disclosing, distributing, copying, or in any way using this message. If you have received this communication in error, please notify the sender and destroy and delete any copies you may have received.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 5 lines · Josep Subirats
Dear Mr. Campbell,
Many thanks for your answer. I recompiled the dom0 kernel with GNTDEV (couldn't find gnttab, were you referring to gntdev?) built into the kernel, and any other XEN driver.
It looks like the message has gone, so you've got the right one,
Quoted 1 line
Should I also recompile the domU kernel with this option?
Not for your use case (i.e. getting a basic domU running).
Quoted 2 lines
I also gave execution rights to the "image" (kernel+xendtb) file,
just in case.
There is no need, but it is harmless enough to do so.
Quoted 3 lines
I installed qemu-system and qemu-utils and
linked/usr/local/lib/xen/bin/qemu-system-i386to the path where qemu-system-i386 was actually located.
This wasn't necessary. The warning is benign.
Quoted 8 lines
When I boot, I execute:
root@arndale:~/vmTest# /etc/init.d/xencommons start Starting C xenstored... Setting domain 0 name... Starting xenconsoled... Starting QEMU as disk backend for dom0 Option xen-domid not supported for this target
What does your disk stanza look like? Currently only "phy" type ones are supported on ARM. It looks like you are using something wihch wants to use a qemu backend, which is not something the rest of us have tried yet. I recommend using either a physical device or /dev/loop for the time being
Quoted 9 lines
root@arndale:~/vmTest# /etc/init.d/xendomains startWhat I now get when I try to create the VM is:
root@arndale:~/vmTest# xl create -c vmTest.cfg Parsing config from vmTest.cfg /etc/xen/scripts/block-common.sh: line 1: Jն�:���ʗ/_y�^�����A�: No such file or directory
Something is very wrong/corrupted with your root filesystem and or the device underlying it.
Quoted 2 lines
After this, the filesystem becomes read-only and I have to reboot the whole board. What can be happening?
My first impression is that your disk or mmc or whatever is busy dying.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Dear Mr. Campbell,
Thanks again for your answers. I restored the filesystem to a version I had before installing qemu in it. Upon start, this is what I do (no strange symbols now :) ):
/root@arndale:~/vmTest# /etc/init.d/xencommons start// //Starting C xenstored...// //Setting domain 0 name...// //Starting xenconsoled...// //Starting QEMU as disk backend for dom0// ///etc/init.d/xencommons: line 120: /usr/local/lib/xen/bin/qemu-system-i386: No such file or directory// //root@arndale:~/vmTest# /etc/init.d/xendomains start// //root@arndale:~/vmTest# cat vmTest.cfg // //kernel = "/root/vmTest/image"// //memory = 128// //name = "win"// //vcpus = 1// //disk = [ 'phy:/dev/loop0,xvda,w' ]// //root@arndale:~/vmTest# xl create -c vmTest.cfg // //Parsing config from vmTest.cfg// ///etc/xen/scripts/block: 1: /etc/xen/scripts/block: Syntax error: word unexpected (expecting ")")// //libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/block add [3191] exited with error status 2// //libxl: error: libxl_create.c:935:domcreate_launch_dm: unable to add disk devices // ///etc/xen/scripts/block: 1: /etc/xen/scripts/block: Syntax error: word unexpected (expecting ")") // //libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/block remove [3396] exited with error status 2/
On the other hand, I get the following in the serial console:
/[ 158.542759] Failed to unmap pfn:a7b2b rc:-2// //[ 158.545652] Failed to unmap pfn:a7b29 rc:-2// //[...]//
//[ 162.646972] Failed to unmap pfn:a5de3 rc:-2// //[ 162.657145] Failed to unmap pfn:a5d27 rc:-2// //[ 162.691653] 6ahci: SSS flag set, parallel bus scan disabled// //[ 162.695915] platform 122f0000.sata: Driver exynos-sata requests probe deferral// //[ 162.833711] request_module: runaway loop modprobe binfmt-0000// //[ 162.833715] request_module: runaway loop modprobe binfmt-0000//
//udevd[3194]: failed to execute '/etc/xen/scripts/block' '/etc/xen/scripts/block add': Exec format error// //
//[ 163.250660] request_module: runaway loop modprobe binfmt-0000//
//[ 163.254054] request_module: runaway loop modprobe binfmt-0000//
//udevd[3393]: failed to execute '/etc/xen/scripts/block' '/etc/xen/scripts/block remove': Exec format error// //
//(XEN) mm.c:1250:d0 gnttab_mark_dirty not implemented yet//
//INIT: Id "T0" respawning too fast: disabled for 5 minutes//
//[ 401.466716] asix 3-3.2.4:1.0 eth0: asix_rx_fixup() Bad Header Length 0x0, offset 4// //[ 403.469518] asix 3-3.2.4:1.0 eth0: asix_rx_fixup() Bad Header Length 0x0, offset 4// //[ 409.284223] asix 3-3.2.4:1.0 eth0: asix_rx_fixup() Bad Header Length 0x0, offset 4// //[ 438.824151] asix 3-3.2.4:1.0 eth0: asix_rx_fixup() Bad Header Length 0x76f3, offset 4// //[ 443.158425] asix 3-3.2.4:1.0 eth0: asix_rx_fixup() Bad Header Length 0x0, offset 4// //[ 443.358909] asix 3-3.2.4:1.0 eth0: asix_rx_fixup() Bad Header Length 0x0, offset 4// //[ 443.760255] asix 3-3.2.4:1.0 eth0: asix_rx_fixup() Bad Header Length 0x0, offset 4// //[ 444.562832] asix 3-3.2.4:1.0 eth0: asix_rx_fixup() Bad Header Length 0x0, offset 4// //[ 446.171803] asix 3-3.2.4:1.0 eth0: asix_rx_fixup() Bad Header Length 0x919376ea, offset 4// //[ 448.091583] asix 3-3.2.4:1.0 eth0: asix_rx_fixup() Bad Header Length 0x72636a2e, offset 4// //[ 449.075213] asix 3-3.2.4:1.0 eth0: asix_rx_fixup() Bad Header Length 0x0, offset 4/
And it goes on like this... Is it normal that I don't have xend under /etc/init.d?
Many thanks and best regards,
Josep
Quoted 42 lines · Ian Campbell
Quoted 5 lines · Josep Subirats
Dear Mr. Campbell,
Many thanks for your answer. I recompiled the dom0 kernel with GNTDEV (couldn't find gnttab, were you referring to gntdev?) built into the kernel, and any other XEN driver.
It looks like the message has gone, so you've got the right one,
Quoted 1 line
Should I also recompile the domU kernel with this option?
Not for your use case (i.e. getting a basic domU running).
Quoted 2 lines
I also gave execution rights to the "image" (kernel+xendtb) file,
just in case.There is no need, but it is harmless enough to do so.
Quoted 3 lines
I installed qemu-system and qemu-utils and
linked/usr/local/lib/xen/bin/qemu-system-i386to the path where qemu-system-i386 was actually located.This wasn't necessary. The warning is benign.
Quoted 8 lines
When I boot, I execute:
root@arndale:~/vmTest# /etc/init.d/xencommons start Starting C xenstored... Setting domain 0 name... Starting xenconsoled... Starting QEMU as disk backend for dom0 Option xen-domid not supported for this targetWhat does your disk stanza look like? Currently only "phy" type ones are supported on ARM. It looks like you are using something wihch wants to use a qemu backend, which is not something the rest of us have tried yet. I recommend using either a physical device or
/dev/loopfor the time beingQuoted 8 lines
root@arndale:~/vmTest# /etc/init.d/xendomains startWhat I now get when I try to create the VM is:
root@arndale:~/vmTest# xl create -c vmTest.cfg Parsing config from vmTest.cfg /etc/xen/scripts/block-common.sh: line 1: Jն�:���ʗ/_y�^�����A�: No such file or directory
Quoted 10 lines
Something is very wrong/corrupted with your root filesystem and or the device underlying it.
Quoted 2 lines
After this, the filesystem becomes read-only and I have to reboot the whole board. What can be happening?
My first impression is that your disk or mmc or whatever is busy dying.
Ian.
WARNING / LEGAL TEXT: This message is intended only for the use of the individual or entity to which it is addressed and may contain information which is privileged, confidential, proprietary, or exempt from disclosure under applicable law. If you are not the intended recipient or the person responsible for delivering the message to the intended recipient, you are strictly prohibited from disclosing, distributing, copying, or in any way using this message. If you have received this communication in error, please notify the sender and destroy and delete any copies you may have received.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel