Skip to content

Instantly share code, notes, and snippets.

@max2320
Created May 27, 2018 20:21
Show Gist options
  • Save max2320/cbff77a4635f55ca737249d4545bb20f to your computer and use it in GitHub Desktop.
Save max2320/cbff77a4635f55ca737249d4545bb20f to your computer and use it in GitHub Desktop.
#!/bin/bash
sudo vde_switch -d -sock /tmp/sw1 -M /tmp/sw1.mgmt
sudo slirpvde -d -s /tmp/sw1 -q
vm-file(){
sudo qemu-system-x86_64 -enable-kvm -m 3150 -vga std -soundhw hda \
-cpu host -smp 4,sockets=1,cores=2,threads=2 \
-display gtk \
-net nic,macaddr="52:54:00:01:12:2$2" -net vde,sock=/tmp/sw1 \
-spice seamless-migration=on \
-hda "$(pwd)/$1"
}
vm-file $1 1
vm-file $2 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment