Skip to content

Brantone/macos-vmware-packer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

macOS VM Packer

This is only focussed on VM Ware Fusion.

Found that no single solution worked completely or consistently, thus for my specific use-case picked pieces from others to accomplish my goals.

Read info from other repos listed below for more info and alternatives.

Note

This is not intended to promote piracy, used for development and testing.

Build Steps

  1. Download install application from Apple Store to /Applications/
  2. Generate ISO
sudo ./generate-iso.macos.sh 10.13 output
  1. Run Packer
packer build -on-error=ask packer/template.json
  1. On Recovery Screen, open Disk Utility
  2. Erase disk. For smaller size keep "Journaled" otherwise APFS"
  3. Exit Disk Utility to return to initial screen andstart OS Install.
  4. Run through macOS install manually
    • During this time packer is waiting for SSH to become available.
  5. Open Terminal and manually add vagrant to sudoers
  6. System Preferences > Remote Login > Enable "Remote Login"

Optional

  • VMWare Tools might pop-up asking about install, click "OK"
  • Should the packer run have issues, can finish up the shrink and package manually:
    1. Stuff from my notes
    2. Shutdown VM
    3. Shrink disk
    cd output-vmware-iso
    /Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager -d disk.vmdk
    /Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager -k disk.vmdk
    
    1. Tar up
    GZIP=-9 tar cvzf your-box-name.box ./*
    

To Do

  • Re-add checksum
  • Clean up output directories (ex: not be nested in packer folder)
  • Update vmware.sh to not try to install tools if already exists
  • Figure out what's going on with 'vagrant_box_directory' variable

Credit

Changes

About

Create macOS VM for VMWare using packer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published