summary: In this topic, you will learn how to deploy Plesk from a QCOW2 image on Oracle VirtualBox.

We will use Plesk running on Ubuntu 22 as an example, but you can also deploy Plesk running on CentOS 7 the same way.

您開始前

在部署Plesk之前,請執行以下操作:

  1. 下載並在您的電腦上安裝VirtualBox。
  2. 從https://autoinstall.plesk.com/images/下載`plesk-ubuntu-latest.qcow2`鏡像。
  3. 將QCOW2鏡像為VMDK格式。

Deploying Plesk Using a Converted QCOW2 Image

To deploy Plesk on VirtualBox using a QCOW2 image converted to the VMDK format, create a virtual server. Here’s how to do it:

  1. 在 VirtualBox 中點按 新建 圖示:

    image QCOW2_VB_Create_VM_Button

  2. 在“創建虛擬機器”視窗中,指定虛擬機器和作業系統的名稱,以及記憶體大小:

    image QCOW2_VB_Create_VM_Configure_parameters

    有關記憶體要求的更多資訊,請參見`硬體要求<https://docs.plesk.com/release-notes/obsidian/hardware-requirements/>`__。

  3. 選擇**使用現有的虛擬硬碟檔**,然後按一下|QCOW2_VB_Use_Existing_VDF_Icon| 圖示。

  4. 在“硬碟選擇器”視窗中,點按**添加**:

    image QCOW2_VB_Create_VM_Configure_hard_disk

  5. Select the QCOW2 image you downloaded and converted to the VMDK format, and then click Choose.

  6. 點按 Create (創建)。

  7. 按一下**啟動**,打開已創建的虛擬機器:

    image QCOW2_VB_Run_VM_Power_On_VM

  8. 選擇**Ubuntu**,然後按ENTER鍵:

    image QCOW2_VB_Run_VM_Select_OS

等候直到部署好作業系統和Plesk。

Logging in to the Created Virtual Machine

A virtual machine with Plesk created from a converted QCOW2 image does not have a preconfigured SSH password. There are two ways to log in to the virtual machine:

  • Boot into recovery mode and set the root password. You need to do this for every virtual machine with Plesk you create.
  • Use the 「cloud-init」 utility shipped with the Plesk QCOW2 image to preconfigure the server and set the root password. For example, you can use the 「NoCloud」 datasource to create an ISO image or a virtual hard drive containing the user-data file. Connect this ISO image or a virtual hard drive to the virtual machine before booting it up, and the cloud-init utility should configure the SSH user so that you can log in. You can then use that ISO image or a virtual hard drive with every virtual machine you create.