[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Pygrub on ARM64





On Wed, Feb 24, 2016 at 5:38 PM, Ian Campbell <ian.campbell@xxxxxxxxxx> wrote:
On Wed, 2016-02-24 at 16:35 +0530, Sanjeev Pandita wrote:
> Hi Ian/All,

Please don't top post.

> If I run the command manually it says OSError: no such file or directory
> .
>
> [root@localhost ~]# /usr/local/lib/xen/bin/pygrub
> --args=root=/dev/xvda4 rw console=hvc0 earlyprintk=xen
> --output=/var/run/xen/bootloader.25.out --output-format=simple0
> --output-directory=/var/run/xen/bootloader.25.d
> /mnt/xen/CentOS-7-aarch64.img

[...]

> OSError: [Errno 2] No such file or directory: 'rw'

This is because you haven't quoted the "--args", everything from
"root=/dev/xvda4" up to "earlyprintk=xen" should be quoted in the shell,
that "rw" is supposed to be part of the eventual kernel command line[*].

You are using a local raw image, so it seems to be doing the local attach
thing and then passing the raw image to pygrub, which should work I think.

As well as trying to run pygrub by hand again with proper quoting you could
also try "xl console vm1" after you run the create, it could be that pygrub
is actually working and waiting for user input on the console.


Hi Ian,

I started fresh today.
InstalledÂCentOS on a disk and compiled released xen 4.6.0 with "./configure Â--prefix=/usrÂ", followed by makeÂtools and Âmake install.
Used xen.efi to boot the xen , vanilla kernel 4.2.4Â(from kernel.org) and booted the Dom0.

I ran the "xl console vm1" command in another terminal. No prints are seen on the console. I have run some more commands in different terminals as well. Here are the commands and results.

Original issue:-


Terminal 1: (xl create output)
[root@dhcp-194 xen]# xl -vvv create vm1
Parsing config from vm1
libxl: debug: libxl_create.c:1557:do_domain_create: ao 0x15d48050: create: how=(nil) callback=(nil) poller=0x15d480e0
libxl: debug: libxl_arm.c:59:libxl__arch_domain_prepare_config: Configure the domain
libxl: debug: libxl_arm.c:62:libxl__arch_domain_prepare_config:Â - Allocate 0 SPIs
libxl: debug: libxl_device.c:269:libxl__device_disk_set_backend: Disk vdev=xvda spec.backend=unknown
libxl: debug: libxl_device.c:298:libxl__device_disk_set_backend: Disk vdev=xvda, using backend phy
libxl: debug: libxl_create.c:945:initiate_domain_create: running bootloader
libxl: debug: libxl_device.c:269:libxl__device_disk_set_backend: Disk vdev=(null) spec.backend=phy
libxl: debug: libxl.c:3097:libxl__device_disk_local_initiate_attach: locally attaching RAW disk /mnt/xen/CentOS-7-aarch64.img
libxl: debug: libxl_bootloader.c:412:bootloader_disk_attached_cb: Config bootloader value: pygrub
libxl: debug: libxl_bootloader.c:428:bootloader_disk_attached_cb: Checking for bootloader in libexec path: /usr/lib/xen/bin/pygrub
libxl: debug: libxl_create.c:1580:do_domain_create: ao 0x15d48050: inprogress: poller=0x15d480e0, flags=i
libxl: debug: libxl_event.c:639:libxl__ev_xswatch_register: watch w=0x15d3f4d0 wpath=/local/domain/1 token=3/0: register slotnum=3
libxl: debug: libxl_event.c:2183:libxl__ao_progress_report: ao 0x15d48050: progress report: ignored
libxl: debug: libxl_bootloader.c:540:bootloader_gotptys: executing bootloader: /usr/lib/xen/bin/pygrub
libxl: debug: libxl_bootloader.c:544:bootloader_gotptys:ÂÂ bootloader arg: /usr/lib/xen/bin/pygrub
libxl: debug: libxl_bootloader.c:544:bootloader_gotptys:ÂÂ bootloader arg: --args=root=/dev/xvda4 rw console=hvc0 earlyprintk=xen
libxl: debug: libxl_bootloader.c:544:bootloader_gotptys:ÂÂ bootloader arg: --output=/var/run/xen/bootloader.1.out
libxl: debug: libxl_bootloader.c:544:bootloader_gotptys:ÂÂ bootloader arg: --output-format=simple0
libxl: debug: libxl_bootloader.c:544:bootloader_gotptys:ÂÂ bootloader arg: --output-directory=/var/run/xen/bootloader.1.d
libxl: debug: libxl_bootloader.c:544:bootloader_gotptys:ÂÂ bootloader arg: /mnt/xen/CentOS-7-aarch64.img
libxl: debug: libxl_event.c:576:watchfd_callback: watch w=0x15d3f4d0 wpath=/local/domain/1 token=3/0: event epath=/local/domain/1


Terminal 2: [root@dhcp-194 ~]# xl console vm1
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ (nothing comes on console after this)



Terminal 3: (manually running the pygrubÂcommand)
[root@dhcp-194 xen]# export LD_LIBRARY_PATH=/usr/lib
[root@dhcp-194 xen]# mkdir -p /var/run/xen/bootloader.2.d
[root@dhcp-194 xen]# touch /var/run/xen/bootloader.2.out
[root@dhcp-194 xen]# /usr/lib/xen/bin/pygrub --args="root=/dev/xvda4 rw console=hvc0 earlyprintk=xen" --output=/var/run/xen/bootloader.2.out --output-format=simple0 --output-directory=/var/run/xen/bootloader.2.d /mnt/xen/CentOS-7-aarch64.img

(nothing comes on console after this)Â

Terminal4: (ls of the logs directory and files. All files are empty)
[root@dhcp-194 ~]# cd /var/run/xen/
[root@dhcp-194 xen]# ls
bootloader.1.d bootloader.1.out bootloader.2.d bootloader.2.out
[root@dhcp-194 xen]# ls -al
total 0
drwxr-xr-x 4 root root 120 Feb 25 12:50 .
drwxr-xr-x 35 root root 1100 Feb 25 10:00 ..
drw-------Â 2 root rootÂÂ 40 Feb 25 12:07 bootloader.1.d
-rw-------Â 1 root rootÂÂÂ 0 Feb 25 12:07 bootloader.1.out
drwxr-xr-x 2 root root 40 Feb 25 12:50 bootloader.2.d
-rw-r--r--Â 1 root rootÂÂÂ 0 Feb 25 12:50 bootloader.2.out
[root@dhcp-194 xen]# ls -al bootloader.*
-rw------- 1 root root 0 Feb 25 12:07 bootloader.1.out
-rw-r--r-- 1 root root 0 Feb 25 12:50 bootloader.2.out
bootloader.1.d:
total 0
drw------- 2 root root 40 Feb 25 12:07 .
drwxr-xr-x 4 root root 120 Feb 25 12:50 ..
bootloader.2.d:
total 0
drwxr-xr-x 2 root root 40 Feb 25 12:50 .
drwxr-xr-x 4 root root 120 Feb 25 12:50 ..
[root@dhcp-194 xen]#


Issue #2:

While above things are in dangling state if I try to create another VM thenÂa new DomU does not get create.

[root@dhcp-194 xen]# xl -vvv create vm8
Parsing config from vm8
<Nothing comes after the above line>


If I kill pygrub from another terminal ,Âpress ctrl C in all other blocking terminals ofÂvm1 and then start the vm8 , the vm8 boots fine.

PleaseÂlet me knowÂif am I missing anything in this sequence ?

Thanks,
Sanjeev
Â
Ian.

[*] normally this information would come from your grub.cfg in the guest,
so you might want to remove the extra = in your guest cfg, or maybe you are
deliberately overriding grub.cfg, in any case you are not yet at the point
where this setting would make any difference.

Ian.


CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and contains information that is confidential and proprietary to Applied Micro Circuits Corporation or its subsidiaries. It is to be used solely for the purpose of furthering the parties' business relationship. All unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.