From 526f27fd5e67ab64cccee797b8d980ca434a8ec8 Mon Sep 17 00:00:00 2001 From: Andy Fiddaman Date: Thu, 25 Mar 2021 16:54:36 +0000 Subject: [PATCH 1/3] Compress azure image --- build/azure | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/build/azure b/build/azure index ce95239..0a38c02 100755 --- a/build/azure +++ b/build/azure @@ -56,18 +56,20 @@ HVM_Image_Finalise 1 "/dev/dsk/c1d0s1" "/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:b" \ echo "Creating raw disk image" -rm -f $BUILDSEND_MP/azure-$VERSION.{raw,vhd} -dd if=$HVMlofi of=$BUILDSEND_MP/azure-$VERSION.raw bs=2048 +rm -f $BUILDSEND_MP/r$VERSION.azure.raw +dd if=$HVMlofi of=$BUILDSEND_MP/r$VERSION.azure.raw bs=2048 lofiadm -d $HVMlofi zfs destroy -r $HVMdataset conv=`mktemp` wget -O $conv https://mirrors.omnios.org/vhd/raw2vhd.py echo "Creating vhd disk image" -python2 $conv $BUILDSEND_MP/azure-$VERSION.{raw,vhd} +python2 $conv $BUILDSEND_MP/r$VERSION.azure.{raw,vhd} rm -f $conv -rm -f $BUILDSEND_MP/azure-$VERSION.raw -ls -lh $BUILDSEND_MP/azure-$VERSION.vhd +rm -f $BUILDSEND_MP/r$VERSION.azure.raw +ls -lh $BUILDSEND_MP/r$VERSION.azure.vhd +zstd -9fv --rm $BUILDSEND_MP/r$VERSION.azure.vhd +ls -lh $BUILDSEND_MP/r$VERSION.azure.vhd.zst # Vim hints # vim:ts=4:sw=4:et:fdm=marker From 8ca13aa831887caf05cc0c73a7cadf9432d3c56b Mon Sep 17 00:00:00 2001 From: Andy Fiddaman Date: Thu, 25 Mar 2021 16:54:46 +0000 Subject: [PATCH 2/3] Use zstd for bhyve image compression --- build/bhyve | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/build/bhyve b/build/bhyve index e210604..e1e189f 100755 --- a/build/bhyve +++ b/build/bhyve @@ -52,10 +52,8 @@ zfs snapshot $HVMdataset@final zfs send $HVMdataset@final | pv > $BUILDSEND_MP/r$VERSION.bhyve zfs destroy -r $HVMdataset -rm -f $BUILDSEND_MP/r$VERSION.bhyve.xz -xz -9v $BUILDSEND_MP/r$VERSION.bhyve - -ls -lh $BUILDSEND_MP/r$VERSION.bhyve.xz +zstd -9fv --rm $BUILDSEND_MP/r$VERSION.bhyve +ls -lh $BUILDSEND_MP/r$VERSION.bhyve.zst # Vim hints # vim:ts=4:sw=4:et:fdm=marker From 1ae475412a6fb2e7b363f6d24008dcc9f34f23c9 Mon Sep 17 00:00:00 2001 From: Andy Fiddaman Date: Thu, 25 Mar 2021 16:54:54 +0000 Subject: [PATCH 3/3] Build azure image by default --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9a021ad..e3b0e15 100644 --- a/Makefile +++ b/Makefile @@ -194,13 +194,17 @@ build-usb: ./build/build_usb $(BUILDSEND_MP)/$(VERSION).iso \ $(BUILDSEND_MP)/$(VERSION).usb-dd -build-bhyve: bins +build-bhyve: bins zfs @banner .BHYVE BUILDSEND_MP=$(BUILDSEND_MP) ./build/bhyve +build-azure: bins zfs + @banner .azure + BUILDSEND_MP=$(BUILDSEND_MP) ./build/azure + install-iso: check-mkisofs bins install-tftp install-web build-iso install-usb: install-iso build-usb -all: install-usb $(NGZ_ZFS_STREAM) build-bhyve +all: install-usb $(NGZ_ZFS_STREAM) build-bhyve build-azure # Used by omnios-build/kayak/ to create the kayak package