Skip to content

Commit

Permalink
Merge pull request #187 from lemberg/issue/178-slow-machine-boot
Browse files Browse the repository at this point in the history
Slow VM boot using newer VirtualBox versions
  • Loading branch information
T2L committed Apr 16, 2020
2 parents 35b2922 + e9ed94b commit 92da967
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Updates:

Fixes:

- [GH-178](https://github.com/lemberg/draft-environment/issues/178) - Fix issue with slow VM boot using newer versions of VirtualBox (issue is related to the ttys0)
- [GH-177](https://github.com/lemberg/draft-environment/issues/177) - Add `.gitattributes` file and configure git to export production code only
- [GH-176](https://github.com/lemberg/draft-environment/issues/176) - Make this project less dependent on other packages:
* Support Symfony 5
Expand Down
23 changes: 19 additions & 4 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,25 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Allow creation of symlinks in VirtualBox shared folders (works with both
# VirtualBox shared folders and NFS).
v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/" + configuration.get("vagrant.base_directory"), "1"]
# When using the Vagrantbox ubuntu/xenial64 you will have a file
# ubuntu-xenial-16.04-cloudimg-console.log after the start. Get rid of it.
# Thanks to https://betacloud.io/get-rid-of-ubuntu-xenial-16-04-cloudimg-console-log/
v.customize ["modifyvm", :id, "--uartmode1", "disconnected"]
# Enable multiple cores in Vagrant/VirtualBox.
v.customize ['modifyvm', :id, '--ioapic', 'on']
# Disable Audio.
v.customize ['modifyvm', :id, '--audio', 'none']
# Set recommended Graphics Controller.
v.customize ['modifyvm', :id, '--graphicscontroller', 'vmsvga']

# The VM is configured with console=ttyS0 as one of the kernel parameters
# (/etc/default/grub -> GRUB_CMDLINE_LINUX_DEFAULT) which causes a
# dependency with the serial port. If the serial port is enabled but not
# connected (the default state) then the boot is slow. Disabling the serial
# port makes the boot fast until something needs to be written to the port
# and that's when things get stuck. Workaround is to redirect output to the
# NULL file.
#
# See:
# - https://forums.virtualbox.org/viewtopic.php?f=6&t=92832#p448121
# - https://bugs.launchpad.net/cloud-images/+bug/1829625
v.customize ["modifyvm", :id, "--uartmode1", "file", File::NULL]

# Tune the guest additions time synchronization parameters.
# See https://www.virtualbox.org/manual/ch09.html#changetimesync
Expand Down

0 comments on commit 92da967

Please sign in to comment.