Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VirtualBox stuck after the restart #72

Closed
ffittschen opened this issue Aug 23, 2016 · 21 comments
Closed

VirtualBox stuck after the restart #72

ffittschen opened this issue Aug 23, 2016 · 21 comments

Comments

@ffittschen
Copy link

Hi,
I created the iso using the prepare_iso.sh script and then ran

packer build \
    -var iso_url=OSX_InstallESD_10.11.6_15G31.dmg \
    -var autologin=true \
    -only virtualbox-iso \
    template.json

The box successfully started and installed OS X, but after the restart it got stuck at

hfs: created HFBT on Macintosh HD

screen shot 2016-08-23 at 17 04 47

packer then always times out waiting for the SSH connection.

Do you know what could cause this / how I can fix it to successfully build the vagrant box?

@xaocon
Copy link

xaocon commented Aug 25, 2016

I'm having the same problems. Has it ever worked for you before? This is my first attempt at using it so I'm not sure if it's a bug or something that I'm doing wrong.

@ffittschen
Copy link
Author

@xaocon This is also my first attempt to use it. But after a few unsuccessful attempts, I tested the same setup with the trial version of VMWare (using -only vmware-iso instead of -only virtualbox-iso) and it worked like a charm on the very first try. But to use the created VMWare Vagrant box you also need the VMWare vagrant driver, which you have to buy additionally to VMWare... And I don't need VMWare for my use case. Virtualbox would do just fine...

@mattieb
Copy link
Contributor

mattieb commented Aug 25, 2016

@ffittschen @xaocon Have you checked the caveats for VirtualBox support? https://github.com/timsutton/osx-vm-templates#virtualbox-support

I haven't built a new box in some time, but I was able to successfully do it on 10.11.4.

@ffittschen
Copy link
Author

@Zigg Yes, I added the -D DISABLE_REMOTE_MANAGEMENT flag during iso preparation and I installed the VirtualBoy Extension Pack

@rickard-von-essen
Copy link

If you're thinking about buying VMware Fusion compare it to Parallels
Desktop for Mac. The Vagrant provider for PD is free.

On Thu, Aug 25, 2016, 19:21 Florian Fittschen notifications@github.com
wrote:

@Zigg https://github.com/zigg Yes, I added the -D
DISABLE_REMOTE_MANAGEMENT flag during iso preparation and I installed the
VirtualBoy Extension Pack


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#72 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAiCg4RO5DN0HQJHxxgwWd-jTp5K1Dy5ks5qjc8fgaJpZM4JrDgK
.

@timsutton
Copy link
Owner

Is this using VirtualBox 5.1.x? I can say that I haven't tested any of the vbox support on that version, only 5.0.x.

@ffittschen
Copy link
Author

@timsutton Yes I tried it with VirtualBox 5.1.4

@mattieb
Copy link
Contributor

mattieb commented Sep 6, 2016

I don't see myself having time to troubleshoot this one in the near future, so I would encourage whoever is interested in seeing it work in VirtualBox to try building out a DMG and seeing if a manual installation works (see https://gist.github.com/zigg/d6e0aa895b30106967f0 https://gist.github.com/zigg/d6e0aa895b30106967f0 for a gist that I used to do this) and narrow down what might be failing that way.

Fair warning: it can be pretty time-consuming, and OS X fixes do not seem to be a high priority for VirtualBox (cf. https://www.virtualbox.org/ticket/14844 https://www.virtualbox.org/ticket/14844).

@xaocon
Copy link

xaocon commented Sep 6, 2016

Confirmed that mine works once downgraded to VirtualBox 5.0.26.

@timsutton
Copy link
Owner

Have a confirmation from someone running a Sierra guest with VBox 5.1.2, using these additional commands:

VBoxManage modifyvm "macOS Sierra" --cpuidset 00000001 000306a9 04100800 7fbae3ff bfebfbff
VBoxManage setextradata "macOS Sierra" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "MacBookPro11,3"
VBoxManage setextradata "macOS Sierra" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "macOS Sierra" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
VBoxManage setextradata "macOS Sierra" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "macOS Sierra" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
VBoxManage setextradata "macOS Sierra" VBoxInternal2/EfiGopMode 4```

Perhaps someone interested would like to test these out!

@mattieb
Copy link
Contributor

mattieb commented Sep 28, 2016 via email

@timsutton
Copy link
Owner

Me too. Just thought there may be something specific in terms of CPU
instructions like what we saw before.

On Wed, Sep 28, 2016 at 12:45 PM, Matt Behrens notifications@github.com
wrote:

I'm hoping that entire configuration is not required.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#72 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHSPpwm4lThEaK2rgj7_yUkW_Le8YYyks5qupmYgaJpZM4JrDgK
.

@mattieb
Copy link
Contributor

mattieb commented Sep 28, 2016

I'm trying a few build variations in the background this afternoon.

@mattieb
Copy link
Contributor

mattieb commented Sep 28, 2016

Neither the complete set of tweaks above nor a few variations work. I'm staring at a box stuck after reboot in exactly the same place right now.

On top of that, on occasion the box didn't even reboot into its first post-install boot. 😞

@timsutton
Copy link
Owner

Looks like there's another project claiming to have a Mac guest working with 5.1.x: https://github.com/geerlingguy/macos-virtualbox-vm, which on first glance looks to be just setting cpuidset. Not using Packer though, perhaps there's some other difference I'm not seeing there.

@mattieb
Copy link
Contributor

mattieb commented Oct 1, 2016

I (or someone else) probably needs to spend a little time with a basic DMG install and see if anything we're doing is tripping a VirtualBox bug, like Remote Management has in the past.

@drodriguez
Copy link

drodriguez commented Oct 11, 2016

I can confirm downgrading to 5.0.26 make the problem disappear (mine was stopping a little earlier than the screenshot, in the line "VM Swap Subsystem is ON”).

@Zigg with the “manual installation” you mean creating the DMG with the gist you provided above and click through the graphical installation? I might be able to try that later (I want to try if the working box works when I upgrade VirtualBox after the creation, or I need to keep the version frozen).

timsutton referenced this issue in bitrise-io/osx-vm-templates Oct 18, 2016
@awgeorge
Copy link

awgeorge commented Feb 6, 2017

f933ff5 - Fixes this issue.

@timsutton
Copy link
Owner

I also see someone else has implemented the same thing here: the-mx-group@e59a77f

@mattieb
Copy link
Contributor

mattieb commented Mar 9, 2017

That's fine with me if people would like to go that way. It will mean VirtualBox VMs won't be able to support USB 2.0 devices, but that's probably not a particularly common use case.

Unfortunately, I don't have time to make that PR, so I'd encourage someone on this issue who has a good solution in hand to make that PR. Don't forget to update the documentation to note that we no longer need to install the extension pack.

@timsutton timsutton reopened this Mar 10, 2017
@timsutton
Copy link
Owner

Reopening as a reminder to myself to update the Vbox docs for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants