Code Monkey home page Code Monkey logo

macinbox's Introduction

macinbox

Puts macOS Catalina in a Vagrant box.

Some sequences shortened. Original run time 14.5 minutes.

Supports creating boxes in either the 'vmware_fusion', 'vmware_desktop', 'parallels', or 'virtualbox' formats.

System Requirements

  • macOS 10.15 Catalina host operating system
  • At least 8 GB RAM (16 GB recommended)
  • At least 2 cores (4 recommended)
  • At least 100 GB of available disk space

Additional Dependencies

The following software is required. Versions other than those mentioned may work, but these are the latest versions tested.

Vagrant

To boot a box created by macinbox you will need Vagrant:

macOS Installer

To create a box you will need a macOS installer application. If you are using a Catalina host you must use a Catalina installer:

Catalina hosts cannot use earlier (e.g. macOS 10.14 Mojave) installers, and Mojave hosts cannot use Catalina installers.

If you are using a Mojave host you should use a Mojave installer:

It is recommended that you use the same version for the host and the installer, but previous versions of the macOS installer (e.g. macOS 10.13 High Sierra) may also work with Mojave hosts, and vice-versa.

NOTE: If you have questions about the permissibility of virtualizing macOS you may want to review the documentation for the virtualization software you are using and the software license agreement for macOS.

Virtualization Software

One of the following virtualization applications is required:

VMware Fusion

To create and boot a box in the 'vmware_fusion' or 'vmware_desktop' formats you will need:

Parallels Desktop

To create and boot a box in the 'parallels' format you will need:

VirtualBox

To create and boot a box in the 'virtualbox' format you will need:

Installation

Install the gem:

$ sudo gem install macinbox

Basic Usage

Run with sudo and no arguments, the macinbox tool will create and add a Vagrant VMware box named 'macinbox' which boots fullscreen to the desktop of the 'vagrant' user:

$ sudo macinbox

Please be patient, as this may take a while. (On a 2.5 GHz MacBookPro11,5 it takes about 11 minutes, 30 seconds.) After the tool completes you can create a new Vagrant environment with the box and start it:

$ vagrant init macinbox && vagrant up

A few moments after running this command you will see your virtual machine's display appear fullscreen. (Press Command-Control-F to exit fullscreen mode.) After the virtual machine completes booting (approximately 1-2 minutes) you will see the desktop of the 'vagrant' user and can begin using the virtual machine.

To create a Parallels Desktop box, pass the --box-format option:

$ sudo macinbox --box-format parallels

Advanced Usage

To see the advanced options, pass the --help option:

Usage: macinbox [options]

        --box-format FORMAT          Format of the box (default: vmware_desktop)

    -n, --name NAME                  Name of the box         (default: macinbox)
    -d, --disk SIZE                  Size (GB) of the disk   (default: 64)
    -t, --fstype TYPE                Type for disk format    (default: APFS)
    -m, --memory SIZE                Size (MB) of the memory (default: 2048)
    -c, --cpu COUNT                  Number of virtual cores (default: 2)
    -s, --short NAME                 Short name of the user  (default: vagrant)
    -f, --full NAME                  Full name of the user   (default: Vagrant)
    -p, --password PASSWORD          Password of the user    (default: vagrant)

        --installer PATH             Path to the macOS installer app
        --installer-dmg PATH         Path to a macOS installer app disk image
        --vmware PATH                Path to the VMware Fusion app
        --parallels PATH             Path to the Parallels Desktop app
        --user-script PATH           Path to user script

        --no-auto-login              Disable auto login
        --no-skip-mini-buddy         Show the mini buddy on first login
        --no-hidpi                   Disable HiDPI resolutions
        --no-fullscreen              Display the virtual machine GUI in a window
        --no-gui                     Disable the GUI

        --use-qemu                   Use qemu-img (vmware_desktop only)

        --verbose                    Enable verbose mode
        --debug                      Enable debug mode

    -v, --version
    -h, --help

Enabling debug mode causes the intermediate files (disk image, VMDK, and box) to be preserved after the tool exits rather than being cleaned up. WARNING!!! These intermediate files are very large and you can run out of disk space very quickly when using this option.

This advanced example creates and adds a box named 'macinbox-large-nogui' with 4 cores, 8 GB or RAM, and a 128 GB disk; turns off auto login; and prevents the VMware GUI from being shown when the VM is started:

$ sudo macinbox -n macinbox-large-nogui -c 4 -m 8192 -d 128 --no-auto-login --no-gui

If you have the VAGRANT_HOME environment variable set and want the created box to be added to the 'boxes' directory in that location you will need to tell sudo to pass it through to macinbox, e.g.:

$ sudo "VAGRANT_HOME=${VAGRANT_HOME}" macinbox

Retina Display and HiDPI Support

By default macinbox will configure the guest OS to have HiDPI resolutions enabled, and configure the virtual machine to use the native display resolution. You can disable this behavior using the --no-hidpi option.

Box Format Support

By default macinbox will create a Vagrant box in the 'vmware_desktop' format with the VMware Tools pre-installed.

When the box format is set to 'parallels' using the --box-format option then the Parallels Tools are pre-installed instead.

When the box format is set to 'virtualbox' no guest extensions are installed. Note that some features behave differently with VirtualBox. The screen resolution is set to 1280x800 and HiDPI resolutions are not supported. The GUI scale factor is set to 2.0 (so that the VM displays properly on a host with a retina display) unless the --no-hidpi option is used. Lastly, ssh port-forwarding is enabled by default so that the host can connect to the guest.

User scripts

If additional box customization is required a user script may be specified using the --user-script option. The script is run after the OS has been installed and will be provided with the path to the install location as its first and only argument. The script must be executable and exit with code zero or the box creation will be aborted.

Installer Disk Image Support

The --installer-dmg option allows you to indicate the path to a disk image containing a macOS installer, and overrides the --installer option. The specified disk image should not already be mounted; macinbox will mount and unmount it as needed. This feature allows you to use the installer disk images created by installinstallmacos.py as part of the macinbox workflow.

Implementation Details

This tool performs the following actions:

  1. Wraps the installer app in a disk image
  2. Creates a new blank disk image
  3. Installs macOS
  4. Installs the VMware or Parallels tools
  5. (VMware only) Updates the SystemPolicyConfiguration KextPolicy to allow the VMware tools kernel extension to load automatically
  6. Adds an .InstallerConfiguration file to automate the Setup Assistant app and create a user account on first boot
  7. Enables password-less sudo
  8. Enables sshd
  9. Adds an rc.installer_cleanup script which waits for the user account to be created on first boot and then installs the default insecure Vagrant SSH key in the user's home directory
  10. Enables HiDPI resolutions
  11. Converts the image into a virtual hard disk
  12. Creates a Vagrant box using the virtual hard disk
  13. Adds the box to Vagrant

The box created by this tool includes a built-in Vagrantfile which disables the following default Vagrant behaviors:

  1. Checking Vagrant Cloud for new versions of the box
  2. Forwarding from port 2222 on the host to port 22 (ssh) on the guest (VMware Fusion and Parallels Desktop only)
  3. Sharing the root folder of the Vagrant environment as '/vagrant' on the guest

To re-enable the default ssh port forwarding you can add the following line to your environment's Vagrantfile:

config.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh"

To re-enable the default synced folder you can add the following line to your environment's Vagrantfile:

config.vm.synced_folder ".", "/vagrant"

Design Philosophy

This tool is intended to do everything that needs to be done to a fresh install of macOS before the first boot to turn it into a Vagrant box that boots macOS with a seamless user experience. However, this tool is also intended to the do the least amount of configuration possible. Nothing is done that could instead be deferred to a provisioning step in a Vagrantfile or packer template.

Acknowledgements

This project was inspired by the great work of others:

Why?

This project draws inspiration from an episode of Mr. Robot. In the episode, Elliot is shown quickly booting what appeared to be a virtual machine running a fresh Linux desktop environment, in order to examine the contents of an untrusted CD-ROM. As I watched I thought, "I want to be able to do that kind of thing with macOS!". Surely I'm not the only person who has downloaded untrusted software from the internet, and wished that there was an easy way to evaluate it without putting my primary working environment at risk?

This project is a direct successor to my vagrant-box-macos project, which itself was heavily inspired by Tim Sutton's osx-vm-templates project.

With the release of macOS 10.12.4 the prevailing techniques for customizing macOS installs were hampered by a new installer requirement that all packages be signed by Apple. After attempting various techniques to allow vagrant-box-macos to support macOS 10.13 High Sierra, I decided a different approach to box creation was needed, and macinbox was born.

Development

Start by running sudo gem install bundler and bundle install.

To run macinbox directly from the root of the git workspace without installing the gem, run sudo bundle exec macinbox.

To install this gem onto your local machine, run sudo bundle exec rake install.

You can also run bin/console for an interactive prompt that will allow you to experiment. For example:

opts = Macinbox::CLI::DEFAULT_OPTION_VALUES
opts[:collector] = Macinbox::Collector.new
opts[:full_name] = "Vagrant"
opts[:password] = "vagrant"
opts[:image_path] = "macinbox.sparseimage"
opts[:boxes_dir] = File.expand_path "~/.vagrant.d/boxes"
$debug = $verbose = true

include Macinbox::Actions

opts[:macos_version] = CheckMacosVersions.new(opts).run

CreateImageFromInstaller.new(opts).run

opts[:vmdk_path] = "macinbox.vmdk"
CreateVMDKFromImage.new(opts).run

opts[:box_format] = "vmware_desktop"
opts[:box_path] = "vmware_desktop.box"
CreateBoxFromVMDK.new(opts).run
InstallBox.new(opts).run

opts[:hdd_path] = "macinbox.hdd"
CreateHDDFromImage.new(opts).run

opts[:box_format] = "parallels"
opts[:box_path] = "parallels.box"
CreateBoxFromHDD.new(opts).run
InstallBox.new(opts).run

opts[:vdi_path] = "macinbox.vdi"
CreateVDIFromImage.new(opts).run

opts[:box_format] = "virtualbox"
opts[:box_path] = "virtualbox.box"
CreateBoxFromVDI.new(opts).run
InstallBox.new(opts).run

opts[:collector].cleanup!

To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/bacongravy/macinbox.

macinbox's People

Contributors

bacongravy avatar beatrupp avatar egandro avatar footpad avatar frankosterfeld avatar jokdbx avatar robin850 avatar

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

macinbox's Issues

Any way to get sound working in VirtualBox VM?

I've been playing around with it, but I cannot seem to find a way to get sound working from within the virtualbox VM. Everything else seems to be working no problem. Does sound work with VMware?

Error creating Parallels box due to missing Parallels Tools Audio 10.9.pkg

With Parallels Desktop 15.0.0, the tools image no longer includes the Parallels Tools Audio 10.9.pkg package. This causes macinbox to fail with this error:

  + Installing the Parallels Tools...
Could not open package for expansion: /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_hdd_from_image.LuIIGTAy/tools_mountpoint/Install.app/Contents/Resources/Install.mpkg/Contents/Packages/Parallels Tools Audio 10.9.pkg
    - Error: /usr/sbin/pkgutil failed with non-zero exit code: 1

Compatibility with Big Sur

I'm getting this error when trying to create a box with Big Sur:

• Attaching installer disk image...
• Checking macOS versions...
  + Error: InstallInfo.plist not found in installer app bundle

• Cleaning up...

Installing the VMware Tools fails with an unhelpful message if darwin.iso is missing

Installing the VMware Tools fails with an unhelpful message if darwin.iso is missing:

$ sudo macinbox
• Creating image from installer...
  + Checking macOS versions...
  + Creating and attaching a new blank disk image...
  + Installing macOS...
    - installer: 100% done
  + Installing the VMware Tools...
    - Error: hdiutil failed with non-zero exit code: 256
• Cleaning up...

At the very least the message needs to tell you the tools are not present. An even better user experience would be for the macinbox tool to download the tools itself.

Whitelisting of Kext's

Hello,

can we make a nice --whitelist-known-kext flag?

I'd like to whitelist all "wellknown" kext e.g. vbox, virtualbox, docker, ... by the way you use for vmware.

This will reduce the number of clicks we have to do in postsetup.

(I will create a patch request within a few days).

Parallels sed error

When building a parallels box, I got the following error:

• Creating image from installer...
  + Checking macOS versions...
  + Creating and attaching wrapper disk image...
  + Creating and attaching a new blank disk image...
  + Installing macOS...
    - installer: 100% done
  + Installing the Parallels Tools...
sed: can't read s/PARALLELS_ADDITIONAL_ARGS/--share/: No such file or directory
    - Error: sed failed with non-zero exit code: 2

• Cleaning up...
sudo macinbox --version
macinbox 2.0.1
prlctl --version
prlctl version 14.0.1 (45154)

Virtualbox 6.1.3 fails to boot Catalina 10.15.2

Hi folks! Thanks for this amazing tool!

I am running macOS 10.15.2, and have installed macinbox, Virtualbox and Vagrant.

I ran sudo macinbox --box-format virtualbox, and it appears to have succeeded. I then created a tmp directory, went into it, and vagrant init macinbox, and virtualbox starts up. I eventually get to a EFI text screen that ends in Found fs2:\System\Library\CoreServices\boot.efi, loading...

I have left it there overnight and it doesn't seem to go anywhere. Any thoughts?

Thanks!

VMWare Fusion 11.5 ignores HiDPI setting in VMX file

With VMWare Fusion 11.5 the gui.fitguestusingnativedisplayresolution setting in VMX files is getting ignored. It appears that v11.5 is case-sensitive for this setting, whereas previous versions of Fusion were case-insensitive.

With Fusion 11.5, the setting must be capitalized like this to have an effect:

gui.fitGuestUsingNativeDisplayResolution = "TRUE"

Unfortunately, vagrant's long-standing behavior is to downcase this setting in the VMX every time you run vagrant up.

If you power off the VM using Fusion, change the setting with Fusion, and then power it back on with Fusion, the setting is preserved, and the VM runs with HiDPI enabled. But as soon as you run vagrant up again the setting gets downcased and HiDPI stops working.

vagrant group missing from box

The vagrant user group is missing from the vagrant box, which makes using e.g. rsync synced folders require some work before you can make them work, as vagrant assumes both the user and user group are present in the box.

Error: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

find /vagrant '!' -type l -a '(' ! -user vagrant -or ! -group vagrant ')' -exec chown vagrant:vagrant '{}' +

Stdout from the command:



Stderr from the command:

find: -group: vagrant: no such group
---- End output of vagrant up --provider virtualbox ----

ENOENT errors when creating files

With many files the create_image_from_installer.rb script creates, I get errors such as

Errno::ENOENT: No such file or directory @ rb_sysopen - /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_image_from_installer.ntCenXvd/scratch_mountpoint/private/etc/sudoers.d/vagrant

It works when I add explicit FileUtils.mkdir_p calls that create the directory before writing the file, like this:

+        FileUtils.mkdir_p "#{@scratch_mountpoint}/Library/LaunchDaemons/"
         File.write first_boot_launch_daemon, <<~EOF

As everyone else should run into these, I wonder if something is wrong in my environment.

I'm on macOS Catalina 10.15.4, ruby --version:

 ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]

Support Parallels without requiring VMware Fusion

Problem

Currently, creating macOS Parallels Vagrant boxes requires the user to have purchased both VMWare Fusion as well as Parallels Desktop. Both hypervisors are pretty steep in price, and which may deter users from using macinbox.

Possible Solutions

Instead of using VMware's command line tools to convert the raw device bits to VMDK and then use prl_disk_tool to convert the VMDK to an HDD, we could skip the VMware step altogether and create the Parallels VM using (at the very least) the free tools provided by either VirtualBox or QEMU. It may also be possible to create the Parallels HDD using only tools built-in to macOS (specifically dd and hdiutil).

I was able to get a box up and running using only qemu-img, but it'd be nice not to rely on any third-party tools for each hypervisor.

Box created with Parallels Desktop 15.1.2 fails to boot

As discovered while investigating #47, if I use Parallels Desktop 15.1.2 to create a box, then the created box fails to boot. When Parallels Desktop 15.0.0 is used to generate the box then it works fine. The 15.0.0-created box boots fine with 15.1.2, so I suspect that the problem is that the 15.1.2 version of prl_convert tool is behaving differently and producing an unbootable hdd.

How to disable the screensaver?

Any (working) solution on how to disable the screensaver?

I only have a (very very) crude hack by a userscript.sh:

# echo "Disable screensaver"

# mv "${CHROOT}/Library/Screen Savers" "${CHROOT}/Library/Screen Savers.disabled"
# mv "${CHROOT}/System/Library/Screen Savers" "${CHROOT}/System/Library/Screen Savers.disabled"

On Mojave host, create boxes for previous macOS versions

On a Mojave host, I can successfully create Mojave boxes, but it fails for older versions at different stages. Below are the errors I get for High Sierra and Sierra. Is this expected to work, or indeed working for anyone? I'd like to create VMs of older versions for running continuous integration on multiple macOS versions.

High Sierra:

sudo macinbox --box-format virtualbox --no-gui --name test-high-sierra --installer ~/macOSInstallers/Install\ macOS\ High\ Sierra.app/ --verbose
• Running command: /usr/bin/mktemp -d -t macinbox_root_temp
• Running command: /usr/bin/sudo -u cvai /usr/bin/mktemp -d -t macinbox_user_temp
• Checking macOS versions...
  + Error: InstallInfo.plist not found in installer app bundle

• Cleaning up...

Sierra:

sudo macinbox --box-format virtualbox --no-gui --name test-sierra --installer ~/macOSInstallers/Install\ macOS\ Sierra.app/ --verbose
• Running command: /usr/bin/mktemp -d -t macinbox_root_temp
• Running command: /usr/bin/sudo -u cvai /usr/bin/mktemp -d -t macinbox_user_temp
• Checking macOS versions...
  + Running command: /usr/libexec/PlistBuddy -c Print\ :System\\\ Image\\\ Info:version /Users/cvai/macOSInstallers/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallInfo.plist
  + Installer macOS version detected: 10.12.6
  + Running command: /usr/bin/sw_vers -productVersion
  + Host macOS version detected: 10.14.5
  + Warning: host OS version (10.14.5) and installer OS version (10.12.6) do not match
• Creating image from installer...
  + Running command: /usr/bin/mktemp -d -t create_image_from_installer
  + Running command: /usr/bin/stat -f \%d /
  + Running command: /usr/bin/stat -f \%d /Users/cvai/macOSInstallers/Install\ macOS\ Sierra.app
  + Creating and attaching wrapper disk image...
    - Running command: /usr/bin/hdiutil create -srcfolder /Users/cvai/macOSInstallers/Install\ macOS\ Sierra.app /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_image_from_installer.sfZWP3dv/wrapper.dmg
.............................................................................................................................................................
created: /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_image_from_installer.sfZWP3dv/wrapper.dmg
    - Running command: /usr/bin/hdiutil attach /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_image_from_installer.sfZWP3dv/wrapper.dmg -nomount
    - Running command: /usr/bin/hdiutil attach /dev/disk4s1 -nobrowse
/dev/disk4s1        	41504653-0000-11AA-AA11-0030654	/Volumes/Install macOS Sierra
    - Running command: /usr/sbin/diskutil info /dev/disk4s1
  + Creating and attaching a new blank disk image...
    - Running command: /usr/bin/hdiutil create -size 64g -type SPARSE -fs APFS -volname Macintosh\ HD -uid 0 -gid 80 -mode 1775 /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_image_from_installer.sfZWP3dv/scratch.sparseimage
created: /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_image_from_installer.sfZWP3dv/scratch.sparseimage
    - Running command: /usr/bin/hdiutil attach /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_image_from_installer.sfZWP3dv/scratch.sparseimage -nomount
    - Running command: /usr/bin/hdiutil attach /dev/disk6s1 -nobrowse -mountpoint /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_image_from_installer.sfZWP3dv/scratch_mountpoint -owners on
/dev/disk6s1        	41504653-0000-11AA-AA11-0030654	/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_image_from_installer.sfZWP3dv/scratch_mountpoint
  + Installing macOS...
    - Running command: /usr/bin/touch /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_image_from_installer.sfZWP3dv/scratch_mountpoint/.macinbox
    - installer: 0% done [|                                                                                                                                               ]    - Running command: /usr/sbin/installer -verboseR -dumplog -pkg /Volumes/Install\ macOS\ Sierra/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallInfo.plist -target /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_image_from_installer.sfZWP3dv/scratch_mountpoint
Jun 16 21:01:05  installer[35573] <Notice>: Hardware: Macmini8,1 @ 3.20 GHz (x 12), 65536 MB RAM
Jun 16 21:01:05  installer[35573] <Notice>: Running OS Build: Mac OS X 10.14.5 (18F132)
Jun 16 21:01:05  installer[35573] <Debug>: Env: TERM=xterm-256color
Jun 16 21:01:05  installer[35573] <Debug>: Env: SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.aJXc8HiJvs/Listeners
Jun 16 21:01:05  installer[35573] <Debug>: Env: __CF_USER_TEXT_ENCODING=0x0:0:0
Jun 16 21:01:05  installer[35573] <Debug>: Env: PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Jun 16 21:01:05  installer[35573] <Debug>: Env: HOME=/Users/cvai
Jun 16 21:01:05  installer[35573] <Debug>: Env: COLORFGBG=7;0
Jun 16 21:01:05  installer[35573] <Debug>: Env: LC_CTYPE=UTF-8
Jun 16 21:01:05  installer[35573] <Debug>: Env: COLORTERM=truecolor
Jun 16 21:01:05  installer[35573] <Debug>: Env: MAIL=/var/mail/root
Jun 16 21:01:05  installer[35573] <Debug>: Env: LOGNAME=root
Jun 16 21:01:05  installer[35573] <Debug>: Env: USER=root
Jun 16 21:01:05  installer[35573] <Debug>: Env: USERNAME=root
Jun 16 21:01:05  installer[35573] <Debug>: Env: SHELL=/bin/sh
Jun 16 21:01:05  installer[35573] <Debug>: Env: SUDO_COMMAND=/usr/local/bin/macinbox --box-format virtualbox --no-gui --name test-sierra --installer /Users/cvai/macOSInstallers/Install macOS Sierra.app/ --verbose
Jun 16 21:01:05  installer[35573] <Debug>: Env: SUDO_USER=cvai
Jun 16 21:01:05  installer[35573] <Debug>: Env: SUDO_UID=501
Jun 16 21:01:05  installer[35573] <Debug>: Env: SUDO_GID=20
Jun 16 21:01:05  installer[35573] <Debug>: Env: COMMAND_LINE_INSTALL=1
Jun 16 21:01:05  installer[35573] <Info>: Will not update firmware because we can't find the mutable product ((null))
Jun 16 21:01:05  installer[35573] <Notice>: Creating connection
Jun 16 21:01:05  installer[35573] <Notice>: Connection = 0x7f9936700f90, callers = (
	    "<IASUPCaller: 0x7f9936706920>"
	)
Jun 16 21:01:05  installer[35573] <Notice>: Registering the connection
Jun 16 21:01:05  installer[35573] <Notice>: client 0x7f99367007e0: phaseName = OS Installer 2
Jun 16 21:01:05  installer[35573] <Info>: Install will not be automated.
Jun 16 21:01:06  installer[35573] <Info>: Connected to daemon. Language set to: en_GB
Jun 16 21:01:06  installer[35573] <Info>: Install will be a InstallInfo.plist install.
Jun 16 21:01:06  installer[35573] <Error>: Installer Info install requested but we're not dmg booted
Jun 16 21:01:06  installer[35573] <Error>: InstallInfo.plist is missing payload dmg info
Jun 16 21:01:06  installer[35573] <Notice>: client 0x7f99367007e0: phaseName = OS Installer 2
Jun 16 21:01:06  installer[35573] <Notice>: Releasing Connection


• Cleaning up...
/Library/Ruby/Gems/2.3.0/gems/macinbox-3.3.0/lib/macinbox/actions/create_image_from_installer.rb:112:in `write': No such file or directory @ rb_sysopen - /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_image_from_installer.sfZWP3dv/scratch_mountpoint/private/etc/rc.installer_cleanup (Errno::ENOENT)
	from /Library/Ruby/Gems/2.3.0/gems/macinbox-3.3.0/lib/macinbox/actions/create_image_from_installer.rb:112:in `create_rc_vagrant'
	from /Library/Ruby/Gems/2.3.0/gems/macinbox-3.3.0/lib/macinbox/actions/create_image_from_installer.rb:49:in `run'
	from /Library/Ruby/Gems/2.3.0/gems/macinbox-3.3.0/lib/macinbox/cli.rb:129:in `block (2 levels) in start'
	from /Library/Ruby/Gems/2.3.0/gems/macinbox-3.3.0/lib/macinbox/logger.rb:17:in `info'
	from /Library/Ruby/Gems/2.3.0/gems/macinbox-3.3.0/lib/macinbox/cli.rb:128:in `block in start'
	from /Library/Ruby/Gems/2.3.0/gems/macinbox-3.3.0/lib/macinbox/cli.rb:122:in `chdir'
	from /Library/Ruby/Gems/2.3.0/gems/macinbox-3.3.0/lib/macinbox/cli.rb:122:in `start'
	from /Library/Ruby/Gems/2.3.0/gems/macinbox-3.3.0/lib/macinbox/cli.rb:19:in `run!'
	from /Library/Ruby/Gems/2.3.0/gems/macinbox-3.3.0/exe/macinbox:5:in `<top (required)>'
	from /usr/local/bin/macinbox:22:in `load'
	from /usr/local/bin/macinbox:22:in `<main>'

Is macOS 10.14 host required?

I was trying to run macinbox in my macOS 10.13.6 host and an error occurred - Error: host OS version (10.13.6) and installer OS version (10.14) do not match. Then I comment out check_macos_versions and everything works fine. So why checking the version of host?

Guest shows "Cable Unplugged" in Network Preferences, loses connectivity on reboot

Upon first booting a macinbox, the VM gets a DHCP address and can connect to the Internet, but if you look in the Network Preferences you will see that it says that the interface status is "Cable Unplugged". When you next reboot the VM, it fails to obtain a DHCP address, and cannot connect to the internet, and the host cannot reach it via vagrant ssh, either.

You can workaround the issue by changing the interface's Configure IPv4 option to Off, clicking Apply, and then changing it back to Using DHCP, and clicking Apply again. The cable remains "unplugged", but a DHCP address is obtained, and the Internet is reachable again until the next reboot.

Small issue with --user-script

The user script will run before the

"Setting the KextPolicy to allow loading the VMware kernel extensions..."

So I can't set my own stuff to

{@image_mountpoint}/private/var/db/SystemPolicyConfiguration/KextPolicy

Since this will be always overwritten.

Can you please add a "Skipting KextPolicy because file already exists"?

Cannot create a Mojave disk on VMWare Fusion 11

macinbox_debug.log

I downloaded Mojave from the app store and then attempted to run sudo macinbox; it failed with the above debug log. I'm running Mojave on the host and using VMware Virtual Disk Manager - build 10120384.

Relevant bit from logs, I think:

  + Installing the VMware Tools...
/dev/disk11             Apple_partition_scheme          
/dev/disk11s1           Apple_partition_map             
/dev/disk11s2           Apple_HFS                       /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_image_from_installer.NYCNFeM5/tools_mountpoint
  + Setting the KextPolicy to allow loading the VMware kernel extensions...
  + Configuring the primary user account...
  + Installing the default insecure vagrant ssh key...
  + Enabling password-less sudo...
  + Enabling sshd...
File Doesn't Exist, Will Create: /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_image_from_installer.NYCNFeM5/scratch_mountpoint/private/var/db/com.apple.xpc.launchd/disabled.plist
  + Enabling HiDPI resolutions...
  + Saving the image...
    - Detaching the image...
hdiutil: couldn't unmount "disk8" - Resource busy
    - hdiutil failed with non-zero exit code: 16. Sleeping and retrying...
    - Detaching the image...
"disk8" ejected.
• Creating VMDK from image...
  + Attaching the image...
  + Converting the image to VMDK format...
Creating disk 'macinbox.vmdk'

Received signal 11.
    - Error: /Applications/VMware Fusion.app/Contents/Library/vmware-vdiskmanager failed with non-zero exit code: 1

• Cleaning up...
• WARNING: Temporary files were not removed. Run this command to remove them:
• sudo rm -rf /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_vmdk_from_image.iyAmCeKN \
/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_image_from_installer.NYCNFeM5 \
/var/folders/s_/v8h64v21247dhp77n4fq7r215bd20r/T/macinbox_user_temp.2IphTjL0 \
/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/macinbox_root_temp.JHqPF9IC

Allow to set box version

As far as I understand, macinbox sets box version based on macOS version.

This is a bit inconvenient since the box version and OS version are not the same in general. I propose to change defaults to 1.0.0 or allow to specify the version as a parameter.

Colors are not reset properly

When running in a terminal configured with foreground color other than black, the current handing of colors is incorrect. The text color is set to black at the end of the script, even if that was not the original text color. On a black background, this makes the text invisible!

It looks like we need to use tput sgr0 to reset the color, instead of tput setaf 0, which sets it explicitly to black.

/vagrant doesn't exist, read-only?

I created a 10.15.2 box the other day with this tool, and today I tried to setup rsync-based /vagrant sharing like I had with other tools on 10.14 et al.

I have the following in my Vagrantfile.

  config.vm.synced_folder ".", "/vagrant", type: "rsync"

At boot, I get

==> default: Rsyncing folder: /Users/wolf/tmp/catalinatest/kicad-mac-builder/ci/10.15/ => /vagrant
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mkdir -p /vagrant

Stdout from the command:



Stderr from the command:

mkdir: /vagrant: Read-only file system

What's the right approach here? Disable SIP and create it and save? Should I use synthetic.conf?

Linting against, and introduction of, Rubocop Style Guide

Hi @bacongravy! Big fan of the project, so thanks for that.

I was curious if you would entertain a PR which would fairly drastically change the Ruby style written into the code to abide by Rubocop's 2.6.0 standards? There are ~1100 "violations" in its current state. I have already started working on a style update branch on my fork (down to ~600 "violations"), and would be happy to PR it over here if deemed to be amenable.

Cheers.

Error copying vagrant box

By default, boxes are copied to ~/.vagrant.d/boxes.

So when ~/.vagrant.d/boxes doesn't exist, we get the following error:

• Installing box...
  + Copying box to ~/.vagrant.d/boxes...
    - Error: ~/.vagrant.d/boxes not found

I see three solutions here:

  • Create the folder if not found
  • Use the VAGRANT_HOME env var
  • Use vagrant box add

Unexpected behavior when installer already in DMG

If you use https://github.com/munki/macadmin-scripts/blob/master/installinstallmacos.py to build DMGs for the installer, and mount those as the source for macinbox as /Volumes/Install macOS Mojave, the one created by macinbox ends up as /Volumes/Install macOS Mojave 1, and the first is the one that ends up being unmounted at the end of the process, leaving the other around...

Can the following features be implemented:

  • Check to see if the installer is already in a DMG, and skip creating a new DMG to store the installer.
  • Check where the new installer is mounted, and unmount that one.

Legal advice

Hi,

First, kudos and thanks for sharing this project ! 🎉

I take the liberty to open this tiny ticket just to open a discussion around potential legal issues. IANAL but, searching for a technology similar to containers on macOS, someone on a topic stated that there may be legal issues to virtualization (the topic is here and is pretty interesting even though the legal notice wouldn't apply to for OS-level virtualization apparently).

Apparently, as the macOS license states, there are a few limitations that apply to virtualization (on page 2):

B. Mac App Store License. If you obtained a license for the Apple Software from the Mac App Store or through an automatic download, then subject to the terms and conditions of this License and as permitted by the Services and Content Usage Rules set forth in the Apple Media Services Terms and Conditions (https://www.apple.com/legal/internet-services/itunes/) (“Usage Rules”), you are granted a limited, non-transferable, non-exclusive license

  • (i) ...
  • (ii) ...
  • (iii) to install, use and run up to two (2) additional copies or instances of the Apple Software within virtual operating system environments on each Mac Computer you own or control that is already running the Apple Software, for purposes of: (a) software development; (b) testing during software development; (c) using macOS Server; or (d) personal, non-commercial use.

The grant set forth in Section 2B(iii) above does not permit you to use the virtualized copies or instances of the Apple Software in connection with service bureau, time-sharing, terminal sharing or other similar types of services.

Given that a lot of people ( 🙋‍♂️ ) don't read legal notices, it may be useful to add a tiny paragraph to the README file to warn people about that. AFAIK, there is no similar project to yours that does such mention but I don't know whether that's intentional or not. Maybe, something along these lines could be useful:

Due to licensing limitations, you should not run more than two copies of macOS on the same Mac computer and limit their usage to software development, testing during software development, using macOS Server or personal/non-commercial use.

Be sure to checkout the software license agreements that applies to your macOS version for more information.

What do you think ? Does that make sense ?

Have a nice day !

macinbox stuck on Creating dynamic image

Trying to create a High Sierra image with the following command, leads to macinbox getting stuck at Creating dynamic image (already 15 hours...):

$ sudo macinbox --box-format virtualbox --name high-sierra-gui -m 8192 --installer /Applications/Install\ macOS\ High\ Sierra.app --no-fullscreen
• Checking macOS versions...
  + Warning: host OS version (10.14.5) and installer OS version (10.13.6) do not match
• Creating image from installer...
  + Creating and attaching wrapper disk image...
  + Creating and attaching a new blank disk image...
  + Installing macOS...
    - installer: 100% done 
  + Configuring the primary user account...
  + Installing the default insecure vagrant ssh key...
  + Enabling password-less sudo...
  + Enabling sshd...
  + Enabling HiDPI resolutions...
  + Saving the image...
• Creating VDI from image...
  + Copying the image...
  + Attaching the image...
  + Setting up EFI partition...
  + Converting the image to VDI format...
Converting from raw image file="/dev/disk4" to file="/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_vdi_from_image.4nHB0nLT/macinbox.vdi"...
Creating dynamic image with size 68719476736 bytes (65536MB)...

Any thoughts?

hdiutil failed with non-zero exit code: 16

Still debugging to try to figure out what's going on, but figured would post here in case anything obvious.
The command:

sudo macinbox --box-format vmware_fusion --name macos-10.14.3-1 --disk 60 --no-hidpi --debug

The part where it errors out:

Feb  9 18:33:37  installer[57575] <Notice>: Calling completion handler for 0x7fcff1800790

  + Configuring the primary user account...
  + Installing the default insecure vagrant ssh key...
  + Enabling password-less sudo...
  + Enabling sshd...
File Doesn't Exist, Will Create: /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_image_from_installer.LTbQT8AA/scratch_mountpoint/private/var/db/com.apple.xpc.launchd/disabled.plist
  + Saving the image...
    - Detaching the image...
"disk17" unmounted.
hdiutil: couldn't eject "disk17" - Resource busy
    - /usr/bin/hdiutil failed with non-zero exit code: 16. Sleeping and retrying...
    - Detaching the image...
"disk17" unmounted.
hdiutil: couldn't eject "disk17" - Resource busy
    - /usr/bin/hdiutil failed with non-zero exit code: 16. Sleeping and retrying...
    - Detaching the image...
"disk17" unmounted.
hdiutil: couldn't eject "disk17" - Resource busy
    - /usr/bin/hdiutil failed with non-zero exit code: 16. Sleeping and retrying...
    - Detaching the image...
"disk17" unmounted.
hdiutil: couldn't eject "disk17" - Resource busy
    - /usr/bin/hdiutil failed with non-zero exit code: 16. Sleeping and retrying...
    - Detaching the image...
"disk17" unmounted.
hdiutil: couldn't eject "disk17" - Resource busy
    - Error: /usr/bin/hdiutil failed with non-zero exit code: 16

• Cleaning up...
• WARNING: Temporary files were not removed. Run this command to remove them:
• sudo rm -rf /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_image_from_installer.LTbQT8AA \
/var/folders/nx/q112c5wx7vn_0bmv9vdhgp7hqpw449/T/macinbox_user_temp.E1zHpv3N \
/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/macinbox_root_temp.eIrucfbr

Not sure if hdiutil actually outputs anything, but would be nice to have bit more verbosity ... like what is the exact command that is being run?

Will post things as I find them.

'invalid byte sequence in US-ASCII'

When attempting to create a virtualbox mac box, for Catalina, from Catalina, the following issue occurs:

% sudo macinbox --box-format virtualbox --name vcpkg-eg-mac-base --disk 220 --memory 12000 --cpu 5 --full Vagrant --short vagrant --password vagrant --no-gui --no-auto-login --installer /Applications/Install\ macOS\ Catalina.app

Password:
_ Checking macOS versions...
_ Creating image from installer...
  + Creating and attaching wrapper disk image...

_ Cleaning up...
Traceback (most recent call last):                                                                                                                                                                        15: from /usr/local/bin/macinbox:23:in `<main>'                                                                                                                                                   14: from /usr/local/bin/macinbox:23:in `load'                                                                                                                                                     13: from /Library/Ruby/Gems/2.6.0/gems/macinbox-4.0.0/exe/macinbox:5:in `<top (required)>'                                                                                                        12: from /Library/Ruby/Gems/2.6.0/gems/macinbox-4.0.0/lib/macinbox/cli.rb:19:in `run!'                                                                                                            11: from /Library/Ruby/Gems/2.6.0/gems/macinbox-4.0.0/lib/macinbox/cli.rb:138:in `start'                                                                                                          10: from /Library/Ruby/Gems/2.6.0/gems/macinbox-4.0.0/lib/macinbox/cli.rb:138:in `chdir'                                                                                                           9: from /Library/Ruby/Gems/2.6.0/gems/macinbox-4.0.0/lib/macinbox/cli.rb:144:in `block in start'                                                                                                  8: from /Library/Ruby/Gems/2.6.0/gems/macinbox-4.0.0/lib/macinbox/logger.rb:17:in `info'                                                                                                          7: from /Library/Ruby/Gems/2.6.0/gems/macinbox-4.0.0/lib/macinbox/cli.rb:145:in `block (2 levels) in start'                                                                                       6: from /Library/Ruby/Gems/2.6.0/gems/macinbox-4.0.0/lib/macinbox/actions/create_image_from_installer.rb:45:in `run'                                                                              5: from /Library/Ruby/Gems/2.6.0/gems/macinbox-4.0.0/lib/macinbox/actions/create_image_from_installer.rb:72:in `create_wrapper_image'                                                             4: from /Library/Ruby/Gems/2.6.0/gems/macinbox-4.0.0/lib/macinbox/logger.rb:17:in `info'                                                                                                          3: from /Library/Ruby/Gems/2.6.0/gems/macinbox-4.0.0/lib/macinbox/actions/create_image_from_installer.rb:77:in `block in create_wrapper_image'                                                    2: from /Library/Ruby/Gems/2.6.0/gems/macinbox-4.0.0/lib/macinbox/virtual_disk.rb:50:in `attach'                                                                                                  1: from /Library/Ruby/Gems/2.6.0/gems/macinbox-4.0.0/lib/macinbox/virtual_disk.rb:20:in `set_devices'
/Library/Ruby/Gems/2.6.0/gems/macinbox-4.0.0/lib/macinbox/virtual_disk.rb:20:in `[]': invalid byte sequence in US-ASCII (ArgumentError)

When I set LANGUAGE = LC_ALL = LANG = 'en_US.UTF-8', then the process succeeds; is there a way to make sure it always runs in utf-8 mode?

VirtualBox VM hangs waiting for DSMOS on Mac Pro (Late 2013)

Thank you for adding support for virtual box, but the created image is not starting from Mac Pro (Late 2013) host machine.
It fails after the message "Waiting for DSMOS" (it's not throwing any error but never boots )

From Mac Book Pro, VM is up and running.

vmware_fusion box settings not loaded by vmware_desktop provider

After updating to the vagrant-vmware-desktop (2.0.1) plugin from the old vagrant-vmware-fusion (5.0.4) plugin I discovered that the gui = true setting was no longer being honored. It appears that the new vmware_desktop provider does not read the settings in vmware_fusion blocks in box Vagrantfiles.

virtualbox: Mojave box does not boot on 2020 Macbook

So far I've created Catalina VMs on a Catalina host, and everything works fine. Now I tried to create a Mojave box inside a Mojave VM (manually installed, VMWare Fusion). The VM creation seems to work fine, but when importing the box on the Catalina host and trying run it, it hangs at boot. The last output is

...
Start InitBootStruct

root device uuid is '396DAA8C-A9B4-4762-98A7-B334C047EACB`
EndInitBootStruct
Start LoadRAMDisk
End LoadRAMDisk
Start FinalizeBootStruct
Start RandomSeed
End RandomSeed

I've created the box as follows:

Downloaded the Mojave installer manually via the "GET" link in the app store page (that's 10.14.6 + latest security fixes). Once the download is completed, I ran

bundle exec macinbox --verbose --box-format virtualbox --no-fullscreen --memory 4096 --disk 256 --name mojave --installer "/Applications/Install macOS Mojave.app"
vagrant box repackage mojave virtualbox 10.14.6

Is this anything already seen before? I'm not sure if the host system matters, I don't have a mojave host available to test with.

Software installed with user-script isn't available after boot

Hey!

thanks for creating this, it's been pretty awesome so far.

I'm using:

  • Parallels
  • An install-tools.sh script (which is executable) to install homebrew and Chef

I'm checking the software is available using command -v brew and it succeeds. However, when doing a vagrant up of the machine, brew isn't actually on the machine 🤔

VMware Tools not installed properly in Catalina box

Running macinbox on Catalina successfully creates a Vagrant box in vmware_desktop format but when the box boots up the OS reports an error loading the VMware Tools kernel extension. Besides the error message, the failure to load the kernel extension results in the screen resolution being stuck at 1024x768, and shared folders not working.

Using VMware Fusion's menu command Virtual Machine > Reinstall VMware Tools after the box boots successfully resolves the issue.

Allow building boxes with SIP disabled

Sometimes you need to test or verify something, and SIP gets in your way. It would be useful to be able to quickly spin up a VM with SIP pre-disabled.

The SIP setting is stored in NVRAM, so it may be possible to generate an appropriate .nvram file and drop it into the box at creation time, without having to boot the image at all.

Idea for Kickstart fix

This worked until 10.14

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -off -restart -agent -privs -all -allowAccessFor -allUsers

Apple broke it:

Warning: macos 10.14 and later only allows control if Screen Sharing is enabled through System Preferences.

Any idea how to fix this with one of our pre-scripts?

Catalina 10.15.4 issue - machine fails to boot with startup error

Error message below. WHat other information might you need to debug this?

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'macinbox'...
==> default: Generating MAC address for NAT networking...
==> default: Setting the name of the VM: 2-vagrant-files_default_1586646461190_52216
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'paused' state. Please verify everything is configured
properly and try again.

If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run vagrant up while the
VirtualBox GUI is open.

The primary issue for this error is that the provider you're using
is not properly configured. This is very rarely a Vagrant issue.

Error trying to use macOS 10.14 Mojave installer

Running macinbox on macOS 10.14 Mojave and pointing it at the Mojave installer app fails:

$ macinbox --installer /Applications/Install\ macOS\ Mojave.app
• Creating image from installer...
  + Checking macOS versions...
  + Creating and attaching a new blank disk image...
  + Installing macOS...
    - installer: 0% done [|                                                                                                              ]
Errno::ENOENT: No such file or directory @ rb_sysopen - /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/create_image_from_installer.erXa7PnW/scratch_mountpoint/private/etc/rc.installer_cleanup

Re-running with debug reveals that the call to installer is failing:

Sep 30 19:35:35  installer[3157] <Info>: mountDiskImageWithURLString: (null)
Sep 30 19:35:35  installer[3157] <Error>: mountDiskImageWithPath is NOT valid, not attempting to mount
Sep 30 19:35:35  installer[3157] <Error>: Couldn't mount the payload dmg ((null)): Error Domain=com.apple.osinstall Code=-34 "An error occurred while loading the installer resources." UserInfo={NSLocalizedDescription=An error occurred while loading the installer resources.}

This same issue has also been observed in AutoDMG #222 and referenced by @tvsutton and @mikeymikey on Twitter.

Allow to specify VRAM amount

In addition to CPU and memory, it would be useful to be able to specify the amount of VRAM, since the default value (at least for Parallels) is quite low.

It should be fairly straightforward to implement, again, for Parallels it would be:

prl.customize ["set", :id, "--videosize", "256"]

This would set VRAM to 256 MB.

the vm(format .pvm) created using macinbox boot more slowly than created using parallels

this tool largely addresses the time we spent creating the vm, thanks!!!! I came across,the vm(format .pvm) created using macinbox boot more slowly than created using parallels,comparing the two configurations (CPU, memory, hard disk) results are the same, but the vm which created using 'macinbox' size is less than the other one, are there any system configuration files that are not pre-installed? are there any suggestions to improve the problem?

NoTTY error when using ansible

I am using ansible to run macinbox.

However there is a problem.

It fails in lib/macinbox/task.rb:19

columns = STDOUT.winsize[1] - 8 # there is no winsize on a noTTY

I suggest adding a "--silent" option or detecting if it's a notty.

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.