mirror of
https://github.com/AuxXxilium/arv-v-dsm.git
synced 2024-11-23 23:10:58 +07:00
machine type=q35
This commit is contained in:
parent
6d8b375d35
commit
547b3feefa
6
disk.sh
6
disk.sh
@ -21,12 +21,12 @@ fi
|
||||
[ ! -f "$FILE" ] && echo "ERROR: Virtual DSM data-image does not exist ($FILE)" && exit 83
|
||||
|
||||
KVM_DISK_OPTS="\
|
||||
-device virtio-scsi-pci,id=hw-synoboot,bus=pci.0,addr=0xa \
|
||||
-device virtio-scsi-pci,id=hw-synoboot,bus=pcie.0,addr=0xa \
|
||||
-drive file=${IMG}/${BASE}.boot.img,if=none,id=drive-synoboot,format=raw,cache=none,aio=native,detect-zeroes=on \
|
||||
-device scsi-hd,bus=hw-synoboot.0,channel=0,scsi-id=0,lun=0,drive=drive-synoboot,id=synoboot0,bootindex=1 \
|
||||
-device virtio-scsi-pci,id=hw-synosys,bus=pci.0,addr=0xb \
|
||||
-device virtio-scsi-pci,id=hw-synosys,bus=pcie.0,addr=0xb \
|
||||
-drive file=${IMG}/${BASE}.system.img,if=none,id=drive-synosys,format=raw,cache=none,aio=native,detect-zeroes=on \
|
||||
-device scsi-hd,bus=hw-synosys.0,channel=0,scsi-id=0,lun=0,drive=drive-synosys,id=synosys0,bootindex=2 \
|
||||
-device virtio-scsi-pci,id=hw-userdata,bus=pci.0,addr=0xc \
|
||||
-device virtio-scsi-pci,id=hw-userdata,bus=pcie.0,addr=0xc \
|
||||
-drive file=${IMG}/data${DISK_SIZE}.img,if=none,id=drive-userdata,format=raw,cache=none,aio=native,detect-zeroes=on \
|
||||
-device scsi-hd,bus=hw-userdata.0,channel=0,scsi-id=0,lun=0,drive=drive-userdata,id=userdata0,bootindex=3"
|
||||
|
6
run.sh
6
run.sh
@ -33,7 +33,7 @@ source /run/power.sh
|
||||
|
||||
if [ -e /dev/kvm ] && sh -c 'echo -n > /dev/kvm' &> /dev/null; then
|
||||
if [[ $(grep -e vmx -e svm /proc/cpuinfo) ]]; then
|
||||
KVM_ACC_OPTS="-enable-kvm -machine accel=kvm,usb=off -cpu host"
|
||||
KVM_ACC_OPTS=",accel=kvm,usb=off -cpu host -enable-kvm"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -41,8 +41,8 @@ fi
|
||||
|
||||
pkill -f server.sh
|
||||
|
||||
KVM_EXTRA_OPTS="-nographic -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4"
|
||||
ARGS="-m ${RAM_SIZE} ${KVM_ACC_OPTS} ${KVM_EXTRA_OPTS} ${KVM_MON_OPTS} ${KVM_SERIAL_OPTS} ${KVM_NET_OPTS} ${KVM_DISK_OPTS}"
|
||||
EXTRA_OPTS="-nographic -object rng-random,id=rng0,filename=/dev/urandom -device virtio-rng-pci,rng=rng0 -device virtio-balloon-pci,id=balloon0,bus=pcie.0,addr=0x4"
|
||||
ARGS="-m ${RAM_SIZE} -machine type=q35${KVM_ACC_OPTS} ${EXTRA_OPTS} ${KVM_MON_OPTS} ${KVM_SERIAL_OPTS} ${KVM_NET_OPTS} ${KVM_DISK_OPTS}"
|
||||
|
||||
eval "qemu-system-x86_64 ${ARGS}" &
|
||||
|
||||
|
@ -31,7 +31,7 @@ GUEST_SERIAL=$(cat "${FILE}")
|
||||
|
||||
KVM_SERIAL_OPTS="\
|
||||
-serial mon:stdio \
|
||||
-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x3 \
|
||||
-device virtio-serial-pci,id=virtio-serial0,bus=pcie.0,addr=0x3 \
|
||||
-chardev pty,id=charserial0 \
|
||||
-device isa-serial,chardev=charserial0,id=serial0 \
|
||||
-chardev socket,id=charchannel0,host=127.0.0.1,port=12345,reconnect=10 \
|
||||
|
Loading…
Reference in New Issue
Block a user