Skip to content

Adding support for OS disk size specification on TRE config file.#2546

Merged
martintoreilly merged 4 commits into
alan-turing-institute:developfrom
cptanalatriste:2545-increase-osdisk-size
Feb 3, 2026
Merged

Adding support for OS disk size specification on TRE config file.#2546
martintoreilly merged 4 commits into
alan-turing-institute:developfrom
cptanalatriste:2545-increase-osdisk-size

Conversation

@cptanalatriste

@cptanalatriste cptanalatriste commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

✅ Checklist

  • You have given your pull request a meaningful title (e.g. Enable foobar integration rather than 515 foobar).
  • You are targeting the appropriate branch. If you're not certain which one this is, it should be develop.
  • Your branch is up-to-date with the target branch (it probably was when you started, but it may have changed since then).

🚦 Depends on

N/A

⤴️ Summary

As part of this PR:

  • Users are able to define the size of the OS Disk in the SRE config file. For example, defining a 64GB size OS disk is done with the following:
        storage_quota_gb:
            home: 100
            shared: 100
            data_disk: 0
            os_disk: 64
  • The default OS disk size for workspaces in now 64GB, since the default 30GB have proven to be insufficient.
  • We're disabling updating the size of the data disk, since at the moment it triggers the creation of a new VM/Disk, erasing the previously present data.

IMPORTANT!: It is not possible to update the OS Disk size using the DSH CLI, due to Pulumi limitations. Attempts of doing it will fail with the following error:

Pulumi error:  ~  azure-native:compute:VirtualMachine sre_workspaces_vm_workspace_01 **updating failed** [diff: ~storageProfile];    
error: Status=400 Code="Conflict" Message="Disk resizing is allowed only when creating a VM or when the VM is deallocated."                             

We expect users to manually update OS Disk size (using the Portal or Azure CLI), and normalise Pulumi state later.

🌂 Related issues

Closes: #2545

🔬 Tests

The workspaces are created with the right disk size:

image

cptanalatriste and others added 2 commits January 30, 2026 16:18
@github-actions

github-actions Bot commented Jan 30, 2026

Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  data_safe_haven/config
  config_sections.py
  data_safe_haven/infrastructure/components/composite
  virtual_machine.py 39-40, 49-55, 187
  data_safe_haven/infrastructure/programs/sre
  workspaces.py 43, 97
Project Total  

This report was generated by python-coverage-comment-action

cptanalatriste and others added 2 commits January 30, 2026 16:43
@cptanalatriste
cptanalatriste marked this pull request as ready for review January 30, 2026 16:53
@cptanalatriste
cptanalatriste requested a review from a team as a code owner January 30, 2026 16:53

@martintoreilly martintoreilly left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes LGTM. Note that I was at the desk with Carlos while these changes were made so we applied the second pair of eyes at code change time.

@cptanalatriste Please could you re-run the end to end VM deployment using an OS disk size that is different to the 64GB default specified in the code, to validate that this does override the defaults and propagate the user-specified OS disk size to the deployed VM.

I added a couple of inline notes where the defaults are set asking if we can easily add unit tests that validate the defaults are overridden when a different value is provided as input.

If the end to end test shows the user-specified OS disk value propagating to the deployed VM, I'm happy to merge this PR. If its easy to incorporate unit tests baking this validation into the test suite, it would be great to see these added but I would not consider the lack of these a blocker to merging.

Comment thread data_safe_haven/config/config_sections.py
@cptanalatriste

Copy link
Copy Markdown
Contributor Author

Code changes LGTM. Note that I was at the desk with Carlos while these changes were made so we applied the second pair of eyes at code change time.

@cptanalatriste Please could you re-run the end to end VM deployment using an OS disk size that is different to the 64GB default specified in the code, to validate that this does override the defaults and propagate the user-specified OS disk size to the deployed VM.

I added a couple of inline notes where the defaults are set asking if we can easily add unit tests that validate the defaults are overridden when a different value is provided as input.

If the end to end test shows the user-specified OS disk value propagating to the deployed VM, I'm happy to merge this PR. If its easy to incorporate unit tests baking this validation into the test suite, it would be great to see these added but I would not consider the lack of these a blocker to merging.

Hi @martintoreilly , I did the requested end-to-end test. Given the new TRE configuration (see the first screenshot), we can see that the deployed OS disk has the size specified (see second screenshot).

image image

@martintoreilly martintoreilly left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@martintoreilly
martintoreilly merged commit a95fcb5 into alan-turing-institute:develop Feb 3, 2026
11 checks passed
@cptanalatriste cptanalatriste mentioned this pull request Feb 13, 2026
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The workspace's hard disk runs out of space

2 participants