bacongravy / macinbox Goto Github PK
View Code? Open in Web Editor NEWPuts macOS in a Vagrant box
License: Other
Puts macOS in a Vagrant box
License: Other
The link in the readme to download the Catalina installer didn't work. This one from the Mac website did.
https://apps.apple.com/us/app/macos-catalina/id1466841314?ls=1&mt=12
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?
as the title says, it would be great to name the vmdk/vhd/etc files after the name of the box if one is passed in, instead of hardcoding macinbox.
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.
Hey!
thanks for creating this, it's been pretty awesome so far.
I'm using:
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 🤔
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.
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?
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.
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.
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:
vagrant box add
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 !
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.
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.
This is supposed to print the tool's version number.
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?
There is a 100% opensource driver for Vagrant <-> VMWare:
https://blog.kchung.co/mech-vagrant-with-vmware-integration-for-free/
This is the GIT Page:
It would be great to add a flag to create the '.box' file for each platform, rather than 'planting' the file for use.
(tar the files into a target filename, instead of copying them to .vagrant.d)
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.
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.
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
.
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.
After creating a Parallels Desktop macinbox using the default settings and up-ing a Vagrant environment, the VM appears in a window, when it should appear fullscreen.
--csr-disable would be so awesome
I only found this: https://www.imore.com/how-turn-system-integrity-protection-macos
But maybe there is a OSX'ish chroot?
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).
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 ----
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.
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]
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.
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?
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?
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!
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
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.
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"?
I will do a go/nogo installation with this
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.
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.
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?
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"
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.
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:
The commit that added Parallels Desktop support introduced a regression that affects VMware boxes. The boxes fail to boot:
Bringing machine 'default' up with 'vmware_fusion' provider...
==> default: Box 'macinbox' could not be found. Attempting to find and install...
how can I generate OVF format for virtualbox using macinbox.
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.
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...
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.
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)
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
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?
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>'
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.