Skip to content

Commit 0863b6e

Browse files
authored
Merge pull request #816 from AkihiroSuda/dev
README.ja.md: sync (2022-Apr-25)
2 parents 2642a1d + e4ae1cb commit 0863b6e

File tree

2 files changed

+95
-19
lines changed

2 files changed

+95
-19
lines changed

README.ja.md

Lines changed: 94 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
1-
This is an *unofficial* translation of [`README.md` (revision 616cd115, 2022-Mar-09)](https://github.com/lima-vm/lima/blob/616cd11589b01eb17366419c88db0cfd5c76acb1/README.md).
1+
This is an *informal* translation of [`README.md` (revision 0aebc304, 2022-Apr-25)](https://github.com/lima-vm/lima/blob/0aebc304f8cdc65375f8bfca7414ced6397a4fcc/README.md) in Japanese.
2+
This translation might be out of sync with the English version.
3+
Please refer to the [English `README.md`](README.md) for the latest information.
4+
5+
[`README.md` (リビジョン 0aebc304, 2022年4月25日)](https://github.com/lima-vm/lima/blob/0aebc304f8cdc65375f8bfca7414ced6397a4fcc/README.md)*非正式* な日本語訳です。
6+
英語版からの翻訳が遅れていることがあります。
7+
最新の情報については[英語版 `README.md`](README.md)をご覧ください。
8+
9+
- - -
210

311
[[📖**始める**]](#始める)
412
[[**FAQとトラブルシューティング]**](#FAQとトラブルシューティング)
513

14+
![Limaロゴ](./docs/images/lima-logo-01.svg)
15+
616
# Lima: Linux virtual machines (多くの場合、macOSで)
717

818
Limaは自動的なファイル共有とポートフォワード機能つきでLinux仮想マシンと[containerd](https://containerd.io) を起動します(WSL2と同様)。
@@ -111,7 +121,15 @@ brew install lima
111121

112122
#### QEMU をインストールする
113123

114-
最近のバージョンのQEMUをインストールしてください。v6.2.0かそれ以降が推奨されます。
124+
最近のバージョンのQEMUをインストールしてください。
125+
126+
M1のmacOSでは、[Homebrew版のQEMU `6.2.0_1`](https://github.com/Homebrew/homebrew-core/pull/96743) 以降が望ましいです。
127+
128+
もしHomebrewを使っていないなら、最近のLinuxゲストを起動するには以下のコミットを含めてください:
129+
- https://github.com/qemu/qemu/commit/ad99f64f `hvf: arm: Use macros for sysreg shift/masking`
130+
- https://github.com/qemu/qemu/commit/7f6c295c `hvf: arm: Handle unknown ID registers as RES0`
131+
132+
これらのコミットはQEMU 7.0には含まれていますが、 [QEMU 7.0はM1で3 GiB以上のメモリを使うのにmacOS 12.4以降を要する点に注意が必要です](https://github.com/lima-vm/lima/pull/796)
115133

116134
#### Lima をインストールする
117135

@@ -120,7 +138,7 @@ brew install lima
120138
```bash
121139
brew install jq
122140
VERSION=$(curl -fsSL https://api.github.com/repos/lima-vm/lima/releases/latest | jq -r .tag_name)
123-
curl -fsSL https://github.com/lima-vm/lima/releases/download/${VERSION}/lima-${VERSION:1}-$(uname -s)-$(uname -m).tar.gz | tar Cxzvm /usr/local
141+
curl -fsSL "https://github.com/lima-vm/lima/releases/download/${VERSION}/lima-${VERSION:1}-$(uname -s)-$(uname -m).tar.gz" | tar Cxzvm /usr/local
124142
```
125143

126144
- Limaをソースからインストールするには、`make && make install`を実行してください。
@@ -142,22 +160,76 @@ INFO[0029] READY. Run `lima` to open the shell.
142160
Linux
143161
```
144162

145-
詳しい使い方:
163+
### コマンドリファレンス
146164

147-
- `limactl start <INSTANCE> [--tty=false]` を実行してLinuxインスタンスを起動します。デフォルトのインスタンス名は"default"です。仮想マシンの構成を確認・編集するためにLimaは自動的にエディタ(`vi`)を開きます。ホストの端末で"READY"と表示されるまで待ってください。`--tty=false`はエディタを開くかを問う対話的なプロンプトを無効にします。
165+
#### `limactl start`
166+
`limactl start [--name=NAME] [--tty=false] <template://TEMPLATE>`: start the Linux instance
148167

149-
- Linuxで `<COMMAND>` を起動するには `limactl shell <INSTANCE> <COMMAND>`を実行します。"default"インスタンスについては、このコマンドを`lima <COMMAND>`に短縮できます。`lima`コマンドは環境変数 `$LIMA_INSTANCE`によるインスタンス名の指定も受け付けます。
168+
```console
169+
$ limactl start
170+
? Creating an instance "default" [Use arrows to move, type to filter]
171+
> Proceed with the current configuration
172+
Open an editor to review or modify the current configuration
173+
Choose another example (docker, podman, archlinux, fedora, ...)
174+
Exit
175+
...
176+
INFO[0029] READY. Run `lima` to open the shell.
177+
```
150178

151-
- インスタンス間でファイルをやりとりする、あるいはインスタンスとホストの間でファイルをやりとりするには、`limactl copy <SOURCE> ... <TARGET>`を実行します。`<INSTANCE>:<FILENAME>`でインスタンス内のコピー元やコピー先を指定します。
179+
`Proceed with the current configuration` を選び, ホストのターミナルに "READY" と表示されるまで待ってください。
180+
自動化するには、`--tty=false` フラグで対話的ユーザインターフェースを無効化できます。
152181

153-
- `limactl list [--json]` を実行してインスタンス一覧を表示します。
182+
##### 応用的な使い方
183+
インスタンス "default" を テンプレート "docker" から作成するには:
184+
```console
185+
$ limactl start --name=default template://docker
186+
```
154187

155-
- `limactl stop [--force] <INSTANCE>` を実行してインスタンスを停止します。
188+
> 注: `limactl start template://TEMPLATE` は Lima v0.9.0 以降を必要とします。
189+
> 古いリリースでは `limactl start /usr/local/share/doc/lima/examples/TEMPLATE.yaml` が代わりに必要です。
156190
157-
- `limactl delete [--force] <INSTANCE>` を実行してインスタンスを削除します。
191+
テンプレートの一覧を表示するには:
192+
```console
193+
$ limactl start --list-templates
194+
```
158195

159-
- `limactl edit <INSTANCE>` を実行してインスタンスの設定を編集します。
196+
インスタンス "default" を ローカルファイルから作成するには:
197+
```console
198+
$ limactl start --name=default /usr/local/share/lima/examples/fedora.yaml
199+
```
160200

201+
インスタンス "default" を リモートのURLから作成するには (信頼できるソースで慎重に使ってください):
202+
```console
203+
$ limactl start --name=default https://raw.githubusercontent.com/lima-vm/lima/master/examples/alpine.yaml
204+
```
205+
206+
#### `limactl shell`
207+
`limactl shell <INSTANCE> <COMMAND>`: `<COMMAND>` を Linux で実行します。
208+
209+
"default" インスタンスについては, このコマンドは `lima <COMMAND>` に短縮できます。.
210+
`lima` コマンドは、インスタンス名を環境変数 `$LIMA_INSTANCE` としても受け付けます。
211+
212+
#### `limactl copy`
213+
`limactl copy <SOURCE> ... <TARGET>`: ファイルをインスタンス間、もしくはインスタンスとホストとの間でコピーします。
214+
215+
インスタンス内のコピー元もしくはコピー先を指定するには、`<INSTANCE>:<FILENAME>` を使ってください。
216+
217+
#### `limactl list`
218+
`limactl list [--json]`: インスタンス一覧を表示します
219+
220+
#### `limactl stop`
221+
`limactl stop [--force] <INSTANCE>`: インスタンスを停止します
222+
223+
#### `limactl delete`
224+
`limactl delete [--force] <INSTANCE>`: インスタンスを削除します
225+
226+
#### `limactl factory-reset`
227+
`limactl factory-reset <INSTANCE>`: インスタンスを初期化します
228+
229+
#### `limactl edit`
230+
`limactl edit <INSTANCE>`: インスタンスを編集します
231+
232+
#### `limactl completion`
161233
- bash補完を有効にするには、`~/.bash_profile``source <(limactl completion bash)`を追加します。
162234

163235
- zsh補完を有効にするには、`limactl completion zsh --help`を参照してください。
@@ -173,10 +245,10 @@ Limaにはデータの喪失を引き起こすバグが含まれているかも
173245

174246
### 設定
175247

176-
[`./pkg/limayaml/default.yaml`](./pkg/limayaml/default.yaml)を見てください。
248+
[`./examples/default.yaml`](./examples/default.yaml)を見てください。
177249

178250
現在のデフォルト構成:
179-
- OS: Ubuntu 21.10 (Impish Indri)
251+
- OS: Ubuntu 22.04 (Jammy Jellyfish)
180252
- CPU: 4 コア
181253
- メモリ: 4 GiB
182254
- ストレージ: 100 GiB
@@ -186,7 +258,7 @@ Limaにはデータの喪失を引き起こすバグが含まれているかも
186258
## 動作する仕組み
187259

188260
- ハイパーバイザ: HVFアクセラレータを搭載したQEMU
189-
- ファイルシステム共有: [リバースsshfs](https://github.com/lima-vm/sshocker/blob/v0.2.0/pkg/reversesshfs/reversesshfs.go)(そのうち9pやSambaに取って代わられうる)
261+
- ファイルシステム共有: [リバースsshfs (デフォルト)、もしくは virtio-9p-pci またの名を virtfs](./docs/mount.md)
190262
- ポートフォワーディング: ゲストの`/proc/net/tcp``iptables`を自動的に見つつ`ssh -L`
191263

192264
## 開発者ガイド
@@ -201,7 +273,7 @@ Limaにはデータの喪失を引き起こすバグが含まれているかも
201273
- パフォーマンス最適化
202274
- より多くのゲストディストリビューション
203275
- Windows ホスト
204-
- [現在のリバースsshfsを置き換えるVirtFS(QEMU側リポジトリで作業をする必要があります)](https://github.com/NixOS/nixpkgs/pull/122420)
276+
- virtio-fs で、virtio-9p-pci またの名を virtfs を置き換える (QEMU側リポジトリで作業をする必要があります)
205277
- SSHを置き換える[vsock](https://github.com/apple/darwin-xnu/blob/xnu-7195.81.3/bsd/man/man4/vsock.4)(QEMU側リポジトリで作業をする必要があります)
206278

207279
## FAQとトラブルシューティング
@@ -345,8 +417,13 @@ Linuxホストでは、sysctlの値`net.ipv4.ip_unprivileged_port_start=0`をセ
345417

346418
#### "Waiting for the essential requirement 1 of X: "ssh" で固まります"
347419

348-
QEMUが使うlibslirp v4.6.0 は[壊れている](https://gitlab.freedesktop.org/slirp/libslirp/-/issues/48)ことが知られています。
349-
`/usr/local/Cellar/libslirp`にlibslirp v4.6.0があるならば、v4.6.1かそれ以降にアップグレードする必要があります(`brew upgrade`)。
420+
421+
M1のmacOSでは、最近のLinuxゲストを実行するには[Homebrew版のQEMU `6.2.0_1`](https://github.com/Homebrew/homebrew-core/pull/96743) 以降が必要です。
422+
`brew upgrade` を実行してQEMUを更新してください。
423+
424+
もしHomebrewを使っていないならば、[インストール](#インストール)の節の「手動でのインストール方法」をご覧ください。
425+
426+
デバッグするには、`~/.lima/<インスタンス>` にある `serial.log` もご覧ください。
350427

351428
#### `limactl cp`コマンドで"Permission denied"
352429

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ If you are not using Homebrew, make sure to include the following commits to boo
118118
- https://github.com/qemu/qemu/commit/ad99f64f `hvf: arm: Use macros for sysreg shift/masking`
119119
- https://github.com/qemu/qemu/commit/7f6c295c `hvf: arm: Handle unknown ID registers as RES0`
120120

121-
These commits are planned to be included in the upstream QEMU 7.0.0 (ETA: April 2022).
122-
See https://github.com/Homebrew/homebrew-core/pull/96743 for the further information.
121+
These commits are also included in the QEMU 7.0, however, [it should be noted that QEMU 7.0 needs macOS 12.4 or later to use more than 3 GiB memory on M1](https://github.com/lima-vm/lima/pull/796).
123122

124123
#### Install Lima
125124

0 commit comments

Comments
 (0)