LoginSignup
0

More than 5 years have passed since last update.

Hyper-V + systemd-nspawnの開発環境を作る(1) ~ Windowsネットワーク設定 ~

Last updated at Posted at 2018-12-13

概要

hyper-vでsystemd-nspawnの環境を作ってみます

今回想定する環境

  • OS: Windows10 Pro
  • 仮想化ソフト: Hyper-V
  • ホストOS: Ubuntu18.04

下図のような想定です(outer側はDHCPサーバーがある状態です)

hyper-v-systemd-nspawn.png

windows側ネットワーク設定

Hyper-Vの仮想スイッチマネージャーを選択します

w1.png

outerスイッチを作成します
外部ネットワークをチェックします

w2.png

innerスイッチを作成します
内部ネットワークをチェックします

w3.png

仮想マシンを作成します
ネットワークはとりあえずouterを指定して作ります

w4.png

仮想マシンが出来たらマシンを右クリック => 設定からネットワークアダプターを追加します

w5.png

仮想スイッチはinnerを選びます

w6.png

ブリッジインターフェイスを使うため MACアドレスのスプーフィングを有効にする にチェックします

w7.png

次にWindows側のIP設定をするために コントロール パネル\ネットワークとインターネット\ネットワークと共有センター を開いて
innerアダプタを選択

w8.png

プロパティ => インターネットプロトコルバージョン4(TCP/IPv4) を選択 => プロパティから以下のようにWindows側のIPを 10.100.0.1 にします

w9.png

Ubuntuのインストール

eth0がDHCPによりアドレスが取れていれば正常です

u1.png

次回

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0