packer-qemu/run-image.sh

16 righe
362 B
Bash
Executable File

#!/bin/bash
# pass qcow2 image path as first parameter
if [ "$#" -lt 1 ]; then
exit 1
fi
# -cdrom ./packer/assets/install-amd64-minimal-20200205T214502Z.iso \
qemu-system-x86_64 \
-boot order=d -m 1024 \
-smp cpus=1,sockets=2,maxcpus=2 \
-drive "file=$1,format=qcow2,index=1" \
-net nic,model=virtio \
-net user,hostfwd=tcp::5556-:22