Содержание
Virtualbox
Wiki: тут>>>.
Virtualbox CLI: тут>>>.
Пример создания VM: тут>>>.
Устанавливаем Virtualbox:
$ sudo pacman -S virtualbox resolving dependencies... :: There are 2 providers available for VIRTUALBOX-HOST-MODULES: :: Repository community 1) virtualbox-host-dkms 2) virtualbox-host-modules-arch ... Packages (4) dkms-2.3-1 sdl-1.2.15-7 virtualbox-host-dkms-5.1.12-1 virtualbox-5.1.12-1 ...
Проверяем модули, которые будут загружены ядром:
$ cat /usr/lib/modules-load.d/virtualbox-host-dkms.conf vboxdrv vboxpci vboxnetadp vboxnetflt
Устанавливаем зависимости (только для virtualbox-host-dkms
):
$ sudo pacman -S linux-headers ... (1/1) Install DKMS modules ==> dkms install vboxhost/5.1.12_OSE -k 4.8.13-1-ARCH
Пробуем – получаем ошибку (т.к. не было перезагрузки системы):
$ virtualbox WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (4.8.13-1-ARCH) or it failed to load. Please recompile the kernel module and install it by sudo /sbin/vboxconfig You will not be able to start VMs until this problem is fixed. Qt WARNING: libpng warning: iCCP: known incorrect sRGB profile
Проверяем уже загруженные модули:
$ lsmod | grep vbox | wc -l 0
Загружаем модуль vboxdrv
:
$ sudo modprobe vboxdrv $ lsmod | grep vbox vboxdrv 385024 0
Запускаем:
$ virtualbox
Готово.
Vagrant
Wiki: тут>>>.
Устанавливаем:
$ sudo pacman -S vagrant
Проверяем:
$ vagrant init ubuntu/trusty64 A `Vagrantfile` has been placed in this directory. You are now ready to `vagrant up` your first virtual environment! Please read the comments in the Vagrantfile as well as documentation on `vagrantup.com` for more information on using Vagrant.
$ vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Box 'ubuntu/trusty64' could not be found. Attempting to find and install... ... default: Guest Additions Version: 4.3.36 default: VirtualBox Version: 5.1 ==> default: Mounting shared folders... default: /vagrant => /tmp
$ vagrant ssh Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-105-generic x86_64) ... vagrant@vagrant-ubuntu-trusty-64:~$
Готово.
Docker
Wiki: тут>>>.
Устанавливаем:
$ sudo pacman -S docker
Запускаем и добавляем в автостарт:
$ sudo systemctl start docker.service $ sudo systemctl enable docker.service Created symlink /etc/systemd/system/multi-user.target.wants/docker.service -> /usr/lib/systemd/system/docker.service.
Проверяем:
$ sudo docker info Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 0 Server Version: 1.12.3 ...
Добавляем пользователя в группу docker
:
$ sudo gpasswd -a setevoy docker Adding user setevoy to group docker
Проверяем:
$ newgrp docker $ docker info Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 0 Server Version: 1.12.3 ...
$ docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world c04b14da8d14: Pull complete Digest: sha256:0256e8a36e2070f7bf2d0b0763dbabdd67798512411de4cdcf9431a1feb60fd9 Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. ...
Готово.