1
votes

Hello and thank you for reading and appreciated for reply.

Firstly, I'm trying to run xen on qemu of aarch64. (based on this link: Xen ARM with Virtualization Extensions/qemu-system-aarch64)

I'm following their steps:

QEMU

  1. git clone https://github.com/qemu/qemu.git
  2. cd qemu
  3. ./configure --target-list=aarch64-softmmu
  4. make

LINUX

  1. git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
  2. cd linux;
  3. make ARCH=arm64 defconfig
  4. make ARCH=arm64

And downloaded (xenial-server-cloudimg-arm64-uefi1.img)file I'm not sure but this consist of ubuntu window manager and root file system.

and I executed it with this command:

./aarch64-softmmu/qemu-system-aarch64 -machine virt,gic_version=3 -machine virtualization=true \
-cpu cortex-a57 -machine type=virt -nographic \
-smp 4 -m 4000 \
-bios QEMU_EFI.fd \
-kernel ../linux/arch/arm64/boot/Image --append "console=ttyAMA0 root=/dev/vda1" \
-device virtio-blk-device,drive=cloud \
-drive if=none,id=cloud,file=cloud.img \
-netdev user,id=hostnet0,hostfwd=tcp::2222-:22, \
-device virtio-net-device,netdev=hostnet0,mac=7c:4c:58:aa:bb:cc \
-drive if=none,file=./ubuntu-16.04-server-cloudimg-arm64-uefi1.img,id=hd0 \
-device virtio-blk-device,drive=hd0

But the log said can't connect to remote server with timeout error like below

