feat(vmware/import): use xva to load base disk

This commit is contained in:
Florent Beauchamp
2024-01-30 18:54:46 +01:00
committed by Julien Fontanet
parent 0f1dcda7db
commit 2d047c4fef
16 changed files with 582 additions and 53 deletions
+22
View File
@@ -0,0 +1,22 @@
export const DEFAULT_VBD = {
class: 'VBD',
snapshot: {
allowed_operations: [],
bootable: true, // @todo : fix it
current_operations: {},
currently_attached: false,
empty: false,
metrics: 'OpaqueRef:NULL',
mode: 'RW',
other_config: {},
qos_algorithm_params: {},
qos_algorithm_type: '',
qos_supported_algorithms: [],
runtime_properties: {},
status_code: 0,
status_detail: '',
storage_lock: false,
type: 'Disk',
unpluggable: false,
},
}
+29
View File
@@ -0,0 +1,29 @@
export const DEFAULT_VDI = {
class: 'VDI',
snapshot: {
allow_caching: false,
cbt_enabled: false,
descriptionLabel: 'description',
is_a_snapshot: false,
managed: true,
metrics: 'OpaqueRef:NULL',
missing: false,
name_label: 'name_label',
on_boot: 'persist',
other_config: {},
parent: 'OpaqueRef:NULL',
physical_utilisation: 1024 * 1024,
read_only: false,
sharable: false,
snapshot_of: 'OpaqueRef:NULL',
snapshots: [],
SR: 'OpaqueRef:NULL',
storage_lock: false,
tags: [],
type: 'user',
uuid: '',
vbds: [],
virtual_size: 0,
xenstore_data: {},
},
}
+26
View File
@@ -0,0 +1,26 @@
export const DEFAULT_VIF = {
class: 'VIF',
snapshot: {
allowed_operations: [],
currently_attached: false,
current_operations: {},
ipv4_addresses: [],
ipv4_allowed: [],
ipv4_configuration_mode: 'None',
ipv4_gateway: '',
ipv6_addresses: [],
ipv6_allowed: [],
ipv6_configuration_mode: 'None',
ipv6_gateway: '',
locking_mode: 'network_default',
MTU: 1500,
metrics: 'OpaqueRef:NULL',
other_config: {},
qos_algorithm_params: {},
qos_algorithm_type: '',
qos_supported_algorithms: [],
runtime_properties: {},
status_code: 0,
status_detail: '',
},
}
+106
View File
@@ -0,0 +1,106 @@
export const DEFAULT_VM = {
class: 'VM',
id: null,
snapshot: {
actions_after_crash: 'restart',
actions_after_reboot: 'restart',
actions_after_shutdown: 'destroy',
affinity: 'Ref:53',
allowed_operations: [],
// appliance:'OpaqueRef:NULL',
attached_PCIs: [],
blobs: {},
blocked_operations: {},
children: [],
consoles: [],
crash_dumps: [],
current_operations: {},
domain_type: 'hvm',
domarch: '',
domid: -1,
generation_id: '',
guest_metrics: 'Ref:53',
ha_always_run: false,
ha_restart_priority: '',
hardware_platform_version: 0,
has_vendor_device: false,
HVM_boot_params: {
firmware: 'bios',
order: 'dcn',
},
HVM_boot_policy: 'BIOS order',
HVM_shadow_multiplier: 1,
is_a_template: false,
is_control_domain: false,
is_default_template: false,
is_snapshot_from_vmpp: false,
is_vmss_snapshot: false,
last_booted_record: '',
memory_dynamic_max: 1,
memory_dynamic_min: 1,
memory_overhead: 11534336,
memory_static_max: 1,
memory_static_min: 1,
memory_target: 0,
metrics: 'OpaqueRef:NULL',
name_label: 'from xva',
NVRAM: {},
name_description: ' from xva',
order: 0,
other_config: {
base_template_name: 'Other install media',
// mac_seed,
'install-methods': 'cdrom',
},
parent: 'OpaqueRef:NULL',
PCI_bus: '',
platform: {
timeoffset: 1,
'device-model': 'qemu-upstream-compat',
secureboot: 'false',
hpet: 'true',
nx: 'true',
pae: 'true',
apic: 'true',
viridian: 'true',
acpi: 1,
},
power_state: 'halted',
// protection_policy:'OpaqueRef:NULL',
PV_args: '',
PV_bootloader_args: '',
PV_bootloader: '',
PV_kernel: '',
PV_legacy_args: '',
PV_ramdisk: '',
recommendations: '',
reference_label: 'other-install-media',
requires_reboot: false,
resident_on: 'Ref:53',
// scheduled_to_be_resident_on:'OpaqueRef:NULL',
shutdown_delay: 0,
// snapshot_schedule: 'OpaqueRef:NULL',
snapshot_info: {},
snapshot_metadata: '',
snapshot_of: 'OpaqueRef:NULL',
snapshot_time: new Date(0),
snapshots: [],
start_delay: 0,
// suspend_VDI:'OpaqueRef:NULL',
// suspend_SR:'OpaqueRef:NULL',
tags: [],
transportable_snapshot_id: '',
// uuid,
user_version: 1,
VBDs: [],
VCPUs_at_startup: 1,
VCPUs_max: 1,
VCPUs_params: {},
version: 0,
VGPUs: [],
VIFs: [],
VTPMs: [],
VUSBs: [],
xenstore_data: {},
},
}