freebsd:freebsd_12_use_qemu_guest_agent

差分

このページの2つのバージョン間の差分を表示します。

この比較画面にリンクする

次のリビジョン
前のリビジョン
freebsd:freebsd_12_use_qemu_guest_agent [2021-01-27 18:00]
Decomo 作成
freebsd:freebsd_12_use_qemu_guest_agent [2021-05-02 00:03] (現在)
Decomo
行 1: 行 1:
-===== FreeBSD 12でQEMUゲストエージェントを使う =====+====== FreeBSD 12でQEMUゲストエージェントを使う ======
  
-==== 試した環境 ====+===== 試した環境 =====
  
   * FreeBSD 12.2-RELEASE   * FreeBSD 12.2-RELEASE
   * Proxmox VE 6.3-2   * Proxmox VE 6.3-2
  
-==== 手順 ====+===== 手順 =====
  
-[[https://github.com/aborche/qemu-guest-agent|GitHub - aborche/qemu-guest-agent: QEMU Guest Agent patched for FreeBSD]] ここに書いてある通りに進めるだけ。+FreeBSD用のQEMUゲストエージェントの[[https://github.com/aborche/qemu-guest-agent|GitHub]]に書いてある通りに進めるだけ。
  
-=== ビルド ===+==== ビルド ====
  
 現状、Portsは存在しないようなので、zipを取ってきて展開する。 現状、Portsは存在しないようなので、zipを取ってきて展開する。
 +
 +<note note>(2021-05-02 追記)
 +
 +2021年3月16日に[[https://www.freshports.org/emulators/qemu-guest-agent/|emulators/qemu-gueat-agent]]としてports化された。
 +</note>
  
 <code> <code>
行 41: 行 46:
 $ cd /path/to/qemu-guest-agent $ cd /path/to/qemu-guest-agent
 # make && make install # make && make install
 +(略)
 +===>  Installing for qemu-guest-agent-5.0.1
 +===>  Checking if qemu-guest-agent is already installed
 +===>   Registering installation for qemu-guest-agent-5.0.1
 +Installing qemu-guest-agent-5.0.1...
 +=======================================================
 +Modify your `/etc/rc.conf` by adding these settings
 +
 +qemu_guest_agent_enable="YES"
 +qemu_guest_agent_flags="-d -v -l /var/log/qemu-ga.log"
 +
 +and run
 +# service qemu-guest-agent start
 +
 +For detailed help use `qemu-ga -h`
 +=======================================================
 +
 +===> SECURITY REPORT:
 +      This port has installed the following files which may act as network
 +      servers and may therefore pose a remote security risk to the system.
 +/usr/local/bin/qemu-ga
 +
 +      If there are vulnerabilities in these programs there may be a security
 +      risk to the system. FreeBSD makes no guarantee about the security of
 +      ports included in the Ports Collection. Please type 'make deinstall'
 +      to deinstall the port if this is a concern.
 +
 +      For more information, and contact details about the security
 +      status of this software, see the following webpage:
 +http://wiki.qemu.org/Main_Page
 </code> </code>
  
-ビルド&インストールが成功すると+インストールはPackagesの作法に則った形で行われるっぽい。 
 + 
 +==== 設定 ==== 
 + 
 +動作にはvirtio_console必要なので設定する。 
 + 
 +<code> 
 +# echo 'virtio_console_load="YES"' >> /boot/loader.conf 
 +# kldload virtio_console 
 +</code> 
 + 
 +カーネルモジュールを読み込む/dev/vtcon/が生えてくるはずだが、もしなければ、VMホスト側のQEMUエージェントタイプがvirtioになっているか確認する。 
 + 
 +{{ :freebsd:pve_check_qemu_agent_type.png |}} 
 + 
 +続いてゲストエージェントの設定&実行。 
 + 
 +以下の2行を/etc/rc.confに追加。 
 + 
 +<code> 
 +qemu_guest_agent_enable="YES" 
 +qemu_guest_agent_flags="-d -v -l /var/log/qemu-ga.log" 
 +</code> 
 + 
 +からのゲストエージェントを起動。 
 + 
 +<code> 
 +# service qemu-guest-agent start 
 +</code> 
 + 
 +Proxmox VEの仮想マシンのサマリーで、VMのIPアドレスが表示されればゲストエージェントが問題なく動いていると分かる。 
 + 
 +{{ :freebsd:pve_qemu_guest_agent_status.png |}} 
 + 
 +素のKVM環境ならvirshとか使えばいいんじゃないかな? 
 + 
 +===== 参考サイト ===== 
 + 
 +  * [[https://github.com/aborche/qemu-guest-agent|GitHub - aborche/qemu-guest-agent: QEMU Guest Agent patched for FreeBSD]] 
  • freebsd/freebsd_12_use_qemu_guest_agent.1611738046.txt.gz
  • 最終更新: 2021-01-27 18:00
  • by Decomo