How to Run Ubuntu 16.04 Aarch64 (64-bit ARM) Cloud Images on Your Intel/AMD Linux Computer with QEMU

With the recent launch of several low cost Cortex A53 development boards, 64-bit ARM hardware is now pretty common and inexpensive, but if you want to run 64-bit ARM code on your x86 Linux computer, Riku Voipio, a software engineer working for Linaro, wrote some instructions to run Ubuntu 16.04 Aarch64 Cloud image in QEMU. Ubuntu cloud images are “the official Ubuntu images and are pre-installed disk images that have been customized by Ubuntu engineering to run on public clouds that provide Ubuntu Certified Images, Openstack, LXD, and more. ”  So the instructions are also useful if you want to easily try such packages on 64-bit ARM platform.

Ubuntu_16.04_ARM_Cortex_A57
Ubuntu 16.04 with Linux 4.4 Running on a Dual Core Cortex A57 Processor in QEMU

I’ve tried those instructions myself on my Ubuntu 14.04 machine with and AMD FX8350 processor, and they worked pretty well, and the only things I had to find out by myself was to install a recent version of qemu.

First, we’ll need to install qemu & cloud-utils, and download QEMU EFI firmware  as well as the Ubuntu 16.04 Xenial server Cloud image:


The instructions require qemu-system-aarch64 version 2.5, and my system only comes with qemu 2.0.0


So I had to find a qemu ppa to install a more recent version:


I now have version 2.5:


Since the Cloud images don’t come with default username and password, they need to configured with cloud-utils. To do so, I created cloud-utils as follows:


You simply need to change the file with your username, and RSA key, which should be in ~/.ssh/id_rsa.pub. If you don’t have that file you may want to read my post  showing how to create the SSH key and login without password. Cloud config can take many arguments, including packages to install during the first boot, and you can learn all about it on Cloud-init documentation.

Now you can initialize the cloud image, and run it:


The boot until the login prompt tool about 3 minutes on my machine. Here’s the boot log:

