mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 14:41:31 +02:00
Merge pull request #221 from flatcar-linux/jepio/azure-fixed-vhd
build_library: vm_image_util: create fixed-size VHDs for Azure
This commit is contained in:
commit
c9ddda260b
@ -283,12 +283,12 @@ IMG_exoscale_DISK_FORMAT=qcow2
|
|||||||
IMG_exoscale_OEM_PACKAGE=oem-exoscale
|
IMG_exoscale_OEM_PACKAGE=oem-exoscale
|
||||||
|
|
||||||
## azure
|
## azure
|
||||||
IMG_azure_DISK_FORMAT=vhd
|
IMG_azure_DISK_FORMAT=vhd_fixed
|
||||||
IMG_azure_DISK_LAYOUT=azure
|
IMG_azure_DISK_LAYOUT=azure
|
||||||
IMG_azure_OEM_PACKAGE=oem-azure
|
IMG_azure_OEM_PACKAGE=oem-azure
|
||||||
|
|
||||||
## azure pro
|
## azure pro
|
||||||
IMG_azure_pro_DISK_FORMAT=vhd
|
IMG_azure_pro_DISK_FORMAT=vhd_fixed
|
||||||
IMG_azure_pro_DISK_LAYOUT=azure
|
IMG_azure_pro_DISK_LAYOUT=azure
|
||||||
IMG_azure_pro_OEM_PACKAGE=oem-azure-pro
|
IMG_azure_pro_OEM_PACKAGE=oem-azure-pro
|
||||||
|
|
||||||
@ -429,6 +429,7 @@ _disk_ext() {
|
|||||||
vmdk_scsi) echo vmdk;;
|
vmdk_scsi) echo vmdk;;
|
||||||
vmdk_stream) echo vmdk;;
|
vmdk_stream) echo vmdk;;
|
||||||
hdd) echo hdd;;
|
hdd) echo hdd;;
|
||||||
|
vhd*) echo vhd;;
|
||||||
*) echo "${disk_format}";;
|
*) echo "${disk_format}";;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@ -579,6 +580,11 @@ _write_vhd_disk() {
|
|||||||
assert_image_size "$2" vpc
|
assert_image_size "$2" vpc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_write_vhd_fixed_disk() {
|
||||||
|
qemu-img convert -f raw "$1" -O vpc -o subformat=fixed,force_size "$2"
|
||||||
|
assert_image_size "$2" vpc
|
||||||
|
}
|
||||||
|
|
||||||
_write_vmdk_ide_disk() {
|
_write_vmdk_ide_disk() {
|
||||||
qemu-img convert -f raw "$1" -O vmdk -o adapter_type=ide "$2"
|
qemu-img convert -f raw "$1" -O vmdk -o adapter_type=ide "$2"
|
||||||
assert_image_size "$2" vmdk
|
assert_image_size "$2" vmdk
|
||||||
|
1
changelog/changes/2022-02-01-azure-fixed-vhd.md
Normal file
1
changelog/changes/2022-02-01-azure-fixed-vhd.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
- Azure VHD disks are now created using subformat=fixed, which makes them suitable for immediate upload to Azure using any tool.
|
Loading…
x
Reference in New Issue
Block a user