[   74.343928] cloud-init[2872]: Cloud-init v. 17.2 running 'init' at Sun, 18 Mar 2018 13:21:21 +0000. Up 70.18 seconds.
[   74.360950] cloud-init[2872]: ci-info: +++++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++++
[   74.370544] cloud-init[2872]: ci-info: +--------+------+-----------+---------------+-------+-------------------+
[   74.380874] cloud-init[2872]: ci-info: | Device |  Up  |  Address  |      Mask     | Scope |     Hw-Address    |
[   74.389738] cloud-init[2872]: ci-info: +--------+------+-----------+---------------+-------+-------------------+
[   74.396842] cloud-init[2872]: ci-info: |  eth0  | True | 10.0.2.15 | 255.255.255.0 |   .   | 7c:4c:58:aa:bb:cc |
[   74.404825] cloud-init[2872]: ci-info: |   lo   | True | 127.0.0.1 |   255.0.0.0   |   .   |         .         |
[   74.412704] cloud-init[2872]: ci-info: +--------+------+-----------+---------------+-------+-------------------+
[   74.420938] cloud-init[2872]: ci-info: +++++++++++++++++++++++++++Route IPv4 info++++++++++++++++++++++++++++
[   74.428823] cloud-init[2872]: ci-info: +-------+-------------+----------+---------------+-----------+-------+
[   74.436617] cloud-init[2872]: ci-info: | Route | Destination | Gateway  |    Genmask    | Interface | Flags |
[   74.443257] cloud-init[2872]: ci-info: +-------+-------------+----------+---------------+-----------+-------+
[   74.452548] cloud-init[2872]: ci-info: |   0   |   0.0.0.0   | 10.0.2.2 |    0.0.0.0    |    eth0   |   UG  |
[   74.463257] cloud-init[2872]: ci-info: |   1   |   10.0.2.0  | 0.0.0.0  | 255.255.255.0 |    eth0   |   U   |
[   74.471838] cloud-init[2872]: ci-info: +-------+-------------+----------+---------------+-----------+-------+
[   74.479500] cloud-init[2872]: 2018-03-18 13:21:25,421 - util.py[WARNING]: Failed to mount /dev/vdb when looking for data
[  138.569825] cloud-init[2872]: 2018-03-18 13:22:30,717 - url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [50/120s]: request error [HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /2009-04-04/meta-data/instance-id (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c7f160>, 'Connection to 169.254.169.254 timed out. (connect timeout=50.0)'))]
[  189.786504] cloud-init[2872]: 2018-03-18 13:23:21,935 - url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [101/120s]: request error [HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /2009-04-04/meta-data/instance-id (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c7fa20>, 'Connection to 169.254.169.254 timed out. (connect timeout=50.0)'))]
[  207.900481] cloud-init[2872]: 2018-03-18 13:23:40,049 - url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [119/120s]: request error [HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /2009-04-04/meta-data/instance-id (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c7f160>, 'Connection to 169.254.169.254 timed out. (connect timeout=17.0)'))]
[  208.914300] cloud-init[2872]: 2018-03-18 13:23:41,063 - DataSourceEc2.py[CRITICAL]: Giving up on md from ['http://169.254.169.254/2009-04-04/meta-data/instance-id'] after 120 seconds
[  208.995647] cloud-init[2872]: 2018-03-18 13:23:41,145 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [0/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c852e8>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  210.064653] cloud-init[2872]: 2018-03-18 13:23:42,214 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [1/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c85b38>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  211.161695] cloud-init[2872]: 2018-03-18 13:23:43,303 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [2/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c90390>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  212.241265] cloud-init[2872]: 2018-03-18 13:23:44,390 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [3/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c85630>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  213.396955] cloud-init[2872]: 2018-03-18 13:23:45,546 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [4/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c85160>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  214.495438] cloud-init[2872]: 2018-03-18 13:23:46,645 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [5/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c7f4e0>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  216.541258] cloud-init[2872]: 2018-03-18 13:23:48,691 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [7/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c64a20>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  218.645417] cloud-init[2872]: 2018-03-18 13:23:50,788 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [9/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95cd2e48>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  220.701322] cloud-init[2872]: 2018-03-18 13:23:52,851 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [11/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c64d68>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  222.800916] cloud-init[2872]: 2018-03-18 13:23:54,950 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [13/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c85518>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  224.850466] cloud-init[2872]: 2018-03-18 13:23:57,000 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [15/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c7f6d8>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  227.905821] cloud-init[2872]: 2018-03-18 13:24:00,055 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [18/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c7f1d0>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  230.953855] cloud-init[2872]: 2018-03-18 13:24:03,103 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [21/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95d0a828>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  234.007530] cloud-init[2872]: 2018-03-18 13:24:06,157 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [25/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c903c8>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  237.090453] cloud-init[2872]: 2018-03-18 13:24:09,240 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [28/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c7f940>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  240.227486] cloud-init[2872]: 2018-03-18 13:24:12,377 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [31/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c7f2e8>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  244.311160] cloud-init[2872]: 2018-03-18 13:24:16,461 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [35/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c85908>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  248.425760] cloud-init[2872]: 2018-03-18 13:24:20,570 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [39/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c85320>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  252.534920] cloud-init[2872]: 2018-03-18 13:24:24,684 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [43/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c90ac8>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  256.674674] cloud-init[2872]: 2018-03-18 13:24:28,824 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [47/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c85c88>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  260.784644] cloud-init[2872]: 2018-03-18 13:24:32,934 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [51/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95d0a470>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  265.869920] cloud-init[2872]: 2018-03-18 13:24:38,019 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [56/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c7fc18>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  270.951255] cloud-init[2872]: 2018-03-18 13:24:43,101 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [61/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c90978>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  276.043882] cloud-init[2872]: 2018-03-18 13:24:48,193 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [67/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c982e8>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  281.125792] cloud-init[2872]: 2018-03-18 13:24:53,274 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [72/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95cd2f28>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  286.179019] cloud-init[2872]: 2018-03-18 13:24:58,329 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [77/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c7f9b0>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  292.303581] cloud-init[2872]: 2018-03-18 13:25:04,453 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [83/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c7f3c8>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  298.392595] cloud-init[2872]: 2018-03-18 13:25:10,542 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [89/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c85588>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  304.443325] cloud-init[2872]: 2018-03-18 13:25:16,592 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [95/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c980b8>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  310.550892] cloud-init[2872]: 2018-03-18 13:25:22,700 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [101/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c64c88>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  316.657441] cloud-init[2872]: 2018-03-18 13:25:28,806 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [107/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c850b8>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  323.799922] cloud-init[2872]: 2018-03-18 13:25:35,950 - url_helper.py[WARNING]: Calling 'http://10.0.2.2/latest/meta-data/instance-id' failed [114/120s]: request error [HTTPConnectionPool(host='10.0.2.2', port=80): Max retries exceeded with url: /latest/meta-data/instance-id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0xffff95c7f860>: Failed to establish a new connection: [Errno 111] Connection refused',))]
[  330.829794] cloud-init[2872]: 2018-03-18 13:25:42,967 - DataSourceCloudStack.py[CRITICAL]: Giving up on waiting for the metadata from ['http://10.0.2.2/latest/meta-data/instance-id'] after 121 seconds

and I don't know ID, PW. and also I found that with cloud-init, usually people login with ssh in another console. but always say

Permission denied (publickey).

Is there anybody solve this problem?

  1. How to login to linux?
  2. Is there any better way to run xen on qemu of aarch64?
1

1 Answers

0
votes

The cloud-init may try a few times before it time out, and you can login to the bash after that time. When you login the linux you can skip the cloud init next time by this command "touch /etc/cloud/cloud-init.disabled“, and the follow the next procedure to install xen. But when the xen is installed, I didn't find how to install the xen toolstack yet.