TurnToJPG -->

Qemu Emulation

In archlinux, install packages via:

$ sudo pacman -S qemu-arch-extra
$ yaourt cloud-utils

Create the img via following command:

root@archiso ~/arm # cloud-localds my-seed.img my-user-data 
root@archiso ~/arm # cat my-user-data 
password: enginexxx
chpasswd: { expire: False }
ssh_pwauth: True
 - ssh-rsa xxxxxx
timezone: Asia/Chongqing

Download the ubuntu image files in:

# wget
# wget

Your folder will be displayed like:

# ls
my-seed.img   QEMU_EFI.fd  xenial-server-cloudimg-arm64-uefi1.img
# cat
qemu-system-aarch64 \
    -smp 2 \
    -m 1024 \
    -M virt \
    -cpu cortex-a57 \
    -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=my-seed.img \
    -device virtio-net-device,netdev=user0 \
    -netdev user,id=user0 \
    -redir tcp:2222::22

start the shell script, then login with ssh -p2222 ubuntu@localhost, you will get an emulated arm environment.

The default size of the / partition is only 2G, need to growpart to 40G, the steps are listed as following(add 2 lines into the my-seed):

  mode: auto

Edit the mirrored pkgs via:

# vim /etc/apt/sources.list
deb xenial main restricted universe
deb xenial-updates main restricted universe
deb xenial-backports main restricted universe
deb xenial-security main restricted universe
deb xenial-proposed main restricted universe
# apt-get update

Enable the vnc:

# qemu-system-aarch64 ...... -vga std -vnc


In arm ubuntu64, do following for benchmark testing:

# apt-get install hpcc
# cp /usr/share/doc/hpcc/example/_hpccinf.txt hpccinf.txt
##### Edit this file
# hpcc

You could easily see the output.