File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ compress_disk_images() {
89
89
# We want to compress images, but we also want to remove the uncompressed files
90
90
# from the list of uploadable files.
91
91
for filename in " ${local_files_to_evaluate[@]} " ; do
92
- if [[ " ${filename} " =~ \. (img| bin| vdi| vhd| vmdk)$ ]]; then
92
+ if [[ " ${filename} " =~ \. (img| bin| vdi| vhd| vhdx | vmdk)$ ]]; then
93
93
# Parse the formats as an array. This will yield an extra empty
94
94
# array element at the end.
95
95
readarray -td, FORMATS<<< " ${FLAGS_image_compression_formats},"
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ VALID_IMG_TYPES=(
16
16
exoscale
17
17
gce
18
18
hyperv
19
+ hyperv_vhdx
19
20
iso
20
21
openstack
21
22
openstack_mini
@@ -297,6 +298,11 @@ IMG_azure_OEM_SYSEXT=oem-azure
297
298
IMG_hyperv_DISK_FORMAT=vhd
298
299
IMG_hyperv_OEM_PACKAGE=oem-hyperv
299
300
301
+ # # hyper-v vhdx
302
+ IMG_hyperv_vhdx_DISK_FORMAT=vhdx
303
+ IMG_hyperv_vhdx_OEM_PACKAGE=oem-hyperv
304
+
305
+
300
306
# # cloudsigma
301
307
IMG_cloudsigma_DISK_FORMAT=qcow2
302
308
IMG_cloudsigma_OEM_PACKAGE=oem-cloudsigma
@@ -431,7 +437,9 @@ _disk_ext() {
431
437
vmdk_scsi) echo vmdk;;
432
438
vmdk_stream) echo vmdk;;
433
439
hdd) echo hdd;;
434
- vhd* ) echo vhd;;
440
+ vhd) echo vhd;;
441
+ vhd_fixed) echo vhd;;
442
+ vhdx) echo vhdx;;
435
443
* ) echo " ${disk_format} " ;;
436
444
esac
437
445
}
@@ -620,6 +628,11 @@ _write_vhd_fixed_disk() {
620
628
assert_image_size " $2 " vpc
621
629
}
622
630
631
+ _write_vhdx_disk () {
632
+ qemu-img convert -f raw " $1 " -O vhdx -o subformat=dynamic " $2 "
633
+ assert_image_size " $2 " vhdx
634
+ }
635
+
623
636
_write_vmdk_ide_disk () {
624
637
qemu-img convert -f raw " $1 " -O vmdk -o adapter_type=ide " $2 "
625
638
assert_image_size " $2 " vmdk
Original file line number Diff line number Diff line change
1
+ - Added Hyper-V VHDX image ([ flatcar/scripts #1791 ] ( https://github.com/flatcar/scripts/pull/1791 ) )
You can’t perform that action at this time.
0 commit comments