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 this doesn't work, you can try running  to trigger recreation of the virtual machine instance.

If your problem persists, please file a bug, and (if possible) attach a copy the output of the failed run.

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 if you have a recent computer with a multi-core CPU, you can probably allow Vagrant to use multiple CPUs (Settings > System > Processor) which should improve its performance.