qemu : script Linux
This commit is contained in:
parent
fd6c5b5261
commit
360a75b594
1 changed files with 7 additions and 8 deletions
|
@ -1,11 +1,10 @@
|
||||||
#!/bin/sh -ex
|
#!/bin/sh -ex
|
||||||
name="$(basename "$0")"
|
name="$(basename "$0")"
|
||||||
qemu-system-x86_64 \
|
qemu-system-x86_64 \
|
||||||
-monitor stdio -enable-kvm \
|
-monitor stdio -enable-kvm \
|
||||||
-cpu host -smp "$(nproc)" \
|
-cpu host -smp "$(("$(nproc)" / 2))" \
|
||||||
-m 4G \
|
-m 8G \
|
||||||
-drive "file=images/$(basename "$0").qcow2,if=virtio" \
|
-hda "images/${name}.qcow2" \
|
||||||
-net nic -net "user,hostname=${name}" \
|
-net nic \
|
||||||
-name "$name" \
|
-name "$name" \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue