Created
October 2, 2020 14:37
-
-
Save ners/bf78aed80d25ddf939d2e09ff261dcac to your computer and use it in GitHub Desktop.
Create Fedora ARM VM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VM_NAME ?= fc32-arm-devel | |
VM_SIZE ?= 10G | |
all: run | |
run: prepare | |
virsh list | grep -q ${VM_NAME} || virsh start ${VM_NAME} | |
virsh console ${VM_NAME} --safe | |
prepare: Fedora-Minimal-armhfp-32-1.6-sda.qcow2 vmlinuz-5.6.6-300.fc32.armv7hl initramfs-5.6.6-300.fc32.armv7hl.img | |
virsh list --all | grep -q ${VM_NAME} || virt-install \ | |
--name ${VM_NAME} \ | |
--vcpus=4,maxvcpus=4,sockets=1,cores=4,threads=1 \ | |
--ram 4096 \ | |
--arch armv7l \ | |
--machine virt-2.11 \ | |
--os-variant fedora32 \ | |
--import \ | |
--disk Fedora-Minimal-armhfp-32-1.6-sda.qcow2 \ | |
--boot kernel=vmlinuz-5.6.6-300.fc32.armv7hl,initrd=initramfs-5.6.6-300.fc32.armv7hl.img,kernel_args="console=ttyAMA0 rw root=LABEL=_/ rootwait" \ | |
--noreboot | |
Fedora-Minimal-armhfp-32-1.6-sda.raw.xz: | |
wget https://download.fedoraproject.org/pub/fedora/linux/releases/32/Spins/armhfp/images/Fedora-Minimal-armhfp-32-1.6-sda.raw.xz | |
%.raw: %.raw.xz | |
unxz --keep $< | |
%.qcow2: %.raw | |
qemu-img convert -f raw -O qcow2 $< $@ | |
qemu-img resize $@ ${VM_SIZE} | |
%.armv7hl %.armv7hl.img: Fedora-Minimal-armhfp-32-1.6-sda.raw | |
virt-get-kernel -a $< |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment