[Linux environment] Mac m1 pro uses qemu to install Ubuntu server process record

[mac install Linux] mac uses qemu to install Ubuntu server

MacBook Pro notebook, M1 Pro chip, macOS Monterey system.

Previous environment configuration

download brew
download qemu

brew install qemu

process

Download the iso image file: https://repo.huaweicloud.com/ubuntu-releases/14.04/?C=N&O=D
Click ubuntu-14.04.6-server-amd64.iso to download and save to the ISO folder (or directly enter the terminal

wget https://repo.huaweicloud.com/ubuntu-releases/14.04/ubuntu-14.04.6-server-amd64.iso

Set 10G for the image file, set the number of cores for the virtual machine smp, set the memory size for m, set the location of the virtual machine image file for hda, and set the location of the iso file for cdrom.

#制作虚拟机qcow2镜像文件
qemu-img create -f qcow2 ubuntu14.qcow2 10G
#查看镜像文件信息
qemu-img info ubuntu14.qcow2
#启动安装虚拟机    
qemu-system-x86_64 -machine type=q35 -smp 4 -hda ubuntu14.qcow2 -m 4G -vga virtio -usb -device usb-tablet -display default,show-cursor=on -cdrom ./ISO/ubuntu-14.04.6-server-amd64.iso 

Stuck at this step, it is suspected that the disk space is 10G or the memory is insufficient. After expanding the disk to 40G, it is found that it stops for a long time at this step, and it is not an error.
insert image description here

The first startup interface (select language)
insert image description here

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
In this step, choose to go directly to the disk.
insert image description here
insert image description here
Select Yes
insert image description here
and wait for the installation
insert image description here
. No agent is set, just press Enter
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

insert image description here
Reboot without inserting the CD-ROM.

qemu-system-x86_64 -machine type=q35 -smp 4 -hda ubuntu14.qcow2 -m 4G -vga virtio -usb -device usb-tablet -display default,show-cursor=on

insert image description here
insert image description here
insert image description here
In the end, this ubuntu device can be started successfully, but I don't know how to connect to the network and share files, which is equivalent to being unusable and can only be used to study the linux system.

Guess you like

Origin blog.csdn.net/weixin_49986678/article/details/127278230