Help us understand the problem. What is going on with this article?

Docker for Macの対応機種がわかりにくいので調べた

More than 3 years have passed since last update.

2010以降のモデルでも起動できない

Docker for Macの正式版が出たので、早速iMac(Mid 2010)にインストールした。

fatal.png

は?

docker.png

ほ?

手持ちのiMacにはi7 870が搭載されていて、これはVT-x、VT-d、EPTなどの拡張命令に対応しているはず。
http://ark.intel.com/ja/products/41315/

sysctlで見てみても、VMXの表示が確認できる。ほらやっぱり使えるんじゃんんん!!!!

$ sysctl -a | grep machdep.cpu.features
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 DTES64 MON DSCPL VMX SMX EST TM2 SSSE3 CX16 TPR PDCM SSE4.1 SSE4.2 POPCNT

Docker for Macの動作に必須なHypervisor Frameworkが使用可能かどうかも確認してみる。

$ sysctl kern.hv_support
kern.hv_support: 0

Oh...

unrestricted guestモードというやつの存在

Supported Hardware
Generally, machines with an Intel VT-x feature set that includes Extended Page Tables (EPT) and Unrestricted Mode are supported. You can determine the availability of Hypervisor APIs on a particular machine at runtime with the sysctl(8) command, passing kern.hv_support as an argument.
https://developer.apple.com/library/mac/documentation/DriversKernelHardware/Reference/Hypervisor/index.html

Hypervisor Frameworkの動作には、EPTとUnrestricted Modeの両方をサポートしている必要があるとのこと。

Wikipedia先生曰く…

Intel started to include Extended Page Tables (EPT),[22] a technology for page-table virtualization,[23] since the Nehalem architecture,[24][25] released in 2008. In 2010, Westmere added support for launching the logical processor directly in real mode – a feature called "unrestricted guest", which requires EPT to work.[26][27]
https://en.wikipedia.org/wiki/X86_virtualization

どうやらWestmere以降でないと、Unrestricted Guestモードに対応していないようだ。

対応/非対応機種まとめ

わかりにくいのでUnrestricted Guestモードの使用可否をまとめてみた。

MacBook MacBook Air MacBook Pro iMac Mac mini Mac Pro
2010 Mid NG - 15/17インチ - OK
13インチ - NG
i7 2.93GHz - NG
i5 2.8GHz - NG
上記以外 - OK
NG Nehalem - NG
Westmere - OK
2010 Late - NG - - - -

2011年以降は全機種OK。iMacは欲張ってi7にしたのが完全に裏目に出ている。i5 3.6GHzならClarkdaleなので問題なかったはず…。

対応機種でも使えない人はアップデートしよう。
https://support.apple.com/ja-jp/HT203296

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away