This article is a mirror article of machine translation, please click here to jump to the original article.

View: 202|Reply: 0

[linux] On x86 version of Ubuntu, use Qemu to run the Arm version of Ubuntu

[Copy link]
Posted on 2025-10-23 14:20:54 | | |
This post was last edited by Summer on 2025-10-23 16:06


ARM Architecture Ubuntu Virtual Machine (QEMU) Installation and SSH Configuration Tutorial

1. Preliminary preparation
1. Install the dependency tool
sudo apt update
sudo apt install qemu-system-arm qemu-efi qemu-utils libvirt-daemon-system

2. Download the necessary documents
- Download the EFI firmware file
  wgethttps://releases.linaro.org/comp ... /qemu64/QEMU_EFI.fd
- Download the ARM Architecture Ubuntu image (address):https://cn.ubuntu.com/download/server/step1#architectures
  Select a version :ubuntu-24.04.2-live-server-arm64.iso

3. Create a virtual machine disk
qemu-img create -f qcow2 ubuntu.img 60G

4. Document organization
Put the following three files in the same directory:
- QEMU_EFI.fd (EFI firmware)
- ubuntu.img (virtual machine disk)
- ubuntu-24.04.2-live-server-arm64.iso (Ubuntu system image)


2. First boot (install Ubuntu system)
Run the following command to start the virtual machine and enter the system installation process:
sudo qemu-system-aarch64 \
  -m 4096 \
  -cpu cortex-a57 \
  -smp 4 \
  -M virt \
  -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd \
  -drive file=ubuntu.img,format=qcow2,if=virtio \
  -cdrom ubuntu-24.04.3-live-server-arm64.iso \
  -device virtio-net-device,netdev=net0 \
  -netdev user,id=net0,hostfwd=tcp::2622-:22 \
  -nographic
Tip: Follow the installation wizard to complete the system configuration and set up a username (example SM) and password.


3. Start again (installed system)
After the system is installed, there is no need to load the disc image when booting, the command is as follows:
sudo qemu-system-aarch64 \
  -m 4096 \
  -cpu cortex-a57 \
  -smp 4 \
  -M virt \
  -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd \
  -drive file=ubuntu.img,format=qcow2,if=virtio \
  -device virtio-net-device,netdev=net0 \
  -netdev user,id=net0,hostfwd=tcp::2622-:22 \
  -nographic


4. Solving SSH connection problems (Error: Connection reset by peer)
1. Check the port status
sudo lsof -i :2622

2. Install openssh-server (resolves the "no installation candidate" issue)
   a. Add a software source
   sudo nano /etc/apt/sources.list
   Add the following to the file and save:
   debhttp://archive.ubuntu.com/ubuntu/noble-updates main restricted universe multiverse
   debhttp://archive.ubuntu.com/ubuntu/noble-backports main restricted universe multiverse
   debhttp://security.ubuntu.com/ubuntu/noble-security main restricted universe multiverse

   b. Installation Services
   sudo apt update
   sudo apt install openssh-server

3. Launch the SSH service
   a. Check the status of the service
   sudo systemctl status ssh
   (Active: inactive (dead))

   b. Activation of Services
   sudo systemctl start ssh

4. Test the SSH connection (successful)
ssh -p 2622 sm@localhost
(Enter the password you set to log in)




Previous:VMware is unable to turn on CPU Performance Counter Virtualization
Next:Linux set up a proxy to surf the Internet scientifically
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com