Skip to content

Instantly share code, notes, and snippets.

@emctoo
Created January 6, 2016 16:00
Show Gist options
  • Save emctoo/e32f4a446022e57fb588 to your computer and use it in GitHub Desktop.
Save emctoo/e32f4a446022e57fb588 to your computer and use it in GitHub Desktop.
load freebsd vm
#!/usr/bin/env zsh
#
vm_name="FreeBSD"
# 默认的helper是/usr/lib/qemu/qemu-bridge-helper
default_helper="/usr/lib/qemu/qemu-bridge-helper"
exec qemu-system-x86_64 -name "$vm_name" \
-enable-kvm -cpu host -m 4G -monitor stdio \
-display none \
-drive file="r292858.qcow2",if=virtio,cache=none \
-netdev tap,id=hn0,helper=/usr/lib/qemu/qemu-bridge-helper \
-device virtio-net-pci,netdev=hn0,id=nic1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment