Giter Club home page Giter Club logo

macos's Introduction

Packer templates for macOS written in legacy JSON

Overview

This repository contains Packer templates written in legacy JSON for creating macOS Vagrant boxes.

You must supply your own install media and build these boxes on your own using these templates. No pre-built boxes are publicly available.

Creating macOS install images with the prepare_iso.sh script

First you will need to create custom install images of macOS in order to automate the installation. These images are made from official macOS install media and customized so that they do not require human input to proceed through the macOS install.

Start by downloading local copies of the install media for macOS. Either download Install OS X.app from the App Store or the extract the InstallESD.dmg for the version(s) of macOS you want to install.

You might want to extract an InstallESD.dmg file from the Install OS X.app from the App Store if you store your installation media on a non-macOS filesystem that does not understand the macOS .app package format. You can find the InstallESD.dmg file at the following location within the install media package: Contents/SharedSupport/InstallESD.dmg. Otherwise, just stick with the original Install OS X.app file that you downloaded from the App Store.

Once you have a Install OS X.app or InstallESD.dmg file for the version of macOS you want to install, use the prepare_iso.sh script to create a custom install image in the dmg subdirectory for packer. For example, run following to create a custom install image from the Install OS X.app for Mac OS X El Capitan:

sudo prepare_iso/prepare_iso.sh /Applications/Install\ OS\ X\ El\ Capitan.app dmg

Or if you extracted an InstallESD.dmg the command line is similar:

sudo prepare_iso/prepare_iso.sh <path_to_installesd>/InstallESD.dmg dmg

The prepare_iso.sh script will prompt you for an administrator password. Enter in the correct password, the script will automatically create a custom install image for you. The script will take a few minutes to grind through the image creation process. Once the script is complete, it will print out a checksum and a relative path for the image location. For example, this was the output from prepare_iso.sh for my El Capitan image:

...
-- Checksumming output image..
-- MD5: 78abb8d18c4d8fc4436cac5394f58365
-- Done. Built image is located at dmg/OSX_InstallESD_10.11_15A284.dmg. Add this iso and its checksum to your template.

Customizing the var_list file

We make use of JSON files containing user variables to build specific versions of macOS. You tell packer to use a specific user variable file via the -var-file= command line option. This will override the default options on the core macos.json packer template.

Find the var_list file for the version of macOS you want to install, and change the iso_url variable to match the image file name produced by prepare_iso.sh.

Building the Vagrant boxes with Packer

To build all the boxes, you will need VirtualBox, VMware Fusion/VMware Workstation and Parallels installed.

Parallels requires that the Parallels Virtualization SDK for Mac be installed as an additional preqrequisite.

We make use of JSON files containing user variables to build specific versions of macOS. You tell packer to use a specific user variable file via the -var-file= command line option. This will override the default options on the core macos.json packer template, which builds Mac OS X El Capitan by default.

For example, to build Mac OS X El Capitan, use the following:

$ packer build -var-file=macos1011.json macos.json

If you want to make boxes for a specific desktop virtualization platform, use the -only parameter. For example, to build Mac OS X El Capitan for VMware Fusion:

$ packer build -only=vmware-iso -var-file=macos1011.json macos.json

The boxcutter templates currently support the following desktop virtualization strings:

Building the Vagrant boxes with the box script

We've also provided a wrapper script bin/box for ease of use, so alternatively, you can use the following to build Mac OS X El Capitan for all providers:

$ bin/box build macos1011 /Applications/Install\ OS\ X\ El\ Capitan.app/ 10.11

Or if you just want to build Mac OS X El Capitan for VMware Fusion:

$ bin/box build osx1011 /Applications/Install\ OS\ X\ El\ Capitan.app/ 10.11 vmware

Building the Vagrant boxes with the Makefile

A GNU Make Makefile drives a complete basebox creation pipeline with the following stages:

  • build - Create basebox *.box files
  • assure - Verify that the basebox *.box files produced function correctly
  • deliver - Upload *.box files to Artifactory, Atlas or an S3 bucket

The pipeline is driven via the following targets, making it easy for you to include them in your favourite CI tool:

make build   # Build all available box types
make assure  # Run tests against all the boxes
make deliver # Upload box artifacts to a repository
make clean   # Clean up build detritus

Proxy Settings

The templates respect the following network proxy environment variables and forward them on to the virtual machine environment during the box creation process, should you be using a proxy:

  • http_proxy
  • https_proxy
  • ftp_proxy
  • rsync_proxy
  • no_proxy

Tests

The tests are written in Serverspec and require the vagrant-serverspec plugin to be installed with:

vagrant plugin install vagrant-serverspec

The test-box script will configure vagrant to run all the box tests.

bin/box test osx1011 vmware

Similarly the ssh-box script will register a newly-built box with vagrant and permit you to login to perform exploratory testing. For example, to do exploratory testing on the VMware version of the box, run the following command:

bin/box ssh osx1011 vmware
make ssh-box/virtualbox/osx109-nocm.box

Makefile.local override

You can create a Makefile.local file alongside the Makefile to override some of the default settings. It is most commonly used to override the default configuration management tool, for example with Chef:

# Makefile.local
CM := chef

Changing the value of the CM variable changes the target suffixes for the output of make list accordingly.

Possible values for the CM variable are:

  • nocm - No configuration management tool
  • chef - Install Chef
  • chefdk - Install Chef Development Kit
  • puppet - Install Puppet
  • salt - Install Salt

You can also specify a variable CM_VERSION, if supported by the configuration management tool, to override the default of latest. The value of CM_VERSION should have the form x.y or x.y.z, such as CM_VERSION := 11.12.4

Another use for Makefile.local is to override the default locations for the Mac OS X installer files.

Contributing

  1. Fork and clone the repo.
  2. Create a new branch, please don't work in your master branch directly.
  3. Add new Serverspec or Bats tests in the test/ subtree for the change you want to make. Run make test on a relevant template to see the tests fail (like make test-vmware/osx109).
  4. Fix stuff. Use make ssh to interactively test your box (like make ssh-vmware/osx109).
  5. Run make test on a relevant template (like make test-vmware/osx109) to see if the tests pass. Repeat steps 3-5 until done.
  6. Update README.md and AUTHORS to reflect any changes.
  7. If you have a large change in mind, it is still preferred that you split them into small commits. Good commit messages are important. The git documentatproject has some nice guidelines on writing descriptive commit messages.
  8. Push to your fork and submit a pull request.
  9. Once submitted, a full make test run will be performed against your change in the build farm. You will be notified if the test suite fails.

Acknowledgments

These templates are based on Timothy Sutton's Mac OS X templates. We thank Timothy for making these templates available and keeping them updated.

Parallels provides a Business Edition license of their software to run on the basebox build farm.

SmartyStreets is providing basebox hosting for the box-cutter project.

macos's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

macos's Issues

macOS Sierra VM on ESXi Freezes Periodically every ~10s for about ~10s

This is similar to the symptoms described in timsutton/osx-vm-templates#43, however it is on ESXi 5.5 and occurs when DISABLE_REMOTE_MANAGEMENT and DISABLE_SCREEN_SHARING are specified. This issue happens on macOS Sierra 10.12.0 and 10.12.1. OS X El Capitan and OSX Mavericks built the same way do not have this issue, only macOS Sierra. I haven't tried other major versions yet.

I haven't been able to workout the cause of the issue. I not that even though Remote Management is disabled there's still ARDAgent process starting. It's PID changes roughly every 10s so I suspect that it's to blame, I haven't been able to stop it from starting. I'm not very proficient in OSX admin.

Installing XCode 6.4 on 10.10

It seems the latest version of XCode command line tools installed on 10.10 is really new. IIRC XCode command line tools 7.3.1 is what is installed, but I'm pretty sure that is targeting 10.11 at the low end. Is it possible to get XCode 6.4 command line tools installed instead? These actually can target 10.9 and 10.10.

SSH handshake err: ssh: handshake failed: EOF

The SSH to the macos109 vmware-iso machine could not proceed. I get this log:

2024/05/21 22:32:43 packer-plugin-vmware_v1.0.11_x5.0_darwin_amd64 plugin: 2024/05/21 22:32:43 [INFO] Attempting SSH connection to 192.168.45.129:22...
2024/05/21 22:32:43 packer-plugin-vmware_v1.0.11_x5.0_darwin_amd64 plugin: 2024/05/21 22:32:43 [DEBUG] reconnecting to TCP connection for SSH
2024/05/21 22:32:43 packer-plugin-vmware_v1.0.11_x5.0_darwin_amd64 plugin: 2024/05/21 22:32:43 [DEBUG] handshaking with SSH
2024/05/21 22:32:43 packer-plugin-vmware_v1.0.11_x5.0_darwin_amd64 plugin: 2024/05/21 22:32:43 [DEBUG] SSH handshake err: ssh: handshake failed: EOF
2024/05/21 22:33:05 packer-plugin-vmware_v1.0.11_x5.0_darwin_amd64 plugin: 2024/05/21 22:33:05 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 192.168.45.129:22: i/o timeout

The package "veewee-config.pkg" is not signed. Build fails. MacOS 10.12.5

Building for MacOS 10.12.5

Steps to reproduce:

  1. $ sudo prepare_iso/prepare_iso.sh "/Applications/Install macOS Sierra.app"/ dmg Password: ************ -- Attaching input OS X installer image with shadow file.. expected CRC32 $6E0A52CC /dev/disk6 GUID_partition_scheme /dev/disk6s1 EFI /dev/disk6s2 Apple_HFS /private/tmp/veewee-osx-esd.1UAH -- Mounting BaseSystem.. Checksumming Protective Master Boot Record (MBR : 0)… Protective Master Boot Record (MBR :: verified CRC32 $C16DE7A2 Checksumming GPT Header (Primary GPT Header : 1)… GPT Header (Primary GPT Header : 1): verified CRC32 $B9CE6ABE Checksumming GPT Partition Data (Primary GPT Table : 2)… GPT Partition Data (Primary GPT Tabl: verified CRC32 $6F7721F8 Checksumming (Apple_Free : 3)… (Apple_Free : 3): verified CRC32 $00000000 Checksumming disk image (Apple_HFS : 4)… .................................................................................................................................................................................. disk image (Apple_HFS : 4): verified CRC32 $D74AAD7A Checksumming (Apple_Free : 5)… .............................................................................................................................................................................................. (Apple_Free : 5): verified CRC32 $00000000 Checksumming GPT Partition Data (Backup GPT Table : 6)… GPT Partition Data (Backup GPT Table: verified CRC32 $6F7721F8 Checksumming GPT Header (Backup GPT Header : 7)… GPT Header (Backup GPT Header : 7): verified CRC32 $A76F9B83 verified CRC32 $BAD1A53D /dev/disk7 GUID_partition_scheme /dev/disk7s1 Apple_HFS /private/tmp/veewee-osx-basesystem.re1a -- OS X version detected: 10.12.5, build 16F73 -- Making firstboot installer pkg.. productbuild: Wrote product to /Users/minapuck/macos/prepare_iso/support/tmp/veewee-config.pkg "disk7" unmounted. "disk7" ejected. -- Creating empty read-write DMG located at /tmp/veewee-osx-basesystem-rw.pg2C.dmg.. ............................................................................................................................................................................................... created: /tmp/veewee-osx-basesystem-rw.pg2C.dmg /dev/disk7 Apple_partition_scheme /dev/disk7s1 Apple_partition_map /dev/disk7s2 Apple_HFS /private/tmp/veewee-osx-basesystem.re1a -- Restoring ('asr restore') the BaseSystem to the read-write DMG.. Validating target...done Validating source...done Retrieving scan information...done Validating sizes...done Restoring ....10....20....30....40....50....60....70....80....90....100 Remounting target volume...done -- Moving 'Packages' directory from the ESD to BaseSystem.. /tmp/veewee-osx-esd.1UAH/Packages -> /Volumes/OS X Base System/System/Installation/Packages /tmp/veewee-osx-esd.1UAH/Packages/BaseSystemResources.pkg -> /Volumes/OS X Base System/System/Installation/Packages/BaseSystemResources.pkg /tmp/veewee-osx-esd.1UAH/Packages/EmbeddedOSFirmware.pkg -> /Volumes/OS X Base System/System/Installation/Packages/EmbeddedOSFirmware.pkg /tmp/veewee-osx-esd.1UAH/Packages/Essentials.pkg -> /Volumes/OS X Base System/System/Installation/Packages/Essentials.pkg /tmp/veewee-osx-esd.1UAH/Packages/FirmwareUpdate.pkg -> /Volumes/OS X Base System/System/Installation/Packages/FirmwareUpdate.pkg /tmp/veewee-osx-esd.1UAH/Packages/OSInstall.mpkg -> /Volumes/OS X Base System/System/Installation/Packages/OSInstall.mpkg /tmp/veewee-osx-esd.1UAH/Packages/OSInstall.pkg -> /Volumes/OS X Base System/System/Installation/Packages/OSInstall.pkg -- Copying in original BaseSystem dmg and chunklist.. -- Adding automated components.. -- Unmounting BaseSystem.. "disk7" unmounted. "disk7" ejected. -- Unmounting ESD.. "disk6" unmounted. "disk6" ejected. -- On Mavericks and later, the entire modified BaseSystem is our output dmg. Preparing imaging engine… Reading Driver Descriptor Map (DDM : 0)… (CRC32 $651204F3: Driver Descriptor Map (DDM : 0)) Reading Apple (Apple_partition_map : 1)… (CRC32 $D01936FD: Apple (Apple_partition_map : 1)) Reading disk image (Apple_HFS : 2)… ............................................................................................................................................................................................... (CRC32 $AF8C3C74: disk image (Apple_HFS : 2)) Adding resources… ............................................................................................................................................................................................... Elapsed Time: 34.876s File size: 5455390200 bytes, Checksum: CRC32 $D44E0768 Sectors processed: 20971520, 12724369 compressed Speed: 178.1Mbytes/sec Savings: 49.2% created: /Users/minapuck/macos/dmg/OSX_InstallESD_10.12.5_16F73.dmg -- Fixing permissions.. -- Checksumming output image.. -- MD5: 7142bf8bab9ca70313d6591fd9ab484c -- Done. Built image is located at dmg/OSX_InstallESD_10.12.5_16F73.dmg. Add this iso and its checksum to your template.
  2. `$ packer build -only=vmware-iso -var 'file=macos1012.json' macos.json
    vmware-iso output will be in this color.

Warnings for build 'vmware-iso':

  • A checksum type of 'none' was specified. Since ISO files are so big,
    a checksum is highly recommended.

==> vmware-iso: Downloading or copying ISO
vmware-iso: Downloading or copying: file:///Users/minapuck/macos/dmg/OSX_InstallESD_10.12.5_16F73.dmg
==> vmware-iso: Creating virtual machine disk
==> vmware-iso: Building and writing VMX file
==> vmware-iso: Starting virtual machine...
==> vmware-iso: Waiting 2s for boot...
==> vmware-iso: Connecting to VM via VNC
==> vmware-iso: Typing the boot command over VNC...
==> vmware-iso: Waiting for SSH to become available...`

See Screenshot
screen shot 2017-06-26 at 2 03 37 pm

Successful Sierra build gets BSD-based guests error w. default Vagrantfile

The Vagrantfile produced from OS X 10.11 will yield errors after doing vagrant up. As there are no virtualbox guest editions built into the image, the default /vagrant file system with Shared Folders vboxsf cannot be mounted.

STEPS TO REPRODUCE

STEP 1: Build the Box

Build an image with Mac OX 10.12.1 (later versions apparently do not work).

sudo prepare_iso/prepare_iso.sh ~/Downloads/Install\ macOS\ Sierra.app dmg
packer build \
    -only=virtualbox-iso \
    -var-file=macos1012.json \
    -var iso_url=dmg/OSX_InstallESD_10.12.1_16B2657.dmg \
    macos.json

STEP2: Install Box and Init Env w/ Box

vagrant box add box/virtualbox/macos1012-0.1.0.box --name mac/sierra
mkdir macbox
cd macbox
vagrant init mac/sierra
vagrant up

ACTUAL RESULTS

Warning with this:

Vagrant is not able to mount VirtualBox shared folders on BSD-based
guests. BSD-based guests do not support the VirtualBox filesystem at
this time.

To change the type of the default synced folder, specify the type as
rsync or nfs:

    config.vm.synced_folder ".", "/vagrant", type: "nfs" # or "rsync"

Alternatively, if you do not need to mount the default synced folder,
you can also disable it entirely:

    config.vm.synced_folder ".", "/vagrant", disabled: true

You can read more about Vagrant's synced folder types and the various
configuration options on the Vagrant website.

This is not a bug in Vagrant.

EXPECTED RESULTS

Expected a Vagrantfile that would not cause an error.

Build fails with vmware-iso on ESXi

When trying to build an image on ESXi using the vmware-iso builder it fails at the end because Packer was no able to install vmware-tools. Packer tries to use a vim-cmd when "remote_type": "esx5" is set. I believe this is hashicorp/packer#1795. I opened hashicorp/packer#4022.

In addition, the scripts/vmware.sh provisioner script tries to install VMware Tools expecting that the iso file was uploaded, but with the esx5 target this is not the case. I modified the script but due to the vim-cmd failing, ultimately packer fails the build.

Finally when running the script/minimize.sh script the vmware-tools-cli disk shrink / command gets an error and returns exit-code 72 because shrinking is disabled for linked clones, parents of linked clones, pre-allocated disks, snapshots, or due to other factors. I worked around this by doing an echo after the vmware-tools-cli command, so that the script would exit cleanly.

os type issue on VirtualBox 5.1.14 and macOS Sierra 10.12

more details on http://apple.stackexchange.com/questions/270266/amfi-allowing-exception-handler-because-the-handler-was-set-by-master-entitle
same for me, but I can't find where to fix it.

step to reproduce:

sudo prepare_iso/prepare_iso.sh /Applications/Install\ macOS\ Sierra.app out
packer build -var-file=macos1012.json -var iso_url=out/OSX_InstallESD_10.12.3_16D32.dmg -var vagrantfile_template=tpl/vagrantfile-macos1012.tpl -only=virtualbox-iso macos.json

and run the box:

#Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
    config.vm.define "vagrant-macos1012"
    config.vm.box = "projects/macos/box/virtualbox/macos1012-0.1.0.box"

    config.vm.synced_folder ".", "/vagrant", type: "rsync"
    config.vm.synced_folder "../iOS-ballr", "/projects", type: "rsync"
    config.vm.network "forwarded_port", guest: 5900, host: 8900

    config.vm.provider :virtualbox do |v, override|
      v.gui = true

      v.customize ["modifyvm", :id, "--audiocontroller", "hda"]
      v.customize ["modifyvm", :id, "--boot1", "dvd"]
      v.customize ["modifyvm", :id, "--boot2", "disk"]
      v.customize ["modifyvm", :id, "--chipset", "ich9"]
      v.customize ["modifyvm", :id, "--firmware", "efi"]
      v.customize ["modifyvm", :id, "--hpet", "on"]
      v.customize ["modifyvm", :id, "--keyboard", "usb"]
      v.customize ["modifyvm", :id, "--memory", "4096"]
      v.customize ["modifyvm", :id, "--mouse", "usbtablet"]
      v.customize ["modifyvm", :id, "--vram", "256"]
      v.customize ["modifyvm", :id, "--cpus", "4"]
    end

end

Error removing temporary script (During cleanup of StepDownloadGuestAdditions)

Issue

When building 10.8 box using the command:
bin/box build macos108 ~/Downloads/Install\ OS\ X\ Mountain\ Lion.app/ 10.8 virtualbox

I consistently get:
Build 'virtualbox-iso' errored: Error removing temporary script at /tmp/script_9249.sh!

Building 10.7 or 10.9 with appropriate installers does not give issues.

Relevant parts of the Packer log - (available as Github Gist)

2017/09/27 15:04:53 [INFO] (telemetry) Starting builder virtualbox-iso
2017/09/27 15:04:53 packer: 2017/09/27 15:04:53 VBoxManage path: /usr/local/bin/VBoxManage
2017/09/27 15:04:53 packer: 2017/09/27 15:04:53 Not downloading guest additions since it is disabled.
2017/09/27 15:04:53 ui: ask: �[1;32m==> virtualbox-iso: Pausing after run of step 'StepDownloadGuestAdditions'. Press enter to continue.�[0m
...
2017/09/27 16:05:39 ui: ask: �[1;32m==> virtualbox-iso: Pausing before cleanup of step 'StepDownloadGuestAdditions'. Press enter to continue.�[0m
2017/09/27 16:05:45 [INFO] (telemetry) ending virtualbox-iso
2017/09/27 16:05:45 [INFO] (telemetry) found error: Error removing temporary script at /tmp/script_9249.sh!
2017/09/27 16:05:45 ui error: �[1;31mBuild 'virtualbox-iso' errored: Error removing temporary script at /tmp/script_9249.sh!�[0m
2017/09/27 16:05:45 Waiting on builds to complete...
2017/09/27 16:05:45 Builds completed. Waiting on interrupt barrier...
2017/09/27 16:05:45 machine readable: error-count []string{"1"}
2017/09/27 16:05:45 ui error: 
==> Some builds didn't complete successfully and had errors:
2017/09/27 16:05:45 machine readable: virtualbox-iso,error []string{"Error removing temporary script at /tmp/script_9249.sh!"}
2017/09/27 16:05:45 ui error: --> virtualbox-iso: Error removing temporary script at /tmp/script_9249.sh!

My environment

  • Packer version 1.0.4
  • Host: Mac OS 10.12.6 x64

Guru Alerts from El Capitan / Yosemite Builds

I am getting Guru messages attempting to create a El Capitan build.

Applications: 
  Packer:         1.1.1
  VirtualBox:     5.2.0r118431

Host System
 ProductName:	Mac OS X
 ProductVersion:	10.12.6 
 BuildVersion:	16G1036

STEPS

sudo prepare_iso/prepare_iso.sh ~/Downloads/Install\ OS\ X\ El\ Capitan.app dmg
packer build \
   -var-file=macos1011.json \
   -var iso_url=dmg/OSX_InstallESD_10.11.6_15G31.dmg \
   macos.json

ACTUAL RESULTS

I got a GURU message at the point it is waiting for SSH:

A critical error has occurred while running the virtual machine and the machine execution has been 
stopped.

For help, please see the Community section on https://www.virtualbox.org or your support contract. 
Please provide the contents of the log file VBox.log and the image file VBox.png, which you can find 
in the /Users/joaquin/VirtualBox VMs/macos1011/Logs directory, as well as a description of what you 
were doing when this error happened. Note that you can also access the above files by selecting 
Show Log from the Machine menu of the main VirtualBox window.

Press OK if you want to power off the machine or press Ignore if you want to leave it as is for 
debugging. Please note that debugging requires special knowledge and tools, so it is recommended 
to press OK now.

Log Snippet from attempt with El Capitan:

VirtualBox VM 5.2.0 r118431 darwin.amd64 (Oct 18 2017 08:28:11) release log
00:00:00.991365 Log opened 2017-11-15T19:29:13.218105000Z
00:00:00.991366 Build Type: release
00:00:00.991376 OS Product: Darwin
00:00:00.991381 OS Release: 16.7.0
00:00:00.991385 OS Version: Darwin Kernel Version 16.7.0: Wed Oct  4 00:17:00 PDT 2017; root:xnu-3789.71.6~1/RELEASE_X86_64
00:00:00.991461 DMI Product Name: MacBookPro14,3
00:00:00.991499 DMI Product Version: 1.0
00:00:00.991505 Host RAM: 16384MB (16.0GB) total, 7011MB (6.8GB) available
…
…
…
…
00:00:05.302383 !!
00:00:05.302384 !! {vgagr}
00:00:05.302384 !!
00:00:05.302386 VGA Graphics Controller (3CF): GR index 3CE:08
00:00:05.302389  GR00:00 GR01:00 GR02:00 GR03:00 GR04:00 GR05:40 GR06:05 GR07:0F GR08:FF
00:00:05.302414 !!
00:00:05.302414 !! {vgapl}
00:00:05.302414 !!
00:00:05.302416 read mode     : 0     write mode: 0
00:00:05.302420 set/reset data: 00    S/R enable: 00
00:00:05.302424 color compare : 00    read map  : 0
00:00:05.302428 rotate        : 0     function  : 0
00:00:05.302432 don't care    : 0F    bit mask  : FF
00:00:05.302436 seq plane mask: 0F    chain-4   : on
00:00:05.302440 !!
00:00:05.302440 !! {vgasr}
00:00:05.302441 !!
00:00:05.302443 VGA Sequencer (3C5): SR index 3C4:00
00:00:05.302445  SR00:03 SR01:01 SR02:0F SR03:00 SR04:0A SR05:00 SR06:00 SR07:01
00:00:05.302468 !!
00:00:05.302468 !! {vgatext}
00:00:05.302468 !!
00:00:05.302471 Not in text mode!
00:00:05.302472 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

NOTES

This happens on both El Capitan and Yosemite. It doesn't happen on Sierra, as we get text on the screen.

Not sure what to do or how to proceed, workaround, solutions, etc.

Security Update available on 10.10

I'm finding there is a security updating I'm missing after running packer and vagrant. Would it be possible to just install all security updates in packer? Does this seem like reasonable behavior to have as default?

Minimize.sh script fails OSX builds

Host machine: OSX 10.10
Using the boxcutter templates, unadulterated.

Am consistently running into the following error for every OSX packer build:

==> vmware-iso: Provisioning with shell script: script/minimize.sh
    vmware-iso: ==> Turn off hibernation
    vmware-iso: ==> Get rid of the sleepimage
    vmware-iso: ==> Stop the page process and dropping swap files
    vmware-iso: Zeroing out free space
    vmware-iso: Started erase on disk1s2 Macintosh HD
    vmware-iso: Creating a temporary file
    vmware-iso: Securely erasing a file
    vmware-iso: Creating a secondary temporary file
    vmware-iso: Mounting disk
    vmware-iso: Finished erase on disk1s2 Macintosh HD
    vmware-iso: Please disregard any warnings about disk space for the duration of shrink process.
Progress: 99 [==========>]17 [==>        ]
==> vmware-iso: Stopping virtual machine...
==> vmware-iso: Deleting output directory...
Build 'vmware-iso' errored: Retryable error: Error removing temporary script at /tmp/script_7943.sh: dial tcp 172.16.250.137:22: connect: host is down

==> Some builds didn't complete successfully and had errors:
--> vmware-iso: Retryable error: Error removing temporary script at /tmp/script_7943.sh: dial tcp 172.16.250.137:22: connect: host is down

Builds succeed if i comment out the minimize.sh script so the issue definitely seems to come from there, but I have no idea what´s up. Pointers anyone?

Edit: when running packer in headless_mode: "false", it seems packer tries to remove the temp script after having shutdown the machine, hence why it cannot remove the script or communicate with the vm at all

High Sierra

Could we get support for High Sierra boxes as well?

Parallels/VMWare provisions scripts configured to run on VirtualBox

All provisioning scripts run on all builders, so that both parallels.sh and vmware.sh run on virtualbox-iso builder.

STEPS

Do a build with with -only option, e.g. packer build -only=vmware-iso.

EXPECTED RESULTS

Onlyvirtualbox.sh provisioning script would run.
The vmware.sh and parallels.sh scripts would NOT run.

ACTUAL RESULTS

All three vm platform specific provisioning scripts (parallels, vmware, virtualbox) would run on virtualbox.

POTENTIAL SOLUTIONS

Use {{.Provider}} in the name (haven't tried this):

{
    "type": "shell",
    "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E -S bash '{{ .Path }}'",
    "scripts": [
      "script/{{.Provider}}.sh",
      "script/xcode-cli-tools.sh",
      "script/add-network-interface-detection.sh",
      "script/energy.sh",
      "script/autologin.sh",
      "script/update.sh",
      "script/update.sh",
      "script/update.sh",
      "script/update.sh"
      ],
}

Utilize the only key within a provisioners area:

{
    "only": ["virtualbox-iso"],
    "type": "shell",
    "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E -S bash '{{ .Path }}'",
    "script": "scripts/virtualbox.sh"
}

Make virtualbox/osx109-desktop error

I'm trying to create a Mac OS X Mavericks vagrant box. I downloaded Mac OS X and follow steps here https://stefanscherer.github.io/unboxing-os-x-yosemite-for-packer/ to do that. When I enter "make virtualbox/osx109-desktop". I got an error as below:

Could you please tell me how to fix this error?

Thanks so much.

Error message:
............
...........
created: /Users/abc/Data/Researches/MacOSXBox/osx/dmg/OSX_InstallESD_10.9.5_13F34.dmg
-- Fixing permissions..
-- Checksumming output image..
-- MD5: 1be247dda2f724b6742664ea1a1576e0
-- Done. Built image is located at dmg/OSX_InstallESD_10.9.5_13F34.dmg. Add this iso and its checksum to your template.
rm -rf output-virtualbox-iso
mkdir -p box/virtualbox
packer build -only=virtualbox-iso -var 'cm=nocm' -var 'update=true' -var 'install_xcode_cli_tools=true' -var 'version=1.0.1' -var 'ssh_username=vagrant' -var 'ssh_password=vagrant' -var 'install_vagrant_keys=true' -var "iso_url=dmg/OSX_InstallESD_10.9_13A603.dmg" osx109-desktop.json
virtualbox-iso output will be in this color.

Warnings for build 'virtualbox-iso':

  • A checksum type of 'none' was specified. Since ISO files are so big,
    a checksum is highly recommended.

==> virtualbox-iso: Downloading or copying ISO
virtualbox-iso: Downloading or copying: file:///dmg/OSX_InstallESD_10.9_13A603.dmg
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive...
==> virtualbox-iso: Error attaching ISO: VBoxManage error: VBoxManage: error: Could not find file for the medium '/dmg/OSX_InstallESD_10.9_13A603.dmg' (VERR_FILE_NOT_FOUND)
==> virtualbox-iso: VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Medium, interface IMedium, callee nsISupports
==> virtualbox-iso: VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of file VBoxManageDisk.cpp
==> virtualbox-iso: VBoxManage: error: Invalid UUID or filename "/dmg/OSX_InstallESD_10.9_13A603.dmg"
==> virtualbox-iso: Unregistering and deleting virtual machine...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Error attaching ISO: VBoxManage error: VBoxManage: error: Could not find file for the medium '/dmg/OSX_InstallESD_10.9_13A603.dmg' (VERR_FILE_NOT_FOUND)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Medium, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of file VBoxManageDisk.cpp
VBoxManage: error: Invalid UUID or filename "/dmg/OSX_InstallESD_10.9_13A603.dmg"

==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso: Error attaching ISO: VBoxManage error: VBoxManage: error: Could not find file for the medium '/dmg/OSX_InstallESD_10.9_13A603.dmg' (VERR_FILE_NOT_FOUND)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Medium, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of file VBoxManageDisk.cpp
VBoxManage: error: Invalid UUID or filename "/dmg/OSX_InstallESD_10.9_13A603.dmg"

==> Builds finished but no artifacts were created.
make: *** [box/virtualbox/osx109-desktop-nocm-1.0.1.box] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.