6.23 Oracle Linux KVMゲストへの結合ネットワーク・インタフェースの追加

この手順を使用して、既存のOracle Linux KVMゲストに結合ネットワーク・インタフェースを追加します。

たとえば、この手順を使用して、Oracle Linux KVMゲストにバックアップ・ネットワークを追加できます。

Oracle Linux KVMゲストに結合ネットワーク・インタフェースを追加する手順は、次のとおりです。

  1. KVMホストで、結合ネットワーク・ブリッジを作成します。

    次のvm_maker --add-bonded-bridgeコマンドを使用します。

    # vm_maker --add-bonded-bridge bond-name  --first-slave ethX --second-slave ethY

    このコマンドの説明:

    • bond-nameには、結合ネットワーク・インタフェースの名前を指定します。推奨されるネーミング規則では、結合されるネットワーク・インタフェースを識別する番号と文字列vmbethを連結したものを使用します。たとえば、eth5eth6を結合する場合、推奨される結合名はvmbeth56です。
    • ethXおよびethYには、結合されるKVMホスト・ネットワーク・インタフェースを指定します。
  2. KVMホストで、結合ネットワーク・ブリッジをゲストに関連付けます。

    次のvm_maker --allocate-bridgeコマンドを使用します。

    # vm_maker --allocate-bridge bond-name --domain guest-name

    このコマンドの説明:

    • bond-nameには、前のステップで作成した結合ネットワーク・ブリッジの名前を指定します。
    • guest-nameには、結合ネットワーク・インタフェースを追加するゲストの名前を指定します。

    vm_maker --allocate-bridgeコマンドの出力には、この手順を完了するために実行する必要がある一連の追加の手動ステップが含まれています。

  3. 前のvm_maker --allocate-bridgeコマンドの出力に示されている追加の手動ステップを実行します。

    最初の手動ステップでは、ゲスト内で使用する一意のネットワーク・インタフェース名を選択する必要があります。このゲスト・インタフェースはKVMホスト上のブリッジ・ネットワーク・インタフェースにマップされます。このインタフェース名にはネーミング規則を使用することも、KVMホストからインタフェース名を引き継ぐこともできます。どちらを選択した場合でも、手動ステップ2のNAME="guest-interface"エントリが適切に調整されていることを確認します。

    次に、手動ステップの例を示します。

    ノート:

    手順は環境に固有です。したがって、vm_maker --allocate-bridgeコマンドの出力に示されている追加の手動ステップを実行してください。次の例のコマンドはコピーしないでください。

    [INFO] Please perform the following manual steps:
    [INFO] 1. Determine a unique network interface name within the domain to which
    [INFO]    you are attaching this interface. Typically bonded
    [INFO]    interfaces are named bondeth<number>, for example 'bondeth1', and
    [INFO]    non-bonded interfaces are named eth<number>, for example 'eth2'.
    [INFO]    The name must be unique within the domain. In the example below
    [INFO]    the name 'bondeth0' has been chosen.
    [INFO] 2. Add the following line to the file
    [INFO]    '/etc/udev/rules.d/70-persistent-net.rules' within the domain:
    [INFO]    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNELS=="0000:00:PCI-slot-number.0", ATTR{type}=="1", NAME="guest-interface"
    [INFO] You MUST execute steps 4 and 5! You CANNOT simply reboot from within
    [INFO] the domain.
    [INFO] 4. vm_maker --stop-domain guest-name
    [INFO] 5. vm_maker --start-domain guest-name
    [INFO] 6. Login to the domain and run the following command:
    [INFO]    /opt/oracle.cellos/ipconf.pl -nocodes
    [INFO]    This command will ask you for configuration information for this
    [INFO]    new interface.
    [INFO] NOTE: if you have more than one interface to add to this domain,
    [INFO] please execute the instructions above, and then call this command again.
    [INFO] The domain must be stopped and started between invocations of this
    [INFO] command.