build: build proper VMDK formats for ESXI 6.5

VMWare ESXI 6.5 and above is not compatible with
subformat=monolithicSparse (The default qemu-img convert -O VMDK option).
Monolithic Sparse vmdk can be imported, but issues occur when running
sysupgrade with new images and other tasks that modify the file system
(issues like Kernel panics, reboot loops, sometimes crashing the Host ESXI
box).

This change creates an additional VMDK output file for ESXI that sets the
subformat to monlithicFlat, and the adapter_type to the SCSI lsilogic
controller.

This change existed back on:
25e36d379e

But it looks like the change was removed when refactoring occurred with:
5f6a2732f892b6229473576d89cc963ae9c97d5d

Signed-off-by: John Sommerville <jsommerville@untangle.com>
This commit is contained in:
John Sommerville 2019-09-27 14:09:10 -06:00 committed by Hauke Mehrtens
parent 9e2e48ff31
commit 6041eb9547

View File

@ -133,6 +133,12 @@ ifneq ($(CONFIG_VMDK_IMAGES),)
$(STAGING_DIR_HOST)/bin/qemu-img convert -f raw -O vmdk \ $(STAGING_DIR_HOST)/bin/qemu-img convert -f raw -O vmdk \
$(BIN_DIR)/$(IMG_COMBINED)-$(1).img \ $(BIN_DIR)/$(IMG_COMBINED)-$(1).img \
$(BIN_DIR)/$(IMG_COMBINED)-$(1).vmdk $(BIN_DIR)/$(IMG_COMBINED)-$(1).vmdk
#build the ESXI VMDK with
rm $(BIN_DIR)/$(IMG_COMBINED)-$(1)-esxi.vmdk || true
rm $(BIN_DIR)/$(IMG_COMBINED)-$(1)-esxi-flat.vmdk || true
$(STAGING_DIR_HOST)/bin/qemu-img convert -f raw -O vmdk -o adapter_type=lsilogic,subformat=monolithicFlat \
$(BIN_DIR)/$(IMG_COMBINED)-$(1).img \
$(BIN_DIR)/$(IMG_COMBINED)-$(1)-esxi.vmdk
endef endef
endif endif