error: no suitable video mode found.
EFI stub: Booting Linux Kernel…
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services and installing virtual address map…
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.4.0-22-generic (buildd@magic) (gcc version 5.3.1 20160413 (Ubuntu/Linaro 5.3.1-14ubuntu2) ) #39-Ubuntu SMP Thu May 5 16:54:53 UTC 2016 (Ubuntu 4.4.0-22.39-generic 4.4.8)
[ 0.000000] Boot CPU: AArch64 Processor [411fd070]
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] EFI v2.50 by EDK II
[ 0.000000] efi: SMBIOS=0x7c020000 SMBIOS 3.0=0x7bf90000 PROP=0x7f7b8d78 ACPI=0x7c040000 ACPI 2.0=0x7c040014
[ 0.000000] No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] NUMA: Adding memblock [0x40000000 – 0x7fffffff] on node 0
[ 0.000000] NUMA: Initmem setup node 0 [mem 0x40000000-0x7fffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x7fff2280-0x7fff3fff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000040000000-0x000000007fffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040000000-0x000000007fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000007fffffff]
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv0.2 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] PERCPU: Embedded 17 pages/cpu @ffff80003ffc7000 s31128 r8192 d30312 u69632
[ 0.000000] Detected PIPT I-cache on CPU0
[ 0.000000] CPU features: enabling workaround for ARM erratum 832075
[ 0.000000] CPU features: enabling workaround for ARM erratum 834220
[ 0.000000] Built 1 zonelists in Node order, mobility grouping on. Total pages: 258048
[ 0.000000] Policy zone: DMA
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-22-generic root=LABEL=cloudimg-rootfs vt.handoff=7
[ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000000] software IO TLB [mem 0x77dc0000-0x7bdc0000] (64MB) mapped at [ffff800037dc0000-ffff80003bdbffff]
[ 0.000000] Memory: 923168K/1048576K available (8720K kernel code, 1006K rwdata, 3772K rodata, 760K init, 786K bss, 125408K reserved, 0K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vmalloc : 0xffff000000000000 – 0xffff7bffbfff0000 (126974 GB)
[ 0.000000] vmemmap : 0xffff7bffc0000000 – 0xffff7fffc0000000 ( 4096 GB maximum)
[ 0.000000] 0xffff7bffc0000000 – 0xffff7bffc1000000 ( 16 MB actual)
[ 0.000000] fixed : 0xffff7ffffa7fd000 – 0xffff7ffffac00000 ( 4108 KB)
[ 0.000000] PCI I/O : 0xffff7ffffae00000 – 0xffff7ffffbe00000 ( 16 MB)
[ 0.000000] modules : 0xffff7ffffc000000 – 0xffff800000000000 ( 64 MB)
[ 0.000000] memory : 0xffff800000000000 – 0xffff800040000000 ( 1024 MB)
[ 0.000000] .init : 0xffff800000cb5000 – 0xffff800000d73000 ( 760 KB)
[ 0.000000] .text : 0xffff800000080000 – 0xffff800000cb5000 ( 12500 KB)
[ 0.000000] .data : 0xffff800000d84000 – 0xffff800000e7fa00 ( 1007 KB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 64.
[ 0.000000] RCU restricting CPUs from NR_CPUS=128 to nr_cpu_ids=2.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=2
[ 0.000000] NR_IRQS:64 nr_irqs:64 0
[ 0.000000] GICv2m: range[0x8020000:0x8020fff], SPI[80:144]
[ 0.000000] Architected cp15 timer(s) running at 62.50MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1cd42e208c, max_idle_ns: 881590405314 ns
[ 0.000135] sched_clock: 56 bits at 62MHz, resolution 16ns, wraps every 4398046511096ns
[ 0.006123] vt handoff: transparent VT on vt#7
[ 0.006565] Console: colour dummy device 80×25
[ 0.007325] console [tty0] enabled
[ 0.008449] Calibrating delay loop (skipped), value calculated using timer frequency.. 125.00 BogoMIPS (lpj=250000)
[ 0.008599] pid_max: default: 32768 minimum: 301
[ 0.009541] Security Framework initialized
[ 0.009610] Yama: becoming mindful.
[ 0.011833] AppArmor: AppArmor initialized
[ 0.015594] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.017840] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.018889] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.018992] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.029386] Initializing cgroup subsys io
[ 0.029795] Initializing cgroup subsys memory
[ 0.030134] Initializing cgroup subsys devices
[ 0.030245] Initializing cgroup subsys freezer
[ 0.030346] Initializing cgroup subsys net_cls
[ 0.030421] Initializing cgroup subsys perf_event
[ 0.030490] Initializing cgroup subsys net_prio
[ 0.030574] Initializing cgroup subsys hugetlb
[ 0.030676] Initializing cgroup subsys pids
[ 0.031176] ftrace: allocating 30291 entries in 119 pages
[ 0.725663] Remapping and enabling EFI services.
[ 0.726171] EFI remap 0x0000000004000000 => 0000000040000000
[ 0.726421] EFI remap 0x0000000009010000 => 0000000044000000
[ 0.726500] EFI remap 0x000000007be40000 => 0000000044010000
[ 0.726557] EFI remap 0x000000007bea0000 => 0000000044070000
[ 0.726576] EFI remap 0x000000007beb0000 => 0000000044080000
[ 0.726597] EFI remap 0x000000007bf30000 => 0000000044100000
[ 0.726615] EFI remap 0x000000007bf40000 => 0000000044110000
[ 0.726632] EFI remap 0x000000007bf50000 => 0000000044120000
[ 0.726656] EFI remap 0x000000007c020000 => 00000000441d0000
[ 0.726673] EFI remap 0x000000007c050000 => 00000000441e0000
[ 0.726689] EFI remap 0x000000007c060000 => 00000000441f0000
[ 0.726706] EFI remap 0x000000007c070000 => 0000000044200000
[ 0.726771] EFI remap 0x000000007c0f0000 => 0000000044280000
[ 0.726802] EFI remap 0x000000007c100000 => 0000000044290000
[ 0.726819] EFI remap 0x000000007c110000 => 00000000442a0000
[ 0.726842] EFI remap 0x000000007c1e0000 => 0000000044370000
[ 0.726858] EFI remap 0x000000007c1f0000 => 0000000044380000
[ 0.726876] EFI remap 0x000000007c200000 => 0000000044390000
[ 0.726951] EFI remap 0x000000007c280000 => 0000000044410000
[ 0.726981] EFI remap 0x000000007c290000 => 0000000044420000
[ 0.726998] EFI remap 0x000000007c2a0000 => 0000000044430000
[ 0.727016] EFI remap 0x000000007f5b0000 => 0000000044460000
[ 0.727036] EFI remap 0x000000007f600000 => 00000000444b0000
[ 0.727053] EFI remap 0x000000007f610000 => 00000000444c0000
[ 0.727071] EFI remap 0x000000007f650000 => 00000000444f0000
[ 0.727618] ASID allocator initialised with 65536 entries
[ 0.746070] Detected PIPT I-cache on CPU1
[ 0.747515] CPU1: Booted secondary processor [411fd070]
[ 0.749129] Brought up 2 CPUs
[ 0.749201] SMP: Total of 2 processors activated.
[ 0.749430] CPU: All CPU(s) started at EL1
[ 0.750222] alternatives: patching kernel code
[ 0.766144] devtmpfs: initialized
[ 0.775039] evm: security.selinux
[ 0.775075] evm: security.SMACK64
[ 0.775089] evm: security.SMACK64EXEC
[ 0.775102] evm: security.SMACK64TRANSMUTE
[ 0.775116] evm: security.SMACK64MMAP
[ 0.775129] evm: security.ima
[ 0.775142] evm: security.capability
[ 0.778658] SMBIOS 3.0.0 present.
[ 0.779858] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.782640] pinctrl core: initialized pinctrl subsystem
[ 0.794894] NET: Registered protocol family 16
[ 0.810548] cpuidle: using governor ladder
[ 0.823124] cpuidle: using governor menu
[ 0.823790] vdso: 2 pages (1 code @ ffff800000d89000, 1 data @ ffff800000d88000)
[ 0.824292] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.826321] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.827846] Serial: AMBA PL011 UART driver
[ 0.855107] 9000000.pl011: ttyAMA0 at MMIO 0x9000000 (irq = 37, base_baud = 0) is a PL011 rev1
[ 0.893760] console [ttyAMA0] enabled
[ 0.946328] ACPI: Interpreter disabled.
[ 0.949605] vgaarb: loaded
[ 0.955849] SCSI subsystem initialized
[ 0.958552] usbcore: registered new interface driver usbfs
[ 0.959246] usbcore: registered new interface driver hub
[ 0.959790] usbcore: registered new device driver usb
[ 0.971932] NetLabel: Initializing
[ 0.972153] NetLabel: domain hash size = 128
[ 0.972377] NetLabel: protocols = UNLABELED CIPSOv4
[ 0.973808] NetLabel: unlabeled traffic allowed by default
[ 0.976092] clocksource: Switched to clocksource arch_sys_counter
[ 1.099009] AppArmor: AppArmor Filesystem Enabled
[ 1.100738] pnp: PnP ACPI: disabled
[ 1.149920] NET: Registered protocol family 2
[ 1.157502] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 1.158260] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[ 1.158865] TCP: Hash tables configured (established 8192 bind 8192)
[ 1.160369] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 1.160845] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 1.162945] NET: Registered protocol family 1
[ 1.169176] Trying to unpack rootfs image as initramfs…
[ 38.466085] Freeing initrd memory: 20908K (ffff80002a69a000 – ffff80002bb05000)
[ 38.467445] kvm [1]: HYP mode not available
[ 38.471688] futex hash table entries: 512 (order: 4, 65536 bytes)
[ 38.472992] audit: initializing netlink subsys (disabled)
[ 38.474139] audit: type=2000 audit(37.848:1): initialized
[ 38.480527] Initialise system trusted keyring
[ 38.485484] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[ 38.510331] zbud: loaded
[ 38.516406] VFS: Disk quotas dquot_6.6.0
[ 38.517291] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 38.528806] fuse init (API version 7.23)
[ 38.532598] Key type big_key registered
[ 38.533202] Allocating IMA MOK and blacklist keyrings.
[ 38.546907] Key type asymmetric registered
[ 38.547225] Asymmetric key parser ‘x509’ registered
[ 38.548522] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 38.549875] io scheduler noop registered
[ 38.550151] io scheduler deadline registered (default)
[ 38.551097] io scheduler cfq registered
[ 38.557770] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[ 38.558156] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[ 38.559066] PCI host bridge /pcie@10000000 ranges:
[ 38.559706] IO 0x3eff0000..0x3effffff -> 0x00000000
[ 38.560395] MEM 0x10000000..0x3efeffff -> 0x10000000
[ 38.560672] MEM 0x8000000000..0xffffffffff -> 0x8000000000
[ 38.563045] pci-host-generic 3f000000.pcie: PCI host bridge to bus 0000:00
[ 38.563709] pci_bus 0000:00: root bus resource [bus 00-0f]
[ 38.564346] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 38.564681] pci_bus 0000:00: root bus resource [mem 0x10000000-0x3efeffff]
[ 38.565020] pci_bus 0000:00: root bus resource [mem 0x8000000000-0xffffffffff]
[ 38.585136] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled
[ 38.615449] msm_serial: driver initialized
[ 38.620995] Unable to detect cache hierarchy from DT for CPU 0
[ 38.681657] brd: module loaded
[ 38.707298] loop: module loaded
[ 38.744265] vdb: vdb1 vdb15
[ 38.755415] libphy: Fixed MDIO Bus: probed
[ 38.755791] tun: Universal TUN/TAP device driver, 1.6
[ 38.756571] tun: (C) 1999-2004 Max Krasnyansky <[email protected]>
[ 38.769050] PPP generic driver version 2.4.2
[ 38.772339] ehci_hcd: USB 2.0 ‘Enhanced’ Host Controller (EHCI) Driver
[ 38.772918] ehci-pci: EHCI PCI platform driver
[ 38.773577] ohci_hcd: USB 1.1 ‘Open’ Host Controller (OHCI) Driver
[ 38.774282] ohci-pci: OHCI PCI platform driver
[ 38.775318] uhci_hcd: USB Universal Host Controller Interface driver
[ 38.781025] mousedev: PS/2 mouse device common for all mice
[ 38.785156] i2c /dev entries driver
[ 38.790822] device-mapper: uevent: version 1.0.3
[ 38.793082] device-mapper: ioctl: 4.34.0-ioctl (2015-10-28) initialised: [email protected]
[ 38.795243] ledtrig-cpu: registered to indicate activity on CPUs
[ 38.795611] EFI Variables Facility v0.08 2004-May-17
[ 38.808496] NET: Registered protocol family 10
[ 38.816988] NET: Registered protocol family 17
[ 38.817611] Key type dns_resolver registered
[ 38.818458] Registered cp15_barrier emulation handler
[ 38.818815] Registered setend emulation handler
[ 38.822549] registered taskstats version 1
[ 38.823009] Loading compiled-in X.509 certificates
[ 38.833206] Loaded X.509 cert ‘Build time autogenerated kernel key: a959bfeeeafa5217003d029b713b4f3761d43036’
[ 38.834712] zswap: loaded using pool lzo/zbud
[ 38.939508] Key type trusted registered
[ 39.135319] Key type encrypted registered
[ 39.135696] AppArmor: AppArmor sha1 policy hashing enabled
[ 39.136679] ima: No TPM chip found, activating TPM-bypass!
[ 39.138753] evm: HMAC attrs: 0x1
[ 39.141193] hctosys: unable to open rtc device (rtc0)
[ 39.146796] uart-pl011 9000000.pl011: no DMA platform data
[ 39.194827] Freeing unused kernel memory: 760K (ffff800000cb5000 – ffff800000d73000)
[ 39.195339] Freeing alternatives memory: 48K (ffff800000d73000 – ffff800000d7f000)
Loading, please wait…
starting version 229
[ 39.750435] random: systemd-udevd urandom read with 1 bits of entropy available
Begin: Loading essential drivers … [ 46.415344] md: linear personality registered for level -1
[ 46.515772] md: multipath personality registered for level -4
[ 46.620934] md: raid0 personality registered for level 0
[ 46.726240] md: raid1 personality registered for level 1
[ 46.926037] raid6: int64x1 gen() 474 MB/s
[ 46.992135] raid6: int64x1 xor() 397 MB/s
[ 47.060108] raid6: int64x2 gen() 892 MB/s
[ 47.128118] raid6: int64x2 xor() 588 MB/s
[ 47.196003] raid6: int64x4 gen() 1156 MB/s
[ 47.264122] raid6: int64x4 xor() 777 MB/s
[ 47.332052] raid6: int64x8 gen() 538 MB/s
[ 47.400093] raid6: int64x8 xor() 450 MB/s
[ 47.468291] raid6: neonx1 gen() 330 MB/s
[ 47.536209] raid6: neonx1 xor() 189 MB/s
[ 47.604233] raid6: neonx2 gen() 398 MB/s
[ 47.672095] raid6: neonx2 xor() 163 MB/s
[ 47.740157] raid6: neonx4 gen() 440 MB/s
[ 47.808224] raid6: neonx4 xor() 238 MB/s
[ 47.876048] raid6: neonx8 gen() 385 MB/s
[ 47.944072] raid6: neonx8 xor() 230 MB/s
[ 47.944350] raid6: using algorithm int64x4 gen() 1156 MB/s
[ 47.944628] raid6: …. xor() 777 MB/s, rmw enabled
[ 47.944939] raid6: using intx1 recovery algorithm
[ 47.952791] xor: measuring software checksum speed
[ 47.996241] 8regs : 1440.000 MB/sec
[ 48.036207] 8regs_prefetch: 1445.000 MB/sec
[ 48.076186] 32regs : 1336.000 MB/sec
[ 48.116043] 32regs_prefetch: 1343.000 MB/sec
[ 48.116350] xor: using function: 8regs_prefetch (1445.000 MB/sec)
[ 48.123591] async_tx: api initialized (async)
[ 48.216579] md: raid6 personality registered for level 6
[ 48.216952] md: raid5 personality registered for level 5
[ 48.217259] md: raid4 personality registered for level 4
[ 48.475262] md: raid10 personality registered for level 10
done.
Begin: Running /scripts/init-premount … done.
Begin: Mounting root file system … Begin: Running /scripts/local-top … done.
Begin: Running /scripts/local-premount … [ 49.365334] Btrfs loaded
Scanning for Btrfs filesystems
done.
Warning: fsck not present, so skipping root file system
[ 50.489875] EXT4-fs (vdb1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom … done.
Begin: Running /scripts/init-bottom … Warning: overlayroot: debug is busted
done.
[ 52.425729] systemd[1]: System time before build time, advancing clock.
[ 52.600812] systemd[1]: systemd 229 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN)
[ 52.602459] systemd[1]: Detected virtualization qemu.
[ 52.602901] systemd[1]: Detected architecture arm64.Welcome to Ubuntu 16.04 LTS![ 52.615513] systemd[1]: Set hostname to .
[ 52.631062] systemd[1]: Initializing machine ID from random generator.
[ 52.633892] systemd[1]: Installed transient /etc/machine-id file.
[ 54.777420] systemd[1]: Created slice System Slice.
[ OK ] Created slice System Slice.
[ 54.787015] systemd[1]: Created slice system-getty.slice.
[ OK ] Created slice system-getty.slice.
[ 54.791265] systemd[1]: Listening on Journal Socket.
[ OK ] Listening on Journal Socket.
[ 54.827391] systemd[1]: Starting Create list of required static device nodes for the current kernel…
Starting Create list of required st… nodes for the current kernel…
[ 54.839431] systemd[1]: Reached target User and Group Name Lookups.
[ OK ] Reached target User and Group Name Lookups.
[ 54.900677] systemd[1]: Listening on Journal Audit Socket.
[ OK ] Listening on Journal Audit Socket.
[ 54.937520] systemd[1]: Listening on Syslog Socket.
[ OK ] Listening on Syslog Socket.
[ 55.061147] systemd[1]: Mounting Debug File System…
Mounting Debug File System…
[ 55.125920] systemd[1]: Created slice system-serial\x2dgetty.slice.
[ OK ] Created slice system-serial\x2dgetty.slice.
[ 55.130335] systemd[1]: Listening on udev Control Socket.
[ OK ] Listening on udev Control Socket.
[ 55.166043] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[ OK ] Listening on /dev/initctl Compatibility Named Pipe.
[ 55.203000] systemd[1]: Created slice User and Session Slice.
[ OK ] Created slice User and Session Slice.
[ 55.230696] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[ OK ] Started Forward Password Requests to Wall Directory Watch.
[ 55.270726] systemd[1]: Starting Uncomplicated firewall…
Starting Uncomplicated firewall…
[ 55.302712] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[ OK ] Set up automount Arbitrary Executab…ats File System Automount Point.
[ 55.342570] systemd[1]: Listening on LVM2 metadata daemon socket.
[ OK ] Listening on LVM2 metadata daemon socket.
[ 55.437727] systemd[1]: Mounting Huge Pages File System…
Mounting Huge Pages File System…
[ 55.478207] systemd[1]: Reached target Swap.
[ OK ] Reached target Swap.
[ 55.505859] systemd[1]: Reached target Slices.
[ OK ] Reached target Slices.
[ 55.653438] systemd[1]: Mounting POSIX Message Queue File System…
Mounting POSIX Message Queue File System…
[ 55.671273] systemd[1]: Reached target Encrypted Volumes.
[ OK ] Reached target Encrypted Volumes.
[ 55.826639] systemd[1]: Starting Remount Root and Kernel File Systems…
Starting Remount Root and Kernel File Systems…
[ 55.895229] systemd[1]: Listening on Journal Socket (/dev/log).
[ OK ] Listening on Journal Socket (/dev/log).
[ 55.978436] systemd[1]: Listening on Device-mapper event daemon FIFOs.
[ OK ] Listening on Device-mapper event daemon FIFOs.
[ 56.039144] systemd[1]: Listening on udev Kernel Socket.
[ OK ] Listening on udev Kernel Socket.
[ 56.338358] systemd[1]: Starting Load Kernel Modules…
Starting Load Kernel Modules…
[ 56.393745] systemd[1]: Listening on LVM2 poll daemon socket.
[ OK ] Listening on LVM2 poll daemon socket.
[ 56.554266] systemd[1]: Starting Nameserver information manager…
Starting Nameserver information manager…
[ 56.634591] systemd[1]: Starting Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling…
Starting Monitoring of LVM2 mirrors… dmeventd or progress polling…
[ 56.742477] systemd[1]: Starting Journal Service…
Starting Journal Service…
[ 57.001027] systemd[1]: Mounted POSIX Message Queue File System.
[ OK ] Mounted POSIX Message Queue File System.
[ 57.064715] systemd[1]: Mounted Debug File System.
[ OK ] Mounted Debug File System.
[ 57.101124] systemd[1]: Mounted Huge Pages File System.
[ OK ] Mounted Huge Pages File System.
[ 57.227288] systemd[1]: Started Create list of required static device nodes for the current kernel.
[ OK ] Started Create list of required sta…ce nodes for the current kernel.
[ 57.258454] systemd[1]: Started Uncomplicated firewall.
[ OK ] Started Uncomplicated firewall.
[ 57.304651] EXT4-fs (vdb1): re-mounted. Opts: (null)
[ 57.527628] systemd[1]: Started Remount Root and Kernel File Systems.
[ OK ] Started Remount Root and Kernel File Systems.
[ 58.358611] systemd[1]: Started Nameserver information manager.
[ OK ] Started Nameserver information manager.
[ 59.850589] Loading iSCSI transport class v2.0-870.
[ 60.059388] systemd[1]: Started LVM2 metadata daemon.
[ OK ] Started LVM2 metadata daemon.
[ 60.205315] systemd[1]: Starting Load/Save Random Seed…
Starting Load/Save Random Seed…
[ 60.467673] iscsi: registered transport (tcp)
[ 60.479537] systemd[1]: Starting udev Coldplug all Devices…
Starting udev Coldplug all Devices…
[ 60.566825] systemd[1]: Starting Create Static Device Nodes in /dev…
Starting Create Static Device Nodes in /dev…
[ 60.630029] systemd[1]: Started Journal Service.
[ OK ] Started Journal Service.
Starting Flush Journal to Persistent Storage…
[ OK ] Started Load/Save Random Seed.
[ 62.065118] systemd-journald[368]: Received request to flush runtime journal from PID 1
[ OK ] Started Flush Journal to Persistent Storage.
[ 62.627589] iscsi: registered transport (iser)
[ OK ] Started Load Kernel Modules.
[ OK ] Started Monitoring of LVM2 mirrors,…ng dmeventd or progress polling.
Starting Apply Kernel Variables…
Mounting FUSE Control File System…
[ OK ] Mounted FUSE Control File System.
[ OK ] Started Create Static Device Nodes in /dev.
Starting udev Kernel Device Manager…
[ OK ] Started Apply Kernel Variables.
[ OK ] Started udev Coldplug all Devices.
[ OK ] Started udev Kernel Device Manager.
[ OK ] Reached target Local File Systems (Pre).
[ OK ] Started Dispatch Password Requests to Console Directory Watch.
[ OK ] Found device /dev/ttyAMA0.
[ OK ] Found device /dev/disk/by-label/UEFI.
Mounting /boot/efi…
[ OK ] Mounted /boot/efi.
[ OK ] Reached target Local File Systems.
Starting Initial cloud-init job (pre-networking)…
Starting Tell Plymouth To Write Out Runtime Data…
Starting Set console keymap…
Starting Create Volatile Files and Directories…
Starting LSB: AppArmor initialization…
Starting Commit a transient machine-id on disk…
[ OK ] Started Tell Plymouth To Write Out Runtime Data.
[FAILED] Failed to start Set console keymap.
See ‘systemctl status console-setup.service’ for details.
[ OK ] Started Commit a transient machine-id on disk.
[ OK ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
[ OK ] Started Create Volatile Files and Directories.
Starting Network Time Synchronization…
Starting Update UTMP about System Boot/Shutdown…
[ OK ] Started Update UTMP about System Boot/Shutdown.
[ OK ] Started Network Time Synchronization.
[ OK ] Reached target System Time Synchronized.
[ OK ] Started LSB: AppArmor initialization.
[ OK ] Reached target System Initialization.
[ OK ] Started Trigger resolvconf update for networkd DNS.
[ OK ] Listening on ACPID Listen Socket.
[ OK ] Listening on D-Bus System Message Bus Socket.
Starting Socket activation for snappy daemon.
Starting Seed the pseudo random number generator on first boot…
Starting LXD – unix socket.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Started Daily apt activities.
[ OK ] Reached target Timers.
[ OK ] Listening on UUID daemon activation socket.
[ OK ] Started ACPI Events Check.
[ OK ] Reached target Paths.
[ OK ] Listening on Socket activation for snappy daemon.
[ OK ] Listening on LXD – unix socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
Starting LXD – container startup/shutdown…
[ OK ] Started Deferred execution scheduler.
[ OK ] Started Regular background program processing daemon.
[ OK ] Started D-Bus System Message Bus.
[ OK ] Started ACPI event daemon.
Starting System Logging Service…
Starting Login Service…
Starting Accounts Service…
[ OK ] Started FUSE filesystem for LXC.
Starting LSB: Record successful boot for GRUB…
Starting LSB: MD monitoring daemon…
[ OK ] Started Login Service.
[ OK ] Started System Logging Service.
Starting Authenticate and Authorize Users to Run Privileged Tasks…
[ OK ] Started LSB: Record successful boot for GRUB.
[ OK ] Started LSB: MD monitoring daemon.
[ OK ] Started Authenticate and Authorize Users to Run Privileged Tasks.
[ OK ] Started Accounts Service.
[ OK ] Started Seed the pseudo random number generator on first boot.
[ OK ] Started LXD – container startup/shutdown.
[ 137.551732] cloud-init[502]: Cloud-init v. 0.7.7 running ‘init-local’ at Thu, 11 Feb 2016 16:29:14 +0000. Up 126.47 seconds.
[ OK ] Started Initial cloud-init job (pre-networking).
[ OK ] Reached target Network (Pre).
Starting Raise network interfaces…
[ OK ] Started Raise network interfaces.
Starting Initial cloud-init job (metadata service crawler)…
[ OK ] Reached target Network.
[ 183.824988] cloud-init[984]: Cloud-init v. 0.7.7 running ‘init’ at Tue, 10 May 2016 13:09:14 +0000. Up 162.17 seconds.
[ 183.856568] cloud-init[984]: ci-info: +++++++++++++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++++++++++++
[ 183.896700] cloud-init[984]: ci-info: +——–+——+—————————-+—————+——-+——————-+
[ 183.944499] cloud-init[984]: ci-info: | Device | Up | Address | Mask | Scope | Hw-Address |
[ 183.979733] cloud-init[984]: ci-info: +——–+——+—————————-+—————+——-+——————-+
[ 184.003937] cloud-init[984]: ci-info: | lo | True | 127.0.0.1 | 255.0.0.0 | . | . |
[ 184.024728] cloud-init[984]: ci-info: | lo | True | ::1/128 | . | host | . |
[ 184.040806] cloud-init[984]: ci-info: | eth0 | True | 10.0.2.15 | 255.255.255.0 | . | 52:54:00:12:34:56 |
[ 184.059981] cloud-init[984]: ci-info: | eth0 | True | fe80::5054:ff:fe12:3456/64 | . | link | 52:54:00:12:34:56 |
[ 184.076902] cloud-init[984]: ci-info: +——–+——+—————————-+—————+——-+——————-+
[ 184.096749] cloud-init[984]: ci-info: +++++++++++++++++++++++++++Route IPv4 info++++++++++++++++++++++++++++
[ 184.119901] cloud-init[984]: ci-info: +——-+————-+———-+—————+———–+——-+
[ 184.135772] cloud-init[984]: ci-info: | Route | Destination | Gateway | Genmask | Interface | Flags |
[ 184.159764] cloud-init[984]: ci-info: +——-+————-+———-+—————+———–+——-+
[ 184.183873] cloud-init[984]: ci-info: | 0 | 0.0.0.0 | 10.0.2.2 | 0.0.0.0 | eth0 | UG |
[ 184.221910] cloud-init[984]: ci-info: | 1 | 10.0.2.0 | 0.0.0.0 | 255.255.255.0 | eth0 | U |
[ 184.235614] cloud-init[984]: ci-info: +——-+————-+———-+—————+———–+——-+
[ 184.251771] cloud-init[984]: Generating public/private rsa key pair.
[ 184.267717] cloud-init[984]: Your identification has been saved in /etc/ssh/ssh_host_rsa_key.
[ 184.287923] cloud-init[984]: Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.
[ 184.299763] cloud-init[984]: The key fingerprint is:
[ 184.319922] cloud-init[984]: SHA256:5nfgM60p9uPLbYwOS9asle9xORwZn8f2w1Wn1/jxyv8 root@ubuntu
[ 184.347770] cloud-init[984]: The key’s randomart image is:
[ 184.368899] cloud-init[984]: +—[RSA 2048]—-+
[ 184.387884] cloud-init[984]: | |
[ 184.421722] cloud-init[984]: | |
[ 184.460441] cloud-init[984]: | . o|
[ 184.501071] cloud-init[984]: | B=|
[ 184.544642] cloud-init[984]: | S . =oO|
[ 184.575731] cloud-init[984]: | o + + ..**|
[ 184.607402] cloud-init[984]: | = Xo+ =o+|
[ 184.652524] cloud-init[984]: | ooBoOo+ o.|
[ 184.679908] cloud-init[984]: | .o=O=+ o.E|
[ 184.699730] cloud-init[984]: +—-[SHA256]—–+
[ 184.723963] cloud-init[984]: Generating public/private dsa key pair.
[ 184.747842] cloud-init[984]: Your identification has been saved in /etc/ssh/ssh_host_dsa_key.
[ 184.768001] cloud-init[984]: Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub.
[ 184.787953] cloud-init[984]: The key fingerprint is:
[ 184.806946] cloud-init[984]: SHA256:KzpBU/Zr4F1VzPQL/SjCTZudKOk1n4AXjCVEx8sgc8g root@ubuntu
[ 184.815690] cloud-init[984]: The key’s randomart image is:
[ 184.827854] cloud-init[984]: +—[DSA 1024]—-+
[ 184.855475] cloud-init[984]: | . ++.o=o |
[ 184.866056] cloud-init[984]: | o E o*o +. |
[ 184.875487] cloud-init[984]: | o . +.++o ..|
[ OK ] Started Initial cloud-init job (metadata service crawler).
[ 184.897020] cloud-init[984]: | o . …=o*.oo|
[ OK ] Reached target Network is Online.
Starting /etc/rc.local Compatibility…
[ 185.021564] cloud-init[984]: | . o oSo* @ +..|
[ 185.051657] cloud-init[984]: | . . +o = = . |
Starting iSCSI initiator daemon (iscsid)…
[ OK ] Reached target Cloud-config availability.
Starting Apply the settings specified in cloud-config…
Starting OpenBSD Secure Shell server…
[ 185.504541] cloud-init[984]: | …. . o |
[ OK ] Started /etc/rc.local Compatibility.
[ 186.110577] cloud-init[984]: | .. . |
[ 186.542021] cloud-init[984]: | .. |
[ 186.557503] cloud-init[984]: +—-[SHA256]—–+
[ 186.585582] cloud-init[984]: Generating public/private ecdsa key pair.
[ 186.609651] cloud-init[984]: Your identification has been saved in /etc/ssh/ssh_host_ecdsa_key.
[ 186.625636] cloud-init[984]: Your public key has been saved in /etc/ssh/ssh_host_ecdsa_key.pub.
[ 186.657904] cloud-init[984]: The key fingerprint is:
[ 186.801267] cloud-init[984]: SHA256:8AlCHJTqwT2ZHsSrQWYCamH0IP6rI1DR9rXcGPckoms root@ubuntu
[ 186.909225] cloud-init[984]: The key’s randomart image is:
[ 187.041113] cloud-init[984]: +—[ECDSA 256]—+
[ 187.093113] cloud-init[984]: |== =+o |
[ 187.173249] cloud-init[984]: |* O.B + o . |
[ 187.305466] cloud-init[984]: |.O B.=o+ B + |
[ 187.461236] cloud-init[984]: |. B B.o++.. . |
[ 187.601078] cloud-init[984]: | o * o .S |
[ 187.647573] cloud-init[984]: |. o o E |
[ 187.972585] cloud-init[984]: |. . . |
[ 188.117766] cloud-init[984]: |… |
[ 188.313919] cloud-init[984]: |… |
[ 188.425282] cloud-init[984]: +—-[SHA256]—–+
[ 188.540492] cloud-init[984]: Generating public/private ed25519 key pair.
[ OK ] Started iSCSI initiator daemon (iscsid).
[ 188.655394] cloud-init[984]: Your identification has been saved in /etc/ssh/ssh_host_ed25519_key.
Starting Login to default iSCSI targets…
[ 188.804741] cloud-init[984]: Your public key has been saved in /etc/ssh/ssh_host_ed25519_key.pub.
[ 189.156485] cloud-init[984]: The key fingerprint is:
[ 189.274441] cloud-init[984]: SHA256:1nftC58SMDp4u2HEzdOJT0TQNGvLqgv2INuYUBnlgAs root@ubuntu
[ 189.362913] cloud-init[984]: The key’s randomart image is:
[ 189.410176] cloud-init[984]: +–[ED25519 256]–+
[ 189.821593] cloud-init[984]: | .. . .++ |
[ 189.965319] cloud-init[984]: | E . + ..o |
[ 190.016843] cloud-init[984]: | . .. . + |
[ 190.084884] cloud-init[984]: | . o ..oo* o. |
[ 190.137893] cloud-init[984]: | o Soo=+*. .|
[ 190.235385] cloud-init[984]: | . o.+ .=o . |
[ 190.504702] cloud-init[984]: | . . +.oo. o. .|
[ 190.680403] cloud-init[984]: | . B =.o .o o|
[ OK ] Started OpenBSD Secure Shell server.
[ 190.832058] cloud-init[984]: | + . =o .+ |
[ 190.897369] cloud-init[984]: +—-[SHA256]—–+
[ OK ] Started Login to default iSCSI targets.
[ OK ] Reached target Remote File Systems (Pre).
[ OK ] Reached target Remote File Systems.
Starting LSB: automatic crash report generation…
Starting LSB: Set the CPU Frequency Scaling governor to “ondemand”…
Starting Permit User Sessions…
Starting LSB: daemon to balance interrupts for SMP systems…
[ OK ] Started Permit User Sessions.
Starting Terminate Plymouth Boot Screen…
Starting Hold until boot process finishes up…
[ OK ] Started Hold until boot process finishes up.
[ OK ] Started Serial Getty on ttyAMA0.
[ OK ] Started Getty on tty1.
[ OK ] Reached target Login Prompts.
[ OK ] Started Terminate Plymouth Boot Screen.
[ OK ] Started LSB: Set the CPU Frequency Scaling governor to “ondemand”.
[ OK ] Started LSB: daemon to balance interrupts for SMP systems.
[ OK ] Started LSB: automatic crash report generation.Ubuntu 16.04 LTS ubuntu ttyAMA0ubuntu login:

You won’t be able to login there however, so instead you can access the emulated server via ssh:


No password will be asked since we’re using an ssh key.

A few commands confirm we are indeed running Ubuntu 16.04 with Linux 4.4 on a dual core Cortex A57 processor:


I’ve also run linpack benchmark:


Emulation from x86 to ARM is affecting the results quite a bit here. For reference, a Raspberry Pi 2 achieves about 113300 KFLOPS for the same benchmark. You’ll also noticed specifically compiling for Cortex-A57 CPU improves the performance by about 10%, even in qemu.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

Radxa Orion O6 Armv9 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
31 Comments
oldest
newest
Luddy Harrison
Luddy Harrison
8 years ago

Thanks a lot for writing this up. I’m struggling to get this working, and have tried a few formulas including yours. xenial-server-cloudimg-arm64-uefi1.img boots up, but cloud-init fails during the boot process. My cloud.txt file — the 2nd argument to cloud-localds — is yours verbatim with my username and ssh key filled in. I get this on the console during boot: [ 135.305834] cloud-init[916]: 2016-05-29 01:47:34,716 – util.py[WARNING]: failed of stage init [ 135.317514] cloud-init[916]: failed run of stage init [ 135.331337] cloud-init[916]: ———————————————————— [ 135.343493] cloud-init[916]: Traceback (most recent call last): [ 135.355393] cloud-init[916]: File “/usr/bin/cloud-init”, line 520, in status_wrapper… Read more »

Luddy Harrison
Luddy Harrison
8 years ago


Thanks! I pulled a fresh image, and now everything works as expected.

Peter Cooper
Peter Cooper
8 years ago

Thank you for the great post! I followed all your steps and I also have a Ubuntu 14.04 with AMD64 CPU. However, in the last phase of ssh to the 2222 port of the local host, I always get the error message of “Permission denied (publickey)”. I can ssh to my localhost without typing any passwords. Just the port 2222 always fails on me. Any suggestions? Thanks!

Peter Cooper
Peter Cooper
8 years ago


Here is the content of my id_rsa.pub:

This is the content of my cloud.txt:

And this is the content of my authorized_keys:

I can directly login to my localhost without typing keys but I cannot do it the same to port 2222. Not sure what is wrong here…

Peter Cooper
Peter Cooper
8 years ago


Is there any way to know the username and password of the cloud image so that we could login directly from that console?

Peter Cooper
Peter Cooper
8 years ago


I added admin@admin in cloud.txt and re-started the VM. But I still cannot login… I also tried to change authorized_keys in ~/.ssh/ to authorized_keys2, again, no luck…

Jun Sun
Jun Sun
8 years ago

This is a great write-up. It is recent, concise and clear. Most of all, it is a lifesaver for me. Just one update, with ubuntu 16.04.01, one can directly install qemu-system-aarch64 2.5, sudo apt-get install qemu-system-arm.

Jack Healy
Jack Healy
8 years ago

@Peter Cooper
The instructions have left out the installation of cloud-init! It is not included in cloud-utils.
Without it, the line:
cloud-localds cloud.img cloud.txt
does nothing without a peep.

@Jun Sun

GanjaBear
GanjaBear
8 years ago

Is it possible to use an existing Cortex-A53 image after replacing the kernel, etc?

agguro
agguro
7 years ago

Everything works except the login via ssh. I’m pretty sure all is done as it must be done. Perhaps one question: the public key needs to be copied with or without the email address? (or login address whatever it is)
thanks

agguro
agguro
7 years ago

I did it but nothing:
The authenticity of host ‘[localhost]:2222 ([127.0.0.1]:2222)’ can’t be established.
ECDSA key fingerprint is SHA256:/K+RpJF5+bjHKlmdD7U7lB5EhemsUDD/KNXsntu0MuI.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘[localhost]:2222’ (ECDSA) to the list of known hosts.
Permission denied (publickey).

agguro
agguro
7 years ago

srry disturbing again: this is the message I got when running ssh -p 2222 agguro@localhost: sudo ssh -v -p 2222 agguro@localhost OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g 1 Mar 2016 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug1: Connecting to localhost [127.0.0.1] port 2222. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: identity file /root/.ssh/id_rsa type 1 debug1: key_load_public: No such file or directory debug1: identity file /root/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /root/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /root/.ssh/id_dsa-cert type -1 debug1:… Read more »

agguro
agguro
7 years ago

also, isn’t it better to add a user exp admin pwd admin as sudo in the image file? the ssh option doesn’t seems to work here

maxim
maxim
7 years ago

I also can not pass ssh key via this config file, so I just added new user to ubuntu and logged with it.
Steps for people who forget old ways to change password:
1. In grub go to recovery mode and in the end of line root=… add
init=/bin/bash

then you will boot up with root console.

2. mount -o remount,rw /

3. adduser myuser

4. add user to /etc/sudoers

5. sync

6. reboot or kill qemu and boot again.

agguro
agguro
7 years ago

srry guys, maybe I’m stupid or so but I can edit the grub menu and boot in recovery mode but the system keeps asking for a password. I wonder if an installation can be done from an iso file, just like an emulated cdrom like I did for qemy-system-arm

maxim
maxim
7 years ago

check that you provided init=/bin/bash on right line.

agguro
agguro
7 years ago

sorry, nothing seems to work

Cloudstrife
Cloudstrife
7 years ago

Hi,
I got this message
=========================
qemu-system-aarch64: -netdev user,id=h4niz: could not set up host forwarding rule ‘tcp:2222::22’
qemu-system-aarch64: -netdev user,id=h4niz: Device ‘user’ could not be initialized
=========================
when run:

cloud-localds cloud.img cloud.txt
qemu-system-aarch64 -smp 2 -m 1024 -M virt -bios QEMU_EFI.fd -nographic \
-device virtio-blk-device,drive=image \
-drive if=none,id=image,file=xenial-server-cloudimg-arm64-uefi1.img \
-device virtio-blk-device,drive=cloud \
-drive if=none,id=cloud,file=cloud.img \
-netdev user,id=h4niz-device virtio-net-device,netdev=h4niz -redir tcp:2222::22 \
-cpu cortex-a57

This is my cloud-utils
#cloud-config

users:
– name: h4niz
ssh-authorized-keys:
– ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCc19j8eW7q8rMDujjXyinMxM/mjC+lCZmsmXSmiCoiPN7K7H6ovvwjh46FEDzbjb1VEv5YOM0SsXJEtrbFS3XmOn21mE/HKyqxVN7G57eZ94OiU5FM8G8CSn4Bt/OmLdqBhRy0QKRP95cw1ZBbxEmD+cPorGBApGmiR0kOpMm9MiOU3vZq8MLe/CUoLqsalAw/d+mGEZDZpuMAI10X189z2jsiFnbroEVpZ3TejmrtrLyEPrN6dNThMTZzGQtgze/EwzD/F2QW+xCjArAotFWrTanFHSrVS918yphwDy7ywYpc+gKvlNuTcPmz5BhagQ0nfNSHhBjpzWJTV2vYXlqZ
sudo: [‘ALL=(ALL) NOPASSWD:ALL’]
groups: sudo
shell: /bin/bash

baseUser
baseUser
7 years ago

have done all the procedure and got the aarch64 ubuntu ready. but
when i do $ifconfig eth0 , it hanged.
please help

Chethan
Chethan
6 years ago

@aaguro , Any luck on ssh ? I am still not able to ssh with the keypair setup . I tried as mentioned by aaguro.
thanks
Chethans

Knoedel
Knoedel
6 years ago

@Chethan Did you use the whole string with user@ubuntu or whatever you might have at the end? So to say like this: users: – name: username ssh-authorized-keys: – ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDWSfN+SKdja1sxKYwcodrzu+04kgbUwFx7m5gKHc7M9kVO6qymK/Bo9qxpHrRdUICcDqLHbKEE7Buos0frsncemRP0OVBD1m0UlJ6v5mr90lUpiK4tJ551Z2a0Fan2FHSPg5M3DgKW7HugPyiz2cX67PZc0tGqoMRnjeiW6MUDTqE2wuLPgxNm9z8MHCWPsH7W4RuQosCbtjn5164bpRSpf39br9dFgAiUfufFvLjDZR+AUlbenVt1UR3oiAi46alW0ZJxfCrOPqfuUmsOHTOjI24LLWC6S9E0zB5SMm59zOcJ4xQjsMTja/sZJ215jfXuHRf3BM8tTDye25jibAq9 user@ubuntu sudo: [‘ALL=(ALL) NOPASSWD:ALL’] groups: sudo shell: /bin/bash Also when generating the ssh key with “ssh-keygen -t rsa -f .ssh/id_rsa” don’t use it with sudo, for me it placed it in the root files which didn’t work. You might also try to add a password so you can access ubuntu without ssh if you dont require it particularly. So for me it looked kinda like this in the end: users:… Read more »

Knoedel
Knoedel
6 years ago

@Knoedel

@Chethan

Another thing to add I always reset the Ubuntu image when I rebuild the cloud image so I have the original one from the download.

Knoedel
Knoedel
6 years ago

Knoedel : Also when generating the ssh key with “ssh-keygen -t rsa -f .ssh/id_rsa” don’t use it with sudo, for me it placed it in the root files which didn’t work. Sorry this is wrong, it created a keypair in the specified folder as root@ubuntu user instead of user@ubuntu so you have like ssh-rsa AAAAB3N … root@ubuntu. I guess it works like this but then you have to use sudo when calling “ssh -p 2222 username@localhost” and also place the rsa key into the “/root/.ssh/” directory instead of the “~/.ssh/”. So the easiest way is not using sudo when calling… Read more »

Chethan
Chethan
6 years ago

@Knoedel
Thanks a lot for helping out here. It finally worked after trying out the user@ubuntu and rebuilding the cloud image.

Boardcon Rockchip RK3588S SBC with 8K, WiFI 6, 4G LTE, NVME SSD, HDMI 2.1...