Skip to content

Commit 3651697

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 3651697

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed

nexus/types/src/external_api/params.rs

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,23 +1172,30 @@ 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+
/// Disk attachments of type "create" will be created, while those of type
1178+
/// "attach" must already exist.
1179+
///
1180+
/// The order of this list does not guarantee a boot order for the
1181+
/// instance. Use the boot_disk attribute to specify a boot disk.
11761182
#[serde(default)]
11771183
pub disks: Vec<InstanceDiskAttachment>,
11781184

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.
1185+
/// The disk the instance is configured to boot from.
1186+
///
1187+
/// This disk can either be attached if it already exists or created along
1188+
/// with the instance.
11811189
///
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.
1190+
/// Specifying a boot disk is optional but recommended to ensure predictable
1191+
/// boot behavior. The boot disk can be set during instance creation or
1192+
/// later if the instance is stopped.
11841193
///
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.
1194+
/// An instance that does not have a boot disk set will use the boot
1195+
/// options specified in its UEFI settings, which are controlled by both the
1196+
/// instance's UEFI firmware and the guest operating system. Boot options
1197+
/// can change as disks are attached and detached, which may result in an
1198+
/// instance that only boots to the EFI shell until a boot disk is set.
11921199
#[serde(default)]
11931200
pub boot_disk: Option<InstanceDiskAttachment>,
11941201

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\nSpecifying a boot disk is optional but recommended to ensure predictable boot behavior. The boot disk can be set during instance creation or later if the instance is stopped.\n\nAn instance that does not have a boot disk set 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, which may result in an instance that only boots to the EFI shell until a boot disk is set.",
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\nDisk attachments of type \"create\" will be created, while those of type \"attach\" must already exist.\n\nThe order of this list does not guarantee a boot order for the instance. Use the boot_disk attribute to specify a boot disk.",
1878118781
"default": [],
1878218782
"type": "array",
1878318783
"items": {

0 commit comments

Comments
 (0)