2017-03-12 20:56:19 +01:00
|
|
|
+++
|
2017-03-12 21:10:19 +01:00
|
|
|
date = 2012-01-22T00:00:00+00:00
|
2017-03-12 20:56:19 +01:00
|
|
|
title = "Running Ubuntu armel cloud instances manually"
|
2017-03-12 21:40:00 +01:00
|
|
|
tags = ["devtools"]
|
2017-03-12 20:56:19 +01:00
|
|
|
+++
|
2017-03-12 20:46:14 +01:00
|
|
|
|
|
|
|
Documentation: <https://help.ubuntu.com/community/UEC/Images>
|
|
|
|
|
2017-03-12 20:56:19 +01:00
|
|
|
The image itself:
|
|
|
|
<http://uec-images.ubuntu.com/oneiric/current/oneiric-server-cloudimg-armel-disk1.img>
|
2017-03-12 20:46:14 +01:00
|
|
|
|
2017-03-12 20:56:19 +01:00
|
|
|
This is the plain QCOW2 image. The normal one includes OMAP3/4(?) kernel
|
|
|
|
but I'll use the vexpress-a9 Linaro hwpack
|
|
|
|
instead.
|
2017-03-12 20:46:14 +01:00
|
|
|
|
|
|
|
michaelh@crucis:~/linaro/tests/qemu/img$ qemu-img info oneiric-server-cloudimg-armel-disk1.img
|
|
|
|
image: oneiric-server-cloudimg-armel-disk1.img
|
|
|
|
file format: qcow2
|
|
|
|
virtual size: 808M (847203840 bytes)
|
|
|
|
disk size: 198M
|
|
|
|
cluster_size: 65536
|
|
|
|
|
|
|
|
Running with:
|
|
|
|
|
|
|
|
qemu-system-arm -M vexpress-a9 -m 1024 \
|
|
|
|
-drive file=../../img/ubuntu.img,if=sd,cache=writeback \
|
|
|
|
-serial stdio \
|
|
|
|
-append 'root=/dev/mmcblk0p1 rw mem=1024M console=ttyAMA0,38400n8 rootwait' \
|
|
|
|
-kernel ../../img/tip/uImage -initrd ../../img/tip/uInitrd
|
|
|
|
|
|
|
|
Sits there saying:
|
|
|
|
|
2017-03-12 20:56:19 +01:00
|
|
|
<tt>2012-01-09 03:12:12,509 - DataSourceEc2.py\[WARNING\]:
|
|
|
|
'http://169.254.169.254' failed: url error \[\[Errno 111\] Connection
|
|
|
|
refused\]</tt>
|
2017-03-12 20:46:14 +01:00
|
|
|
|
|
|
|
Try different boot args:
|
|
|
|
|
|
|
|
root=/dev/mmcblk0p1 rw mem=1024M console=ttyAMA0,38400n8 rootwait \
|
|
|
|
init=/usr/lib/cloud-init/uncloud-init ubuntu-pass=ubuntu ds=unloud-init
|
|
|
|
|
|
|
|
Running:
|
|
|
|
|
|
|
|
qemu-system-arm -M vexpress-a9 -m 1024 \
|
|
|
|
-drive file=../../img/ubuntu.img,if=sd,cache=writeback \
|
|
|
|
-serial stdio \
|
|
|
|
-append 'root=/dev/mmcblk0p1 rw mem=1024M console=ttyAMA0,38400n8 rootwait init=/usr/lib/cloud-init/uncloud-init ubuntu-pass=ubuntu ds=nocloud' \
|
|
|
|
-kernel ../../img/tip/uImage -initrd ../../img/tip/uInitrd
|
|
|
|
|
2017-03-12 20:56:19 +01:00
|
|
|
Fails
|
|
|
|
with:
|
2017-03-12 20:46:14 +01:00
|
|
|
|
|
|
|
Failed to execute /usr/lib/cloud-init/nocloud-init. Attempting defaults...
|
|
|
|
|
|
|
|
Should be `uncloud-init`.
|
|
|
|
|
2017-03-12 20:56:19 +01:00
|
|
|
`uncloud-init` assumes the console is on `ttyS0`. Patch to ttyAMA0.
|
2017-03-12 20:46:14 +01:00
|
|
|
|
2017-03-12 20:56:19 +01:00
|
|
|
Final fault is the `ds=`. Should be nocloud which causes cloud-init to
|
|
|
|
use `DataSourceNoCloud.py`.
|
2017-03-12 20:46:14 +01:00
|
|
|
|
|
|
|
Forward SSH:
|
|
|
|
|
|
|
|
-redir tcp:5022::22
|
|
|
|
|
|
|
|
Giving:
|
|
|
|
|
|
|
|
qemu-system-arm -M vexpress-a9 -m 1024 \
|
|
|
|
-drive file=../../img/ubuntu.img,if=sd,cache=writeback -serial stdio \
|
|
|
|
-append 'root=/dev/mmcblk0p1 rw mem=1024M console=ttyAMA0,38400n8 rootwait init=/usr/lib/cloud-init/uncloud-init ubuntu-pass=ubuntu ds=nocloud' \
|
|
|
|
-kernel ../../img/tip/uImage -initrd ../../img/tip/uInitrd \
|
|
|
|
-redir tcp:5022::22
|
2017-03-12 20:56:19 +01:00
|
|
|
|