Formatted

This commit is contained in:
butomo1989 2018-06-19 00:01:33 +02:00
parent 59bf049159
commit 09068f20c5

View file

@ -243,12 +243,12 @@ $ brew install docker-machine-parallels
2. Create a virtual machine for running docker images based on the virtual machine tool you use
Create a virtual machine of VMWare Fusion
2.1. Create a virtual machine of VMWare Fusion
```bash
$ docker-machine create --driver=vmwarefusion vmware-dev
```
Create a virtual machine of Parallels Desktop
2.2. Create a virtual machine of Parallels Desktop
```bash
$ docker-machine create --driver=parallels prl-dev
```
@ -257,47 +257,46 @@ This utility `docker-machine-parallels` will fetch boot2docker.iso to create a v
3. Setup the virtual machine for nested virtualization support
Shutdown the vm by running the command below in the boot2docker vm before you setup it.
3.1. Shutdown the vm by running the command below in the boot2docker vm before you setup it.
```bash
# shutdown -h now
```
If you use VMWare Fusion, go to menu bar > Vitual Machine > Settings > Processors and Memory, expand Advanced options, and select `Enable hypervisor applications in this virtual machine`.
[![Enable nested virtualization for VMWare Fusion](images/vmwarefusion_enable_nested_virtualization.png)]
![Enable nested virtualization for VMWare Fusion](images/vmwarefusion_enable_nested_virtualization.png)
If you use Parallels Desktop, open settings screen of that vm and go to `CPU & Memory` under `hardware` tab, expand Advanced settings and select `Enable nested virtualization`.
[![Enable nested virtualization for Parallels Desktop](images/parallels_enable_nested_virtualization.png)]
![Enable nested virtualization for Parallels Desktop](images/parallels_enable_nested_virtualization.png)
4. Enable kvm inside virtual machine
Run as an account other than root to install kvm packages using tce-load.
4.1. Run as an account other than root to install kvm packages using tce-load.
```bash
# su docker
$ tce-load -wi kvm
```
Run as root to load kvm module after kvm packages install.
4.2. Run as root to load kvm module after kvm packages install.
```bash
$ sudo modprobe kvm_intel
```
Check if the kvm device is loaded.
4.3. Check if the kvm device is loaded.
```bash
$ ls /dev/kvm
```
Check if your CPU supports hardware virtualization now
4.4. Check if your CPU supports hardware virtualization now
```bash
$ egrep -c '(vmx|svm)' /proc/cpuinfo
```
If **0** it means that your CPU doesn't support hardware virtualization.
If **1** or more it does - but you still need to make sure that virtualization is enabled in the BIOS.
5. You may now run a docker container
Let's run a docker image for an emulator with x86 processor.
5.1. Let's run a docker image for an emulator with x86 processor.
```bash
docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S6" --name android-container butomo1989/docker-android-x86-7.1.1
```