You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.
I am considering using Azure Image Builder to build images that can be used both in Azure and on-premise. However the generated VHD physical size is large, as it is a fully expanded disk image. This means effectively downloading a large file (e.g. 127gb) from the internet which is mostly unused space.
It would be great if we could have an added property to the "VHD" distribute type that runs the "Compact" operation if set to true, so that the generated VHD is significantly smaller for download.
So for example the VHD distribute section of the AIB ARM template might look like:
The Powershell commands required to compact a VHD are:
Mount-VHD .\aibImage.vhd -ReadOnly
Optimize-VHD .\aibImage.vhd -Mode Pretrimmed
Dismount-VHD .\aibImage.vhd
# Pretrimmed: Utilizes information from the trim/unmap commands to detect unused blocks.# Does not look for empty blocks and does not query the contained file system for unused blocks.
This site contains a nice powershell function to do this.
Many thanks
Tim
The text was updated successfully, but these errors were encountered:
I am considering using Azure Image Builder to build images that can be used both in Azure and on-premise. However the generated VHD physical size is large, as it is a fully expanded disk image. This means effectively downloading a large file (e.g. 127gb) from the internet which is mostly unused space.
It would be great if we could have an added property to the "VHD" distribute type that runs the "Compact" operation if set to true, so that the generated VHD is significantly smaller for download.
So for example the VHD distribute section of the AIB ARM template might look like:
The Powershell commands required to compact a VHD are:
This site contains a nice powershell function to do this.
Many thanks
Tim
The text was updated successfully, but these errors were encountered: