[
https://issues.apache.org/jira/browse/JCLOUDS-1359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16260568#comment-16260568
]
Ignasi Barrera commented on JCLOUDS-1359:
-----------------------------------------
It really depends on the hardware profile that jclouds is selecting. Let me
show you a bit of code so you can better understand how it works.
This is the code for Azure ARM that transforms an azure `VMHardware` in a
hardware profile jclouds understands. The {{size}} of the {{volumes}} you see
there is what the {{TemplateBuilder}} will check against the configured
{{minDisk}} to select or discard the hardware profile. As you can see, the disk
size information that comes from Azure can be null, resulting in hardware
profiles without disk information. In those cases jclouds cannot make a
decision based on the minDisk attribute and does not discard them.
https://github.com/jclouds/jclouds-labs/blob/master/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/functions/VMHardwareToHardware.java#L62-L73
The same applies for GCE and all other providers. This is the code in GCE that
transforms the MachineType in the hardware profile jclouds understands. The
minDisk will affect the volumes defined there, and that depends on the "scratch
disks" the machine type configures.
https://github.com/jclouds/jclouds/blob/master/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/functions/MachineTypeToHardware.java#L72-L82
This said, the VMs created by jclouds usually only include the boot disk that
is defined in the selected image and hardware profile. If you need more control
on the disks that are created, the jclouds portable abstraction may no offer
methods for that and you'll probably need to create the VM, or modify it after
creation, using the provider specific API.
Some providers, such as Azure ARM, allow you to configure additional disks in
[their template
options|https://github.com/jclouds/jclouds-labs/blob/master/azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/options/AzureTemplateOptions.java#L73-L82].
Not every provider support configuring additional disks, so we put that in the
provider-specific template options and not directly in the portable classes.
The same approach could be implemented for any provider that supports
additional disks.
> minDisk has no effect
> ---------------------
>
> Key: JCLOUDS-1359
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1359
> Project: jclouds
> Issue Type: Bug
> Reporter: Duncan Godwin
>
> It appears that {{minDisk}} has no effect when provisioning a machine. I
> expected it to produce a VM with the specified disk size on some clouds. I
> tested on AWS, GCE and Azure.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)