VMware Cloud Community
aamodei01
Enthusiast
Enthusiast
Jump to solution

Disable 'Snapshot the memory of the machine'

Hello and thanks to everyone in advance!

Does anyone know how I could disable the 'Snapshot the memory of the machine' option when a vRA user goes to take a snap?

Tags (1)
1 Solution

Accepted Solutions
aamodei01
Enthusiast
Enthusiast
Jump to solution

Nevermind - I "figured" it out..

For those of you looking for this and similar type items - the key is the ASPX pages on your IaaS boxes...

Go to your IaaS install dir (<InstallDIR>\vCAC\Server\Website\Leases

You will find the ASPX pages for all the generated pages. Best I can tell (and I have no idea if this is supported...) These are the live generated pages for requests, reconfigs, etc. etc

The CreateSnapShot.Aspx (Backup the ORG one!) has the controls for the snapshot request form. I added the following to the MemoryDumpRow Section to disable the checkbox control (as we don't want to allow our users to take Memory Snaps:

<tr id="MemoryDumpRow" runat="server">

                <td class="Label">

                </td>

                <td class="Field">

                    <asp:Checkbox ID="chkMemoryDump" Text="<%$Resources:Labels,SnapshotMemoryCheckbox%>" runat="server" CausesValidation="False" Enabled="false"/>

                </td>

            </tr>

The ConfirmNewRequest.Aspx (Backup the ORG one!) has all the goodies for the Request Form.

This has some cool options to screw around with, one good one I found was for the Memory Field. Since this tool, in it's infinite wisdom does memory adjustments in MB instead of GB (would be nice to have an option to change this, but I can see logic both ways, I suppose), we wanted to prevent some users from selecting incorrect un-1024'd memory sizes which would in turn generate some support tickets. So looking around for a way to change a label, i stumbed onto a value labeled "SnapToMultiple" (show below) - I noticed this value was set to 4, then immediately noticed this was tied to the up/down arrows on the memory selection field in the request. So, i figured, why not? I set it to 1024 (bold below) and now the user can't NOT select a gig at a time. This also works if the user wants to key in manually a number, it will force the memory selection to the closest multiple of 1024 for them as soon as they change to another field or click submit! BOOM!


Section show below

<tr id="trMemory" runat="server" visible="false">

                                <td class="Label">

                                    <vmps:Literal ID="MemoryLabel" runat="server" IsLabel="true" Text="<%$Resources:Labels,MemoryInMB%>" />

                                </td>

                                <td class="Field" width="100%">

                                    <div class="InlineBlockFieldNoValidate">

                                        <vmps:Spinner ID="txtMemory" runat="server" AllowNull="false" SnapToMultiple="1024" NumberType="Integer" AutoPostBack="True" OnNumberChanged="ResourceValueChanged" />

                                    </div>

                                    <div class="Description">

                                        <vmps:Literal runat="server" ID="lblMemoryHelpText" Text="<%$Resources:HelpText,SpecifyValueWithinRange%>" />

                                    </div>

                                </td>

                            </tr>

If you make this change, don't forget to change the same value in the EditVirtualMachine.aspx for VM reconfigures!

Enjoy!

View solution in original post

1 Reply
aamodei01
Enthusiast
Enthusiast
Jump to solution

Nevermind - I "figured" it out..

For those of you looking for this and similar type items - the key is the ASPX pages on your IaaS boxes...

Go to your IaaS install dir (<InstallDIR>\vCAC\Server\Website\Leases

You will find the ASPX pages for all the generated pages. Best I can tell (and I have no idea if this is supported...) These are the live generated pages for requests, reconfigs, etc. etc

The CreateSnapShot.Aspx (Backup the ORG one!) has the controls for the snapshot request form. I added the following to the MemoryDumpRow Section to disable the checkbox control (as we don't want to allow our users to take Memory Snaps:

<tr id="MemoryDumpRow" runat="server">

                <td class="Label">

                </td>

                <td class="Field">

                    <asp:Checkbox ID="chkMemoryDump" Text="<%$Resources:Labels,SnapshotMemoryCheckbox%>" runat="server" CausesValidation="False" Enabled="false"/>

                </td>

            </tr>

The ConfirmNewRequest.Aspx (Backup the ORG one!) has all the goodies for the Request Form.

This has some cool options to screw around with, one good one I found was for the Memory Field. Since this tool, in it's infinite wisdom does memory adjustments in MB instead of GB (would be nice to have an option to change this, but I can see logic both ways, I suppose), we wanted to prevent some users from selecting incorrect un-1024'd memory sizes which would in turn generate some support tickets. So looking around for a way to change a label, i stumbed onto a value labeled "SnapToMultiple" (show below) - I noticed this value was set to 4, then immediately noticed this was tied to the up/down arrows on the memory selection field in the request. So, i figured, why not? I set it to 1024 (bold below) and now the user can't NOT select a gig at a time. This also works if the user wants to key in manually a number, it will force the memory selection to the closest multiple of 1024 for them as soon as they change to another field or click submit! BOOM!


Section show below

<tr id="trMemory" runat="server" visible="false">

                                <td class="Label">

                                    <vmps:Literal ID="MemoryLabel" runat="server" IsLabel="true" Text="<%$Resources:Labels,MemoryInMB%>" />

                                </td>

                                <td class="Field" width="100%">

                                    <div class="InlineBlockFieldNoValidate">

                                        <vmps:Spinner ID="txtMemory" runat="server" AllowNull="false" SnapToMultiple="1024" NumberType="Integer" AutoPostBack="True" OnNumberChanged="ResourceValueChanged" />

                                    </div>

                                    <div class="Description">

                                        <vmps:Literal runat="server" ID="lblMemoryHelpText" Text="<%$Resources:HelpText,SpecifyValueWithinRange%>" />

                                    </div>

                                </td>

                            </tr>

If you make this change, don't forget to change the same value in the EditVirtualMachine.aspx for VM reconfigures!

Enjoy!