@@ -41,6 +41,7 @@ VALID_IMG_TYPES=(
41
41
vmware_ova
42
42
vmware_raw
43
43
xen
44
+ ionoscloud
44
45
)
45
46
46
47
# list of oem package names, minus the oem- prefix
@@ -66,6 +67,7 @@ VALID_OEM_PACKAGES=(
66
67
vagrant-virtualbox
67
68
virtualbox
68
69
vmware
70
+ ionoscloud
69
71
)
70
72
71
73
# Set at runtime to one of the above types
@@ -332,6 +334,15 @@ IMG_akamai_OEM_PACKAGE=common-oem-files
332
334
IMG_akamai_OEM_USE=akamai
333
335
IMG_akamai_OEM_SYSEXT=oem-akamai
334
336
337
+ # # ionoscloud
338
+ IMG_ionoscloud_OEM_USE=ionoscloud
339
+ IMG_ionoscloud_OEM_SYSEXT=oem-ionoscloud
340
+ IMG_ionoscloud_OEM_PACKAGE=common-oem-files
341
+ IMG_ionoscloud_DISK_LAYOUT=vm
342
+ IMG_ionoscloud_DISK_FORMAT=qcow2
343
+ IMG_ionoscloud_DISK_EXTENSION=qcow2
344
+ IMG_ionoscloud_FS_HOOK=ionoscloud
345
+
335
346
# ##########################################################
336
347
337
348
# Print the default vm type for the specified board
@@ -610,6 +621,16 @@ _run_box_fs_hook() {
610
621
sudo rm -fr " ${VM_TMP_ROOT} /oem/box"
611
622
}
612
623
624
+ _run_ionoscloud_fs_hook () {
625
+ # Prep root parition for IONOS Cloud legacy injection
626
+ # This is a workaround until the IONOS Cloud introduces a metadata server
627
+ sudo mount -o remount,rw " ${VM_TMP_ROOT} "
628
+ sudo mkdir -p " ${VM_TMP_ROOT} /var/lib/cloud/seed/nocloud"
629
+ sudo mkdir -p " ${VM_TMP_ROOT} /etc/cloud"
630
+ sudo touch " ${VM_TMP_ROOT} /etc/cloud/cloud.cfg"
631
+ sudo mount -o remount,ro " ${VM_TMP_ROOT} "
632
+ }
633
+
613
634
# Write the vm disk image to the target directory in the proper format
614
635
write_vm_disk () {
615
636
if [[ $( _get_vm_opt PARTITIONED_IMG) -eq 1 ]]; then
0 commit comments