Hello!
I am playing around with the Data Grid in the New Custom forms Designer - more precisely with the "disks" Grid. What I found so far:
Schema fields [[is_clone, initial_location, volumeId, id, label, custom_properties, userCreated, storage_reservation_policy, capacity]] should match the default value fields [[is_clone, initial_location, volumeId, id, label, userCreated, storage_reservation_policy, capacity]].
Cause: there is no "custom_properties" Field in the Grid Layout
Solution: Look at the "Default" Value and remove the "custom_properties," from the Header and the "," bevor the capacity - in my case before the "80":
is_clone,initial_location,volumeId,id,label,custom_properties,userCreated,storage_reservation_policy,capacity
true,,0,1525072814859,Hard disk 1,,false,,80
is_clone,initial_location,volumeId,id,label,custom_properties,userCreated,storage_reservation_policy,capacity
true,,0,1525072814859,Hard disk 1,,false,80
Cause: If you add more disks to the Grid the Value of "Storage (GB)" will not be incremented
Solution: Well... its more a workaround since I have not found a way to pass the Values of a Data Grid to an vRO Action. I created a vRO Action which fills the "disks" Grid based on Values in the Custom Form (the size of the template base disks are Hardcoded):
Cause: Bug?
Workaround: I changed the Return Type to "Array/String" and the Action was found in vRA. After I changed the Values Binding in the Custom Form, Saved the Blueprint and corrected the Return Type of the Action to Array/Properties.
Hi!
Could you explain a bit more on how to configure a user friendly disk grid?
The first part, actually. I don't mind right now about not filling the capacity. What I'm trying to do is give the user the ability to add a disk on any drive letter or mount point exactly like the normal form. But in this custom form, the Disks data grid asks for more information that the user doesn't know, and is confusing even if it is not required.
I'd like to have a custom form with a disk grid that only requires te size, the label and the mountpoint / drive letter.
How did you achieve that?
Thanks in advance.
Hello!
My first idea was to use a "basic" DataGrid and use the values to build the Disk DataGrid but i never found out how to build this. So my solution was this custom form:
And with the attached Action with this input fields:
You can add "in_diskX_label" and "in_diskX_location" to the Input paramters and change the code from:
// snip
for (i = 1; i <= in_disk_count; i++) {
var disk_size = "in_disk" + i + "_size"
try {
disks.push({"is_clone":false,
"initial_location":null,
"volumeId":disk_number,
"id":null,
"label":null,
"userCreated":true,
"storage_reservation_policy":StorageReservation,
"capacity":eval(disk_size)})
disk_number++
} catch(err) {
break
}
}
//snip
to:
//snip
for (i = 1; i <= in_disk_count; i++) {
var disk_size = "in_disk" + i + "_size"
var disk_label = "in_disk" + i + "_label"
var disk_location = "in_disk" + i + "_location"
try {
disks.push({"is_clone":false,
"initial_location":eval(disk_location),
"volumeId":disk_number,
"id":null,
"label":eval(disk_label),
"userCreated":true,
"storage_reservation_policy":StorageReservation,
"capacity":eval(disk_size)})
disk_number++
} catch(err) {
break
}
}
//snip
In the custom form add two fields per Disk and link them to the "in_diskX_label" and "in_diskX_location" fields of the Action.
For the visibility in the custom form i use a conditional value based on the "Additional Harddisks":
I know: not the best solution but it works for our Environment I really hope that in future vRA releases custom forms will be more "dynamical"...
Robert
Did you find a way to remove/change columns? I just want to hide from my user unnecessary info like "id/storage_reservation" etc - leave just "size" here.
I think there is no way to remove columns of the disk data grid. I put the grid in a new tab and set the visibility of the tab to "No" so the users never see it.
Yep, i figured out that this grid based on disk literalMap object with already hardcoded structure... My problem - to give users the same easy way to add more disks in the request form as they do today in the old form - they just click "+" and specify disks's size, vRA takes care of id/reservation for them. In custom form you have to specify all this information - it is risky and confuses users.
VMware - do you really test things BEFORE release? Are you listening customers at all? How could it be that "Disk" form is broken from the beginning???
Unhappyvra,
It looks like, although ugly, the "Disk" form works like the old form. I've requested different blueprints to test:
Only specify "size". Added 2 disks. Both show up, and they work fine. Also if you have Guest Agent they get formatted and a labeled according to the auto assigned letter.
Only specify "size" "label" and "id": Works like before but label and drive letter are assigned by the user.
Just don't touch the other columns, and thats fine. It's fugly, but it works.... (like the old form :smileysilly:)
Robert,
Thanks a lot! I've got to get my head around this. I'm a newbie on vRA and I'm making a lot of effort to have a production ready environment to show here where I work.
This disk form issue is mostly cosmetic, but I can't quite follow everything you said
Well, the case here - to give end-users exact the same experiences as they had with standard form. From end-user perspective, in a previous form they just put disk size, in a new one - size and ID and Label and reservation - much more info then before --> they will complain about it. I don't like when people complain, do you, VMware?
One working solution is to export the form & removing the unnecessary colums (including the default values) in the JSON/YAML file, then importing the changed file.
Yes - the Return Type Bug regarding the default value external source (vRO) chooser is really nasty and shows clearly that this functionality was never testet!
Much luck!
Sascha,
I've tried that but I can't get it to work.
I've removed all the columns but mountpoint, label and size. Also deleted the default values for the disk 0 (it's a cloned machine workflow). If I deploy a VM without adding any disks, it works fine. The Disk 0 (the cloned one) is generated as it should, getting the configuration from the blueprint.
If I add a new disk, that disk overwrites the configuration of the disk 0, and it fails. To solve this I added another column with the ID field to select and ID other than 0. That also creates issues... the disk 0 gets modified nonetheless (the storage reservation policy gets deleted), and the configuration of the new disk does not work (size is equal to the cloned disk, mountpoint is empty).
What am I missing?
This is how our Data Disk Grid looks with five additional HDD:
As far as i remember from testing the "Is Clone", "User Created", "Volume ID" and "Capacity" are mandatory.
Is Clone -> Existing Disk(s) in Template
User Created -> New Disk(s)
Capacity -> Size in GiB
Volume ID -> SCSI Order
Yep, it looks similar to the original Disk Grid. I didn't want the user to change de SCSI ID, or the "Is Clone" or "User Created" values...
It's confusing for the end user. I wanted to only show the size, label and mountpoint...
Anyway, I guess I'll just use the standard grid and add some informational texts.
Our Users do not see the DataGrid at all. I placed it in a new Tab and hide the Tab from the Users. The Grid Values are generated from a vRO Action based on Custom Form Fields and Custom Properties.
Hi Robert,
thanks for the workaround, I have follow up questions,
1. what value did enter for in_StorageReservation_Type/SubType & Tier input field? PFA screenshot of the storage disk.
to my compute resources I haven't assigned storage policies
2. What will be the value for the in_template_disks?
Thanks for your feedback.
Hello!
The in_DC and in_StorageReservation_* Values are only used for the Storage Reservation Policy. I changed the Code a bit - now you only need the "in_template_disks" and the "in_diskX_size" parameters.
The "in_template_disks" Values depends on your base Template. If the Template has one Disk with 80 GB you set the Value to "80". If your Template has multiple Disks (for example four Disks with 80, 20, 10 and 30 GB) set the value to "80|20|10|30" - the "|" is the delimiter.
Robert
I have implemented the steps as mentioned, but I don't see the grid getting populated. Any suggestions? I have the action returning an array of strings.
Hello!
The Return Type must be Array/Properties.
Robert
Hi Robert,
I've been trying to follow your steps but I'm running into a issue where my ~storage field is read only, I don't have the option to set it to a computed value. Did you have to change any thing to allow you to modify that field? The one difference is I'm using vRA 7.5 and not 7.4, maybe they locked it down in 7.5. Thanks.
I just checked this in our 7.5 test environment and there is no "Value" and "Constrains" Tab anymore. Maybe the ~storage field is now updated out of the box?
I have the values tab but I can see the disk I added in my blueprint are nw added to the CSV as well.