You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Update devcontainer.json schema with "hostRequirements" #5144
bugIssue identified by VS Code Team member as probable bugcandidateIssue identified as probable candidate for fixing in the next releasecontainersIssue in vscode-remote containersverifiedVerification succeeded
"hostRequirements": {
"cpus": 8,
"memory": "16gb", // otherwise is bytes - allows for other units like mb, or k"storage": "32gb"// otherwise is bytes - allows for other units like tb, or mb, or k
}
Christof Marti (@chrmarti) I'm wondering how to verify this issue?
I added the following to my devcontainer.json, and rebuilt and reopened the workspace in a container, and the container opened as usual:
Raymond Zhao (@rzhao271) I should have mentioned: This is only implemented in Codespaces right now.
To verify make sure you get proposals for the new properties, their format (number or number with unit) is validated and there are no errors/warnings when using valid values.
Christof Marti (@chrmarti) I adjusted the values in Codespaces Web and rebuilt the container.
The values pass validation, but I'm not sure whether Codespaces handled the values properly.
At the moment the only place where these get used is in surfacing the list of available machine types for a new/existing codespace— for example here's the UI in GH to create one for github/github:
and related hostRequirements:
"hostRequirements": { // Require specs of the extremeLinux machine type for codespaces
"storage": "64gb",
"memory": "64gb"
},
When creating from within VS Code it'll filter the list down to eligible choices but won't display these grayed-out ones.
There isn't really a fallback in either case, we'll just display warning messages— but in GH the modal context should help explain. In the VS Code case, I believe the extension would give the following error:
"There are currently no machine types available for which you have access. Please check the repository's devcontainer configuration or contact support."
If desired, we could update the GH API to give a more specific message in the case where the user would have access to one ore more machine types, but they're all excluded by devcontainer requirements.
bugIssue identified by VS Code Team member as probable bugcandidateIssue identified as probable candidate for fixing in the next releasecontainersIssue in vscode-remote containersverifiedVerification succeeded
Activity
Add "hostRequirements" to schema (microsoft/vscode-remote-release#5144)
Add "hostRequirements" to schema (microsoft/vscode-remote-release#5144)
Add "hostRequirements" to schema (microsoft/vscode-remote-release#5144)
rzhao271 commentedon Jun 7, 2021
Christof Marti (@chrmarti) I'm wondering how to verify this issue?
I added the following to my
devcontainer.json, and rebuilt and reopened the workspace in a container, and the container opened as usual:chrmarti commentedon Jun 8, 2021
Raymond Zhao (@rzhao271) I should have mentioned: This is only implemented in Codespaces right now.
To verify make sure you get proposals for the new properties, their format (number or number with unit) is validated and there are no errors/warnings when using valid values.
rzhao271 commentedon Jun 8, 2021
Christof Marti (@chrmarti) I adjusted the values in Codespaces Web and rebuilt the container.
The values pass validation, but I'm not sure whether Codespaces handled the values properly.
chrmarti commentedon Jun 9, 2021
I'm not sure what the fallback is when the requirements can't be met. /fyi Jake Shorty (@jshorty) see screenshot above.
jshorty commentedon Jun 9, 2021
At the moment the only place where these get used is in surfacing the list of available machine types for a new/existing codespace— for example here's the UI in GH to create one for

github/github:and related
hostRequirements:When creating from within VS Code it'll filter the list down to eligible choices but won't display these grayed-out ones.
There isn't really a fallback in either case, we'll just display warning messages— but in GH the modal context should help explain. In the VS Code case, I believe the extension would give the following error:
rzhao271 commentedon Jun 9, 2021
Christof Marti (@chrmarti) I'll let you create a new issue for #5144 (comment) as you see fit.
Marking this issue as verified.
jshorty commentedon Jun 9, 2021
If desired, we could update the GH API to give a more specific message in the case where the user would have access to one ore more machine types, but they're all excluded by devcontainer requirements.
Squashed 'lib/vscode/' changes from 2064d4c301c..b4c1bd0a9b0