MediaWiki-Vagrant/Troubleshooting

Puppet failures
If Puppet fails to configure your machine,

This error may be caused by run-time failure to connect to Ubuntu package repositories or Gerrit. In such cases, you can simply trigger another Puppet run by running.

If your problem persists, collect detailed information using  and attach to a new bug report in Phabricator.

Vagrant / VirtualBox failures
In general, Vagrant and VirtualBox get along quite well. Once in a blue moon, a VM crash in a way that causes Vagrant to lose the ability to manage the machine or inspect its status. If this should happen, you can usually fix things by running VirtualBox's management console and rebooting the machine there.

Some users may see an error:

VT-x features locked or unavailable in MSR. (VERR_VMX_MSR_LOCKED_OR_DISABLED). Result Code: NS_ERROR_FAILURE (0x80004005)

upon trying to bring up the MediaWiki VM.

Click settings, accept the recommended change, and discover that the VM image is 40G in size and a FAT filesystem only supports files up to 16G in size. VirtualBox suggests a filesystem such as ext3 with sufficient size for image files.

Connection failures
If you try to connect to http://localhost:8080 and you can't connect:
 * Is your Vagrant VM up and running?
 * Do you have any other proxies setup on port 8080?
 * Are there any other browser add-ons, plugins, or proxies wired up that could interfere with connections to localhost?
 * Do you have the Xdebug settings in place, but no tool to intercept the Xdebug connect back calls for PHP scripts?
 * Have you tried...
 * From within a  session,  ?
 * From your host a  and  ?
 * Stashing any file changes you've made in the code and running the pristine code?

Updating guest additions
After updating mediawiki-vagrant to the latest version, you might get a random error like "The following SSH command responded with a non-zero exit status." To fix this, you should update your guest additions. vagrant ssh update-guest-additions cd /tmp sudo su #need to be root cd guest-additions.* # the ending is going to be some random string of characters ./VBoxLinuxAdditions.run install

The last command may end with "Installing the Window System drivers ...fail!", but that's ok. Now you should log out of vagrant, and run  and  !

If vagrant is slow
Vagrant uses VirtualBox to operate a virtual machine that runs the Ubuntu operating system plus the Apache web server, the MediaWiki PHP code, a database, the memcache memory cache, etc., all on your host computer. It's doing a lot! You should open the VirtualBox Manager on your host computer and review its settings for the MediaWiki vagrant instance; sometimes it will offer advice for improved performance. Note that in order to change some VirtualBox settings, vagrant must not be running; issue   on your host computer to halt it.

Improving VirtualBox performance is a huge topic beyond the scope of this article. However, one change is simple. If you have a recent computer with a multi-core CPU, you can probably allow Vagrant to use multiple CPUs. In VirtualBox Manager, Go to Settings > System > Processor for the Vagrant VM. Ensure the VM is allowed to use 2 or more processors (2 is recommended); this may already be set. Under Settings -> System -> Motherboard, check "Enable IO APIC". VirtualBox Manager may note that it will check it automatically. Click OK to save. These manual steps will not be necessary in the future, after bug 51473 is fixed.