diff --git a/cluster-provision/centos9/scripts/vm.sh b/cluster-provision/centos9/scripts/vm.sh index 48c2d096bb..08cf360495 100755 --- a/cluster-provision/centos9/scripts/vm.sh +++ b/cluster-provision/centos9/scripts/vm.sh @@ -141,6 +141,12 @@ for size in ${SCSI_DISK_SIZES[@]}; do let "disk_num+=1" done +echo "Creating 3 usb disk" +for i in {1..3}; do + diskPath="/usb"${i}".img" + qemu-img create -f raw $diskPath 20M +done + exec qemu-system-x86_64 -enable-kvm -drive format=qcow2,file=${next},if=virtio,cache=unsafe ${block_dev_arg} \ -device virtio-net-pci,netdev=network0,mac=52:55:00:d1:55:${n} \ -netdev tap,id=network0,ifname=tap${n},script=no,downscript=no \ @@ -151,5 +157,10 @@ exec qemu-system-x86_64 -enable-kvm -drive format=qcow2,file=${next},if=virtio,c -vnc :${n} -cpu host,migratable=no,+invtsc -m ${MEMORY} -smp ${CPU} \ -serial pty -M q35,accel=kvm,kernel_irqchip=split \ -device intel-iommu,intremap=on,caching-mode=on -device intel-hda -device hda-duplex -device AC97 \ + -device qemu-xhci,id=bus1 -device qemu-xhci,id=bus2 \ + -drive if=none,id=stick1,format=raw,file=/usb1.img -drive if=none,id=stick2,format=raw,file=/usb2.img \ + -drive if=none,id=stick3,format=raw,file=/usb3.img \ + -device usb-storage,bus=bus1.0,drive=stick1 -device usb-storage,bus=bus1.0,drive=stick2 \ + -device usb-storage,bus=bus2.0,drive=stick3 \ -uuid $(cat /proc/sys/kernel/random/uuid) \ ${QEMU_ARGS}