Created
          April 28, 2014 07:04 
        
      - 
      
- 
        Save archerslaw/11363801 to your computer and use it in GitHub Desktop. 
    hotplug 1024 scsi-hd disk to one virtio-scsi-pci controller.
  
        
  
    
      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
    
  
  
    
  | #...-monitor unix:/tmp/monitor2,server,nowait -device virtio-scsi-pci,id=bus1 | |
| i=0 | |
| j=0 | |
| while [ $i -lt 1024 ] | |
| do | |
| j=$((i%255)) | |
| sleep $((1+i/1000)) | |
| echo "drive_add localhost file=/home/disk/disk$i.qcow2,format=qcow2,media=disk,id=scsi$i,if=none" | nc -U /tmp/monitor2 | |
| echo "device_add scsi-hd,bus=bus1.0,drive=scsi$i,scsi-id=$j,id=hd$i" |nc -U /tmp/monitor2 | |
| i=$(($i+1)) | |
| done | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment