Using Composer under VM to complete the snapshot method of software production

Composer allows you to build installation packages of software, applications, preference files, or documentation that can be deployed to remote computers or as part of an image process. The first step in building a package is to create a package source. Depending on the software to be packaged, Composer allows you to monitor the installation of the software and create a package source using files that already exist on the drive. Once the package source is created, it can be built as a PKG or DMG installation package.

 

There are many ways you can create a package source: drag and drop from the Finder, use existing packages, use user environment settings, use pre-installed software, take snapshots, monitor the filesystem, and more.

 

If the files to be packaged are not already installed on the drive, Composer can take a snapshot of the file system once before and once after installing the files, and create a package source based on the changes made between the two snapshots. There are two types of snapshots:

– Normal snapshots — a snapshot will capture only all new files on the drive.

– New and modified snapshots — the snapshot will capture all new files on the drive as well as any files that have been modified.

 

Monitoring the file systemWhen creating package sources the file system way, Composer uses the macOS built-in File System Events (FSEvents) framework to monitor any changes made to the file system. FSEvents are notified each time a change is made. After installing the software Composer analyses the changes and creates package sources based on the results.

 

With the introduction of snapshots and monitoring the file system, we can foresee that during the process of creating a package source, any operations you perform that are not related to the creation of the source, such as accessing web pages, instant messaging friends, sending and receiving emails, and so on, will generate new or changed files in the drive will be captured, which will result in the creation of a package source will generate some rubbish files, which you will need to to determine and delete these junk files. Is there a good way to minimise this spam? Below I will introduce a way to reduce such spam files by creating package sources in VM environment.

 

You can install VirtualBox VM software on your computer with a macOS virtual machine and use the snapshot feature that comes with the VM software to create a snapshot of the VM after macOS has been installed and configured to ensure that you can always revert to that state. When you create a package source in a VM using snapshots or watched filesystems you will capture a cleaner package source and you can do what you want on the VM host, the physical machine, without worrying about any impact on the package source.

 

 

 

Related Links.

Composer Manual

https://docs.jamf.com/10.12.0/jamf-pro/administrator-guide/Composer.html

VirtualBox Download and Installation (free to use)

https://www.virtualbox.org

Run macOS 10.14 Mojave (and other versions) in VirtualBox on macOS:

https://github.com/AlexanderWillner/runMacOSinVirtualBox

Comments are closed.