Created
April 29, 2014 09:08
-
-
Save archerslaw/11394756 to your computer and use it in GitHub Desktop.
support Max AHCI disks with one guest and disable multifunction.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "/usr/libexec/qemu-kvm -M pc-i440fx-rhel7.0.0 -cpu Opteron_G2 -enable-kvm -vga none -m 4096 -smp 4,sockets=2,cores=2,threads=1 -usb -device usb-tablet,id=input0 -name sluo -uuid ec15da0a-e8a7-42f4-905a-78fed78fd8fd -rtc base=localtime,clock=host,driftfix=slew -drive file=/home/rhel7-qcow2,if=none,id=drive-ide0-0-0,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -net none -vnc :1 -balloon none -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -monitor stdio -serial unix:/tmp/ttyS0,server,nowait -qmp tcp:0:4444,server,nowait \\" >>ahci-multi-disks-cli.sh | |
i=0 | |
j=0 | |
while [ $i -lt 30 ] | |
do | |
echo "-device ahci,id=ahci$i,addr=0x$(printf "%02x" $((i+2))) \\" >>ahci-multi-disks-cli.sh | |
for n in 0 $(seq 5); | |
do | |
qemu-img create -f raw u$j 1G | |
echo "-drive file=/home/images/u$j,if=none,id=drive-sata-disk-0-$j,format=raw -device ide-drive,bus=ahci$i.$n,unit=0,drive=drive-sata-disk-0-$j,id=sata-disk-0-$j \\" >>ahci-multi-disks-cli.sh | |
j=$(($j+1)) | |
done | |
i=$(($i+1)) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment