Skip to content

Commit 3992761

Browse files
feat: add boot time optimizations for faster VM startup
1 parent 1effa28 commit 3992761

3 files changed

Lines changed: 16 additions & 5 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 36
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-5556e348a70b8472aa8e319b6618891b4eb6ab7b7e063ecc2d63f9eaf7d4f059.yml
3-
openapi_spec_hash: 62fd2bec46b7a8747363a37ea35ce6db
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-4f6187089a62f5df123ef4ee17660dd737c2b486377af2b5c5a922d454067b41.yml
3+
openapi_spec_hash: 53e42659f7453f1abfda3236c3f7cb31
44
config_hash: 14135b7c88169a15762c8defb0bdfd16

instance.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,15 @@ type InstanceNewParams struct {
453453
OverlaySize param.Opt[string] `json:"overlay_size,omitzero"`
454454
// Base memory size (human-readable format like "1GB", "512MB", "2G")
455455
Size param.Opt[string] `json:"size,omitzero"`
456+
// Skip guest-agent installation during boot. When true, the exec and stat APIs
457+
// will not work for this instance. The instance will still run, but remote command
458+
// execution will be unavailable.
459+
SkipGuestAgent param.Opt[bool] `json:"skip_guest_agent,omitzero"`
460+
// Skip kernel headers installation during boot for faster startup. When true, DKMS
461+
// (Dynamic Kernel Module Support) will not work, preventing compilation of
462+
// out-of-tree kernel modules (e.g., NVIDIA vGPU drivers). Recommended for
463+
// workloads that don't need kernel module compilation.
464+
SkipKernelHeaders param.Opt[bool] `json:"skip_kernel_headers,omitzero"`
456465
// Number of virtual CPUs
457466
Vcpus param.Opt[int64] `json:"vcpus,omitzero"`
458467
// Device IDs or names to attach for GPU/PCI passthrough

instance_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ func TestInstanceNewWithOptionalParams(t *testing.T) {
4545
BandwidthUpload: hypeman.String("1Gbps"),
4646
Enabled: hypeman.Bool(true),
4747
},
48-
OverlaySize: hypeman.String("20GB"),
49-
Size: hypeman.String("2GB"),
50-
Vcpus: hypeman.Int(2),
48+
OverlaySize: hypeman.String("20GB"),
49+
Size: hypeman.String("2GB"),
50+
SkipGuestAgent: hypeman.Bool(false),
51+
SkipKernelHeaders: hypeman.Bool(true),
52+
Vcpus: hypeman.Int(2),
5153
Volumes: []hypeman.VolumeMountParam{{
5254
MountPath: "/mnt/data",
5355
VolumeID: "vol-abc123",

0 commit comments

Comments
 (0)