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 VM freezes periodically #43

Closed
mattieb opened this issue Nov 5, 2015 · 3 comments
Closed

VirtualBox VM freezes periodically #43

mattieb opened this issue Nov 5, 2015 · 3 comments

Comments

@mattieb
Copy link
Contributor

mattieb commented Nov 5, 2015

This is a strange one, and I'm trying to figure it out, but I'm coming up somewhat empty-handed.

A new El Capitan VM built using the Packer template for VirtualBox will freeze for ~5 seconds every ~10 seconds, making interactive use somewhat troublesome. However, VirtualBox's OS X support is not necessarily broken outright.

Here's what I've observed:

  • If I build a straight DMG using these steps and VirtualBox's default OS X 10.11 configuration, the resulting VM does not freeze at all.
  • If I modify the Packer template to build a machine that more closely resembles VirtualBox's default configuration, the resulting box still freezes. (I've diffed the .vbox files—they're pretty much identical save UUIDs and names of things.)
  • The VM does not appear to freeze during the initial installation from the installation media. You can see the freezing if you swirl your mouse around inside the VM's console window for >10 seconds.
  • I noticed that shrink.sh is failing due to System Integrity Protection not allowing dynamic_pager to be unloaded, but if I attempt to build a box with these lines commented out, the resulting box still freezes.

It seems that something installed in the prepare_iso process is responsible, since the freezing is in play even before Packer starts running the scripts in scripts. But I've gone over what prepare_iso adds and I'm not sure what could be causing it.

Has anyone seen this or does anyone have any ideas what might be at fault? I'm currently looking over pkg-postinstall to see if anything looks suspicious.

@timsutton
Copy link
Owner

Just to confirm, you're not crazy. I can reproduce the freezing issue with a Packer build. Didn't try doing a "regular" build like you did - I'm a mostly-happy VMware Fusion user, so I rarely test the Vbox support except for major new releases.

My machine is an iMac14,3 i7 (Haswell).

I also noticed that SIP issue with the dynamic pager and will correct that with an if statement soon.

Hard to see what in the postinstall would be doing anything. My first thought was perhaps ARD or SSH support, but disabling those in the sysprefs doesn't seem to have any effect.

@mattieb
Copy link
Contributor Author

mattieb commented Nov 7, 2015

I'd tried disabling ARD too, didn't fix it on this end either. I'm on a MacBookPro11,3, also Haswell I believe?

Today I've been trying to use the disk image from prepare_iso.sh to install. Results:

  • Running the standard disk image through VirtualBox installs fine, but the result freezes much like it did during the Packer run. So it seems Packer isn't our problem here.
  • Building a new disk image with pkg-postinstall replaced with a shell script that does nothing makes me stare at all the setup assistants, but the result is not freezing. On this box, I've tried enabling Screen Sharing and Remote Login as well as enabling crash submission—no freezing. Hm.

I'll keep at it…

@mattieb
Copy link
Contributor Author

mattieb commented Nov 7, 2015

Progress.

--- a/prepare_iso/support/pkg-postinstall
+++ b/prepare_iso/support/pkg-postinstall
@@ -19,7 +19,7 @@ else
     $PlistBuddy -c 'Add :com.apple.screensharing:Disabled bool False' "$OVERRIDES_PLIST"
 fi
 # Placeholder for Remote Management
-echo "enabled" > "$3/private/etc/RemoteManagement.launchd"
+#echo "enabled" > "$3/private/etc/RemoteManagement.launchd"

 # Add user to sudoers
 cp "$3/etc/sudoers" "$3/etc/sudoers.orig"

I'm doing the full Packer run now, but I didn't get a freeze on the manual build using this.

How to roll this in is another question. Maybe add some flags to prepare_iso that make it possible to avoid this step?

And, of course, I have no idea why this is a problem in the first place.

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

2 participants