Tim Landscheidt has uploaded a new change for review. https://gerrit.wikimedia.org/r/280785
Change subject: Add support for libvirt (KVM/QEMU) ...................................................................... Add support for libvirt (KVM/QEMU) Bug: T71223 Change-Id: I64a4af3a8b6fa3a7571f48281044ce9776eb204b --- M README.md M Vagrantfile A support/README-libvirt.md 3 files changed, 52 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/85/280785/1 diff --git a/README.md b/README.md index ab11485..53a6a12 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,10 @@ You'll need to install recent versions of Vagrant and VirtualBox. -(Note that *experimental* support for Parallels, LXC, VMWare Fusion, and -Microsoft Hyper-V providers exists. See `support/README-lxc.md` or -`support/README-parallels.md` for details on the former two.) +(Note that *experimental* support for Parallels, LXC, libvirt +(KVM/QEMU), VMWare Fusion, and Microsoft Hyper-V providers exists. +See `support/README-libvirt.md` `support/README-lxc.md` or +`support/README-parallels.md` for details on the former three.) * VirtualBox: https://www.virtualbox.org/wiki/Downloads * Vagrant: https://www.vagrantup.com/downloads-archive.html (the version must be diff --git a/Vagrantfile b/Vagrantfile index 5e27203..7d798cd 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -116,6 +116,13 @@ override.vm.network :private_network, ip: settings[:static_ip] end + # libvirt (KVM/QEMU) provider. Enable with `--provider=libvirt`. + config.vm.provider :libvirt do |_libvirt, override| + override.vm.box = 'trusty-cloud' + + override.vm.network :private_network, ip: settings[:static_ip] + end + config.vm.network :forwarded_port, guest: 80, host: settings[:http_port], host_ip: settings[:host_ip], id: 'http' @@ -192,6 +199,12 @@ lxc.customize 'cgroup.memory.limit_in_bytes', "#{settings[:vagrant_ram]}M" end + config.vm.provider :libvirt do |libvirt| + libvirt.driver = 'qemu' + libvirt.memory = settings[:vagrant_ram] + libvirt.cpus = settings[:vagrant_cores] + end + config.vm.provision :lsb_check do |lsb| lsb.version = '14.04' end diff --git a/support/README-libvirt.md b/support/README-libvirt.md new file mode 100644 index 0000000..bbdaf77 --- /dev/null +++ b/support/README-libvirt.md @@ -0,0 +1,35 @@ +# Using libvirt (KVM/QEMU) with MediaWiki-Vagrant # + +libvirt is a virtualization API. It supports multiple backends +(hypervisors), including KVM/QEMU. + + + +## Setup ## + +Running MediaWiki-Vagrant in KVM/QEMU under libvirt requires to +install the libvirt Vagrant plugin. In a Fedora system, you can just +install the package vagrant-libvirt. + +In addition you need convert the Ubuntu Trusty VirtualBox box that +MediaWiki-Vagrant uses by default for the libvirt provider. To do +that: + +1. Install the mutate Vagrant plugin by "vagrant plugin install mutate". +2. Download the Ubuntu Trusty VirtualBox box by "vagrant box add + trusty-cloud + https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box". +3. Convert the box by "vagrant mutate trusty-cloud libvirt". + + + +## Use ## + + vagrant up --provider=libvirt + + + +## Caveats ## + + * Currently vagrant-libvirt does only support system VMs + (cf. https://github.com/pradels/vagrant-libvirt/issues/272). -- To view, visit https://gerrit.wikimedia.org/r/280785 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I64a4af3a8b6fa3a7571f48281044ce9776eb204b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Tim Landscheidt <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
