mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-08 05:26:58 +02:00
fix(qemu): Enable all available CPU features and SMP by default
This commit is contained in:
parent
007ab712bf
commit
12e0f8dddd
@ -5,6 +5,7 @@ VM_NAME=
|
|||||||
VM_UUID=
|
VM_UUID=
|
||||||
VM_IMAGE=
|
VM_IMAGE=
|
||||||
VM_MEMORY=
|
VM_MEMORY=
|
||||||
|
VM_NCPUS="`grep -c ^processor /proc/cpuinfo`"
|
||||||
IMAGE_PATH="${SCRIPT_DIR}/${VM_IMAGE}"
|
IMAGE_PATH="${SCRIPT_DIR}/${VM_IMAGE}"
|
||||||
SSH_PORT=2222
|
SSH_PORT=2222
|
||||||
SSH_KEYS=""
|
SSH_KEYS=""
|
||||||
@ -74,11 +75,14 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# Default to KVM, fall back on full emulation
|
# Default to KVM, fall back on full emulation
|
||||||
|
# Emulate the host CPU closely in both features and cores.
|
||||||
# ${METADATA} will be mounted in CoreOS as /media/metadata
|
# ${METADATA} will be mounted in CoreOS as /media/metadata
|
||||||
qemu-system-x86_64 \
|
qemu-system-x86_64 \
|
||||||
-name "$VM_NAME" \
|
-name "$VM_NAME" \
|
||||||
-uuid "$VM_UUID" \
|
-uuid "$VM_UUID" \
|
||||||
-m ${VM_MEMORY} \
|
-m ${VM_MEMORY} \
|
||||||
|
-cpu host \
|
||||||
|
-smp "${VM_NCPUS}" \
|
||||||
-machine accel=kvm:tcg \
|
-machine accel=kvm:tcg \
|
||||||
-drive index=0,if=virtio,media=disk,format=qcow2,file="${IMAGE_PATH}" \
|
-drive index=0,if=virtio,media=disk,format=qcow2,file="${IMAGE_PATH}" \
|
||||||
-net nic,vlan=0,model=virtio \
|
-net nic,vlan=0,model=virtio \
|
||||||
|
Loading…
Reference in New Issue
Block a user