Thursday, September 28, 2017

First Impressions of Anka Run/Flow

I recently found out about Anka Run/Flow, which uses macOS' native Hypervisor.Framework and includes Veertu's proprietary tools for working with virtual environments. Simplest way I'd describe it would be Docker for macOS guests. Haven't seen much media coverage of it, so here's my quick mini-review/setup of it.

(Most of these commands can also be found at: https://ankadoc.bitbucket.io/)

First, grab the Anka installer here: https://veertu.com/download-anka-run/ Install it, and get a 30-day trial key from: https://veertu.com/anka-run-trial/

mbp~ dave$ sudo anka license activate 2093-7122-6646-6940
Password:
License activated
mbp:~ dave$ anka license show
+---------------------+---------------------+
| license_type        | com.veertu.anka.run |
+---------------------+---------------------+
| status              | valid               |
+---------------------+---------------------+
| expires             | 28-oct-2017         |
+---------------------+---------------------+
| max_number_of_cores | 32                  |
+---------------------+---------------------+

You'll need to download a macOS installer to use as the VM base. This method will automatically install/include the needed paravirtual drivers, unlike the AutoDMG and ISO method (which requires manual intervention after).



When creating the first VM on a High Sierra host, you'll get a few warnings about blocked extensions. Go to "Security & Privacy" as usual and unblock them as needed.

mbp:~ dave$ anka create --ram-size 3G --cpu-count 4 --disk-size 20G --app /Applications/Install\ macOS\ High\ Sierra.app highsierra
Installing macOS 10.13...
Copying addons... 100.%
Converting to ANKA format...
20480+0 records in
Preformatting hard drive
vm created successfully with uuid: 4c4c7b33-a452-11e7-821e-7a008970c401

For High Sierra guests, a few more commands are needed on the first boot.

mbp:~ dave$ anka start highsierra
+-----------------------+--------------------------------------+
| uuid                  | 4c4c7b33-a452-11e7-821e-7a008970c401 |
+-----------------------+--------------------------------------+
| ram                   | 3G                                   |
+-----------------------+--------------------------------------+
| name                  | highsierra                           |
+-----------------------+--------------------------------------+
| cpu_cores             | 4                                    |
+-----------------------+--------------------------------------+
| hard_drive            | 20 GB (9493893120 bytes on disk)     |
+-----------------------+--------------------------------------+
| status                | running                              |
+-----------------------+--------------------------------------+
| vnc_connection_string | vnc://:[email protected]:5900     |
+-----------------------+--------------------------------------+
| view_vm_display       | anka view highsierra                 |
+-----------------------+--------------------------------------+
mbp:~ dave$ anka run highsierra sudo kextcache -system-prelinked-kernel
KernelCache ID: 7B35CF37ACB0190023E5D78FEAC2684C
mbp:~ dave$ anka stop highsierra
VM highsierra is shutting down

Now, here's my one negative comment: VNC is listening on 0.0.0.0 by default.. There's two ways to fix that:

mbp:~ dave$ # Option 1: Bind VNC to 127.0.0.1.
mbp:~ dave$ \
UUID=$(anka --machine-readable list | python -c 'import json,sys;obj=json.load(sys.stdin); print obj["body"][0]["uuid"];') && sed -i '' 's/vnc_ip: 0.0.0.0/vnc_ip: 127.0.0.1/' "$(anka config -l vm_lib_dir)"/${UUID}/${UUID}.yaml && UUID=""

mbp:~ dave$ anka modify highsierra set vnc 0 # Option 2, disable VNC completely
the following properties were set successfully:
vnc set to 0

You can now start up the VM and connect to it.


The syntax is similar to Docker and is self-explanatory.

mbp:~ dave$ anka run highsierra uname -a
Darwin Mac-mini.local 17.0.0 Darwin Kernel Version 17.0.0: Thu Aug 24 21:48:19 PDT 2017; root:xnu-4570.1.46~2/RELEASE_X86_64 x86_64

Positives:
  • Extremely simple and intuitive command line interface (takes <15 minutes from install to a fully working VM).
  • Guest VM install process is completely automated.
  • Supports real USB devices (will test in a future blog post).
  • Feels much faster than VMware Fusion (will test and confirm in a future blog post).
  • Optional Anka Registry for maintaining macOS images (will test in a future blog post).
Negatives:

No comments:

Post a Comment