Generate cloud init disk image
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-06-07 10:32:39 +02:00
parent b3f56cea81
commit f1339f0711
5 changed files with 111 additions and 1 deletions

View File

@ -82,6 +82,14 @@ export interface VMNetBridge {
bridge: string;
}
export interface VMCloudInit {
attach_config: boolean;
user_data: string;
instance_id?: string;
local_hostname?: string;
network_configuration?: string;
}
export type VMBootType = "UEFI" | "UEFISecureBoot" | "Legacy";
interface VMInfoInterface {
@ -101,6 +109,7 @@ interface VMInfoInterface {
networks: VMNetInterface[];
tpm_module: boolean;
oem_strings: string[];
cloud_init: VMCloudInit;
}
export class VMInfo implements VMInfoInterface {
@ -120,6 +129,7 @@ export class VMInfo implements VMInfoInterface {
networks: VMNetInterface[];
tpm_module: boolean;
oem_strings: string[];
cloud_init: VMCloudInit;
constructor(int: VMInfoInterface) {
this.name = int.name;
@ -138,6 +148,7 @@ export class VMInfo implements VMInfoInterface {
this.networks = int.networks;
this.tpm_module = int.tpm_module;
this.oem_strings = int.oem_strings;
this.cloud_init = int.cloud_init;
}
static NewEmpty(): VMInfo {
@ -153,6 +164,7 @@ export class VMInfo implements VMInfoInterface {
networks: [],
tpm_module: true,
oem_strings: [],
cloud_init: { attach_config: false, user_data: "" },
});
}