#!/bin/bash
[ "$(id -un)" == "vm" ] ||
{
	echo wrong user
	read -u1 -r
	#exit 1
}
ISO="$1"

# based on libvirt
cd /home/vm
#exec /usr/bin/qemu-system-x86_64 \
exec /usr/bin/qemu-system-x86_64-gtk \
	-name w7vm \
	-machine pc-i440fx-2.4,accel=kvm,usb=off \
	-enable-kvm \
	-cpu host \
	-smp 2 \
	-m 1024 \
	-cdrom "$ISO" \
	-usbdevice tablet \
	-rtc base=utc \
	-realtime mlock=off \
	-msg timestamp=on \
	-netdev user,id=n0 \
	-device rtl8139,netdev=n0

exit 0

	-runas vm \
