在 VMM 光纖中建立及部署 Linux 虛擬機器Create and deploy Linux virtual machines in the VMM fabric

重要

已不再支援此版本的 Virtual Machine Manager (VMM),建議升級至 VMM 2019This version of Virtual Machine Manager (VMM) has reached the end of support, we recommend you to upgrade to VMM 2019.

本文說明在 System Center - Virtual Machine Manager (VMM) 網狀架構中,如何建立及部署 Linux VM。This article describes how to create and deploy Linux VMs in the System Center - Virtual Machine Manager (VMM) fabric.

在您開始使用 Intune 之前Before you start

VMM 支援的虛擬主機可包含作為客體作業系統的 Linux。VMM supports virtual machines that contain Linux as the guest operating system. 請注意:Note that:

  • Linux Integration Services (LIS) 必須安裝在虛擬機器上。Linux Integration Services (LIS) must be installed on the virtual machine.

  • Linux 的 VMM 客體代理程式必須安裝在虛擬機器上。The VMM guest agent for Linux must be installed on the virtual machine. 需要有這個代理程式才能進行服務範本整合,這個代理程式可讓您修改 Linux 電腦上的屬性,例如主機名稱。It is required for service template integration, and it allows you to modify properties on the Linux computer such as the host name.

    注意

    如果主機名稱已經設定為 localhost,SCVMMLinuxGuestAgent (XPlat) cfghostdomain 會竄改主機檔案。SCVMMLinuxGuestAgent (XPlat) cfghostdomain garbles the hosts file if hostname is already set to localhost. 我們建議您在透過 VMM 部署 Linux VM 時,不要將主機名稱設定為 localhost。We recommend you not to set the hostname as localhost when deploying Linux VMs through VMM.

  • VMM 不會確認 VM 符合這些需求。VMM doesn't verify that the VM meets these requirements. 不過若未符合,VM 部署將會失敗。However, if it doesn't, VM deployment will fail.

建立 VMCreate the VM

使用 VMM 光纖中任何可用的方法,來建立執行 Linux 的 VM。Create a VM running Linux using any of the available methods in the VMM fabric. 進一步瞭解Learn more.

在 VM 上安裝 LISInstall LIS on the VM

依預設,LIS 已包含於某些 Linux 版本中。By default, LIS is included with some distributions of Linux. 如果 LIS 未包含於您要用於虛擬機器的 Linux 版本中,請以手動方式進行安裝。If LIS is not included in the distribution of Linux that you are using for the virtual machine, then install it manually. 進一步瞭解Learn more.

安裝 VMM 客體代理程式Install the VMM guest agent

  1. 在 VMM 伺服器上,開啟提高權限的命令提示字元。Open an elevated command prompt on the VMM server.

  2. 移至 c:\Program Files\Microsoft System Center 2012\Virtual Machine Manager\agents\Linux 資料夾。Go to the c:\Program Files\Microsoft System Center 2012\Virtual Machine Manager\agents\Linux folder.

  3. 將所有代理程式安裝檔案從該資料夾複製到 VM 上的新資料夾。Copy all the agent installation files from that folder to a new folder on the VM.

  4. 開啟 VM 上的新資料夾,然後執行下列命令︰chmod +x installOpen the new folder on the VM, and run the following command: chmod +x install.

  5. 視作業系統而定,執行上述任一命令。Run either of these commands, depending on the operating system.

    ./install scvmmguestagent.1.0.0.544.x64.tar
    ./install scvmmguestagent.1.0.0.544.x86.tar
    

當代理程式安裝在 VM 上時,會在 VHD 上建立下列檔案和資料夾:When the agent installs on the VM the following files and folders will be created on the VHD:

  • 預設安裝資料夾 (/opt/microsoft/scvmmguestagent),以及安裝記錄檔 (scvmm-install.log)A default installation folder (/opt/microsoft/scvmmguestagent), and an installation log file (scvmm-install.log)
  • 預設記錄檔資料夾 - /var/opt/microsoft/scvmmagent/logA default log files folder - /var/opt/microsoft/scvmmagent/log
  • 特製化記錄檔 (scvmm.log)。A specialization log file (scvmm.log). 部署和特製化虛擬機器時,會建立這個檔案。This file is created when the virtual machine is deployed and specialized.
  • 設定檔 (scvmm.conf)。A configuration file (scvmm.conf). 這個檔案包含記錄檔的位置,並可在部署和特製化期間用來控制記錄。This file contains the location of the log file and is used to control logging during deployment and specialization.

後續步驟Next steps

vm-settingsvm-settings