Skip to content

Commit c38a589

Browse files
committed
nexus: update InstanceCreate documentation
Updated the documentation for the `InstanceCreate` fields `disks` and `boot_disk` to better clarify what they are and the implications of configuring them. Closes #8089.
1 parent 2dfd0f1 commit c38a589

File tree

2 files changed

+23
-14
lines changed

2 files changed

+23
-14
lines changed

nexus/types/src/external_api/params.rs

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,23 +1172,32 @@ pub struct InstanceCreate {
11721172
#[serde(default)]
11731173
pub external_ips: Vec<ExternalIpCreate>,
11741174

1175-
/// The disks to be created or attached for this instance.
1175+
/// A list of disks to be attached to the instance.
1176+
///
1177+
/// Each disk can either be attached if it already exists or created along
1178+
/// with the instance.
1179+
///
1180+
/// The ordering of the disks does not guarantee the boot order for the
1181+
/// instance. Use the boot_disk attribute to configure the disk the instance
1182+
/// should boot from.
11761183
#[serde(default)]
11771184
pub disks: Vec<InstanceDiskAttachment>,
11781185

1179-
/// The disk this instance should boot into. This disk can either be
1180-
/// attached if it already exists, or created, if it should be a new disk.
1186+
/// The disk the instance is configured to boot from.
1187+
///
1188+
/// This disk can either be attached if it already exists or created along
1189+
/// with the instance.
11811190
///
1182-
/// It is strongly recommended to either provide a boot disk at instance
1183-
/// creation, or update the instance after creation to set a boot disk.
1191+
/// This attribute cannot be modified on a running instance so it is
1192+
/// recommended to configure this attribute during instance creation or when
1193+
/// it is acceptable to stop the instance for modification.
11841194
///
1185-
/// An instance without an explicit boot disk can be booted: the options are
1186-
/// as managed by UEFI, and as controlled by the guest OS, but with some
1187-
/// risk. If this instance later has a disk attached or detached, it is
1188-
/// possible that boot options can end up reordered, with the intended boot
1189-
/// disk moved after the EFI shell in boot priority. This may result in an
1190-
/// instance that only boots to the EFI shell until the desired disk is set
1191-
/// as an explicit boot disk and the instance rebooted.
1195+
/// An instance that does not have this attribute configured will use the
1196+
/// boot options specified in its UEFI settings, which are controlled by
1197+
/// both the instance's UEFI firmware and the guest operating system. Boot
1198+
/// options can change as disks are attached and detached to the instance,
1199+
/// which may result in an instance that only boots to the EFI shell until
1200+
/// this attribute is configured to use a desired boot disk.
11921201
#[serde(default)]
11931202
pub boot_disk: Option<InstanceDiskAttachment>,
11941203

openapi/nexus.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18765,7 +18765,7 @@
1876518765
},
1876618766
"boot_disk": {
1876718767
"nullable": true,
18768-
"description": "The disk this instance should boot into. This disk can either be attached if it already exists, or created, if it should be a new disk.\n\nIt is strongly recommended to either provide a boot disk at instance creation, or update the instance after creation to set a boot disk.\n\nAn instance without an explicit boot disk can be booted: the options are as managed by UEFI, and as controlled by the guest OS, but with some risk. If this instance later has a disk attached or detached, it is possible that boot options can end up reordered, with the intended boot disk moved after the EFI shell in boot priority. This may result in an instance that only boots to the EFI shell until the desired disk is set as an explicit boot disk and the instance rebooted.",
18768+
"description": "The disk the instance is configured to boot from.\n\nThis disk can either be attached if it already exists or created along with the instance.\n\nThis attribute cannot be modified on a running instance so it is recommended to configure this attribute during instance creation or when it is acceptable to stop the instance for modification.\n\nAn instance that does not have this attribute configured will use the boot options specified in its UEFI settings, which are controlled by both the instance's UEFI firmware and the guest operating system. Boot options can change as disks are attached and detached to the instance, which may result in an instance that only boots to the EFI shell until this attribute is configured to use a desired boot disk.",
1876918769
"default": null,
1877018770
"allOf": [
1877118771
{
@@ -18777,7 +18777,7 @@
1877718777
"type": "string"
1877818778
},
1877918779
"disks": {
18780-
"description": "The disks to be created or attached for this instance.",
18780+
"description": "A list of disks to be attached to the instance.\n\nEach disk can either be attached if it already exists or created along with the instance.\n\nThe ordering of the disks does not guarantee the boot order for the instance. Use the boot_disk attribute to configure the disk the instance should boot from.",
1878118781
"default": [],
1878218782
"type": "array",
1878318783
"items": {

0 commit comments

Comments
 (0)