There are two parts to networking within QEMU:
- The virtual network device that is provided to the guest (e.g. a PCI network card).
- The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).
| sudo su - | |
| cat >/etc/apt/sources.list.d/webupd8team-java.list<< EOF | |
| deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main | |
| deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main | |
| EOF | |
| apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 | |
| apt-get update | |
| apt-get install oracle-java8-installer | |
| java -version |
Run the script below inside a folder you create. For example: ~/qemu/arm64
# Install QEMU and the EFI image for QEMU:
sudo apt install qemu qemu-system-arm qemu-efi
# Now you'll need to create pflash volumes for UEFI. Two volumes are required, one static one for the UEFI firmware, and another dynamic one to store variables. Both need to be exactly 64M in size.
dd if=/dev/zero of=flash0.img bs=1M count=64
dd if=/usr/share/qemu-efi/QEMU_EFI.fd of=flash0.img conv=notrunc
dd if=/dev/zero of=flash1.img bs=1M count=64
You might want to read this to get an introduction to armel vs armhf.
If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.
First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux
This is a writeup about how to install Ubuntu 16.04.1 Xenial Xerus for the 32-bit hard-float ARMv7 (armhf) architecture on a Qemu VM via Ubuntu netboot.
The setup will create a Ubuntu VM with LPAE extensions (generic-lpae) enabled. However, this writeup should also work for non-LPAE (generic) kernels.
The performance of the resulting VM is quite good, and it allows VMs with >1G ram (compared to 256M on versatilepb and 1G on versatile-a9/versatile-a15). It also supports virtio disks whereas versatile-a9/versatile-a15 only support SD cards via the -sd argument.
This is basically a rehash of an original post on CNXSoft - all credit (particularly for the Virtio device arguments used below) belongs to the author of that piece.
Download the latest uefi1.img image. E.g. ubuntu-16.04-server-cloudimg-arm64-uefi1.img from https://cloud-images.ubuntu.com/releases/16.04/release/
Download the UEFI firmware image QEMU_EFI.fd from https://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/
Determine your current username and get your current ssh public key: