Windows で Linux アプリが起動できるようになる。
機能としては WSL2 からの拡張で WSLg と呼ばれている。
Windows 11 では Android アプリも実行可能になる予定らしい。
その際に使用される仮想 Linux が CBL-Mariner らしい。
Microsoft からオープンソースで公開しているので、それをHyper-V で動かしてみる。
WSL2のドキュメント WSL で Linux GUI アプリを実行する | Microsoft Docs
Microsoft Developer Blogs The Initial Preview of GUI app support is now available for the Windows Subsystem for Linux - Windows Command Line
GitHub - CBL-Mariner GitHub - microsoft/CBL-Mariner: Linux OS for Azure 1P services and edge appliances
はじめに
CBL-Mariner は ISO 形式では提供されていない。自分で ISO を作成する必要がある。
手順は GitHub に記載されています。
要件に Ubuntu 18.04 とあるが Ubuntu 20.04 でも可。
Ubuntu はストアアプリ版でOKです。その方が楽なので Ubuntu 20.04 をご用意ください。
そちらのやり方はググればいっぱい出てくるので各自でお願いします。
ISO の作成手順
[資料]
CBL-Mariner/quickstart.md at 1.0 · microsoft/CBL-Mariner · GitHub
以下は、ストアアプリ版 Ubuntu 上で行ってください。
- 事前準備
Ubuntu 20.04 の場合、python-minimal
の部分をpython3-minimal
にするだけ。
あとの手順は同じ。
# Add a backports repo in order to install the latest version of Go. sudo add-apt-repository ppa:longsleep/golang-backports sudo apt-get update # Install required dependencies. sudo apt -y install make tar wget curl rpm qemu-utils golang-1.15-go genisoimage python3-minimal bison gawk parted # Recommended but not required: `pigz` for faster compression operations. sudo apt -y install pigz # Fix go 1.15 link sudo ln -vsf /usr/lib/go-1.15/bin/go /usr/bin/go # Install Docker. curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh sudo usermod -aG docker $USER
- GitHubから取得
# Clone the CBL-Mariner repo git clone https://github.com/microsoft/CBL-Mariner.git cd CBL-Mariner # Sync to the latest stable build git checkout 1.0-stable
- ISOの作成
# Switch to the toolkit folder cd toolkit # Image is placed in ../out/images/full sudo make iso REBUILD_TOOLS=y REBUILD_PACKAGES=n CONFIG_FILE=./imageconfigs/full.json
これで /home/ユーザー名/CBL-Mariner/out/images/full
内にISOファイルが作成される。
(例)full-1.0.20210803.1325.iso
cd /home/ユーザー名/CBL-Mariner/out/images/full/ cp full-1.0.20210803.1325.iso /mnt/c/Users/ユーザー名/Desktop/
CBL-Mariner のインストール
ドキュメント上には vhdx 第2世代 でもよいと書いてあるが、
記載どおり設定しても起動しなかったのでとりあえず第1世代で。
起動後の画面