RoMi1981 opened a new issue #3718: The specified VM already has the maximum number of data disks (6) attached. Please specify another VM. **When VM never runned** URL: https://github.com/apache/cloudstack/issues/3718 <!-- Verify first that your issue/request is not already reported on GitHub. Also test if the latest release and master branch are affected too. Always add information AFTER of these HTML comments, but no need to delete the comments. --> ##### ISSUE TYPE * Bug Report ##### COMPONENT NAME <!-- Categorize the issue, e.g. API, VR, VPN, UI, etc. --> [cloudstack/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java](https://github.com/apache/cloudstack/blob/master/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java) ~~~ Line 3020: maxDataVolumesSupported = 6; // 6 data disks by default ~~~ ##### CLOUDSTACK VERSION <!-- --> ~~~ up to latest versions 4.13 ~~~ ##### CONFIGURATION <!-- Information about the configuration if relevant, e.g. basic network, advanced networking, etc. N/A otherwise --> Our Setup: KVM HV with primary Ceph storage and secondary NFS storage. ##### OS / ENVIRONMENT <!-- Information about the environment if relevant, N/A otherwise --> N/A ##### SUMMARY <!-- Explain the problem/feature briefly --> We create a vm with the Ansible cs-instance module: ~~~ - name: Creating Virtual Machine local_action: module: cs_instance name: "{{ target_vm_name }}" template: "{{ image_template.id }}" hypervisor: "{{ cs_hypervisor }}" project: "{{ target_cs_project }}" zone: "{{ cs_zone }}" service_offering: "Custom" cpu: "{{ cpu_number }}" cpu_speed: 2000 memory: "{{ memory_size }}" networks: "{{ cs_networks }}" domain: "{{ target_cs_domain }}" state: stopped ~~~ The important thing is the **state: stopped**, the vm never ran at this point. Then we attach more than 6 volumes and get the error: **The specified VM already has the maximum number of data disks (6) attached. Please specify another VM.** ##### STEPS TO REPRODUCE <!-- For bugs, show exactly how to reproduce the problem, using a minimal test-case. Use Screenshots if accurate. For new features, show how the feature would be used. --> <!-- Paste example playbooks or commands between quotes below --> Create a stopped vm: ~~~ - name: Creating Virtual Machine local_action: module: cs_instance name: "{{ target_vm_name }}" template: "{{ image_template.id }}" hypervisor: "{{ cs_hypervisor }}" project: "{{ target_cs_project }}" zone: "{{ cs_zone }}" service_offering: "Custom" cpu: "{{ cpu_number }}" cpu_speed: 2000 memory: "{{ memory_size }}" networks: "{{ cs_networks }}" domain: "{{ target_cs_domain }}" state: stopped ~~~ Create Volumes: ~~~ - name: Create volume from snapshot script: files/cs_api.py -f "create_volume" -s "{{ item.id }}" -p "{{ target_cs_project }}" -d "{{ target_cs_domain }}" -m "{{ target_vm_name }}" -n "{{ target_vm_name }}_{{ item.volumename }}" with_items: '{{ snaplist | sort(attribute="name") }}' when: item.volumetype == "DATADISK" ~~~ But you can also create a stopped vm with ansible and then test to attach more than 6 volumes to it. ##### EXPECTED RESULTS <!-- What did you expect to happen when running the steps above? --> ~~~ We do like to have a Global Setting in Cloudstack wich is mapped against the Variable "maxDataVolumesSupported" with the default Value "6"; ~~~ ##### ACTUAL RESULTS <!-- What actually happened? --> ~~~ Actual you cannot change the value of 6 because it's hardcoded. ~~~ <!-- Paste verbatim command output between quotes below --> ##### Errormessage: ~~~ The specified VM already has the maximum number of data disks (6) attached. Please specify another VM. ~~~
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
