packer-qemu/run-image.sh

16 lines
427 B
Bash
Raw Normal View History

2020-11-12 13:05:18 +00:00
#!/bin/bash
# pass debian or gentoo as first parameter
if [ "$#" -lt 2 ]; 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=./image/assets/output_qcow2/$1_packer.qcow2,format=qcow2,index=1" \
-device virtio-net,netdev=user.0 \
-netdev user,id=user.0,hostfwd=tcp::5556-:22