> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-xsoar-8-on-prem/8.11/onboard-cortex-xsoar/cortex-xsoar-installation/install-cortex-xsoar-on-a-vm-deployed-on-kvm/task-2.-deploy-your-virtual-machine-on-kvm.md).

# Task 2. Deploy your virtual machine on KVM

The following is an example of deploying your VM on KVM from a QCOW2 image using virt-manager.

If you set your Cortex XSOAR environment as a standalone (single node), you cannot add nodes to it and switch to a cluster. If you deploy three nodes, you can later add nodes and expand the cluster. For more information, see [Manage nodes in a cluster](/cortex-xsoar-8-on-prem/8.11/onboard-cortex-xsoar/cortex-xsoar-installation/post-installation/optimize-performance-and-robustness-from-the-textual-ui.md).

{% hint style="warning" %}
To implement built-in High Availability, deploy a cluster with three nodes (VMs), with each VM on a different hypervisor. This ensures that if one hypervisor fails, the other VMs continue to operate.
{% endhint %}

You then need to:

* Establish trust between all nodes in the cluster (Task 6).
* Set the Cluster FQDN to either the virtual IP address or to the reverse proxy/ingress controller IP address (Task 7). The virtual IP or the reverse proxy/ingress controller serves as a single entry point to distribute traffic across the nodes in the cluster.

To use backup and restore functionality, deploy a second cluster in a secondary data center. For more information, see [Set up backup and restore in Cortex XSOAR](/cortex-xsoar-8-on-prem/8.11/onboard-cortex-xsoar/back-up-and-restore-cortex-xsoar.md).

1. Copy the downloaded image file into your hypervisor.

   For example, in the remote desktop CLI, run the following command to copy the source disk file to create a disk image for each VM, where **`opp1-deploy-disk.qcow2`** is the name for the deploy disk you will use for your VM.

   `sudo cp /downloads/<file_disk_name>.qcow2 /mnt/opp-disk/disks/opp1-deploy-disk.qcow2`

   <div data-gb-custom-block data-tag="hint" data-style="warning" class="hint hint-warning"><p>Copy the file to a mounted directory that is an SSD disk mount.</p></div>
2. In your remote desktop, open the virt-manager application either by selecting System Tools → Virtual Machine Manager or by running the CLI command `virt-manager --connect qemu+ssh://<user>@<host-ip>/system <VM-Name>`
3. Click to create a new machine and select Import existing disk image.
4. Specify the path to the disk image file you created in Step 1 (for example, `/mnt/opp-disk/disks/opp1-deploy-disk.qcow2`) and select Debian 12 as the Operating System for the VM.
5. Set the memory and CPUs according to your preferred scale size. For example, for extra small scale, set Memory to 32768 MiB (32 GB) and CPUs to 16.
6. Give the VM a name and select Customize configuration before install.
7. Click Finish. The customization menu opens.
8. Under Virtual Disk, set the Disk bus to SCSI.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>For the disk to be recognized as an SSD, this must be set to SCSI.</p></div>
9. Add a data disk to the VM.
   1. Click Add Hardware.
   2. In the Add New Virtual Hardware pane, select Storage and set Bus type to SCSI.
   3. Click Manage..., and in the Locate or create storage volume pane, select pool. Locate your storage pool, which should be linked to your mounted SSD disk.

      If a storage pool does not exist (new VM), add one.

      **How to add a storage pool**

      1. Select the green + under the pool list.
      2. Set the pool name and set the Type to **`dir: Filesystem Directory`**.
      3. Set the Target Path to point to the mounted SSD disk directory.
10. Create a new volume.
    1. Select the green + for the Volumes list.
    2. Give the secondary disk a name (for example **`opp1-secondary-disk`**) and set the Format to qcow2.
    3. Set the required data disk size (for example, 775 GiB) and click Finish.
    4. Select the volume you just created.
11. Add the required SCSI controller hardware.
    1. Click Add Hardware.
    2. Select Controller and set the Type to SCSI and the Model to VirtIO SCSI.

       This controller will appear in the hardware list as **`Controller VirtIO SCSI 0`**.
12. For both the boot disk and the data disk, configure the advanced settings to ensure they are recognized as an SSD.
    1. Select the disk (for example, SCSI Disk 1 or SCSI Disk 2).
    2. Under Advanced options, set the Discard mode to unmap.
    3. Set the Cache mode to your preferred mode (default is writethrough).
    4. Click Apply.
13. Edit the XML configuration for both disks for them to be recognized as SSD.
    1. For each disk (boot and data), select the XML tab.
    2. Add the attribute **`rotation_rate`** with the value of "1" inside the \<target> tag.

       For example: `<target dev="sdb" bus="scsi" rotation_rate="1"/>`
    3. Click Apply to save the XML changes.
14. Click Begin Installation to start the VM.

    If the VM starts successfully, you should see the SeaBIOS and GRUB loading screen. If an error occurs, you will need to close the window, delete the machine and both volumes created, and restart the VM creation process.
15. Repeat from Step 1 for each additional virtual machine in the cluster.

    <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Each virtual machine (VM) must have its own unique boot disk file. Copy the disk image file (.qcow2) from the <code>/downloads</code> folder to each target machine's mount point (<code>/mnt/opp-disk/disks/</code>) and give it a unique name (for example, <code>opp1-deploy-disk.qcow2</code>, <code>opp2-deploy-disk.qcow2</code>, and <code>opp3-deploy-disk.qcow2</code> ).</p></div>
16. For first-time login, the default username and password is `admin`.

    * If you log in from the web console, you are prompted for your username and password.

      ![opp-first-login.png](/spaces/vksWgzvBZ9ZvAg4dGLrH/files/PjrK740dHoUPFAt4W1Kv)
    * If you log in from an external terminal, use the `ssh admin@<server ip address>` command to SSH log in.

      ![opp-oci-cloud-shell.png](/spaces/vksWgzvBZ9ZvAg4dGLrH/files/NjoYvvpI63YniLWyGAzb)

    Give the admin a new password as follows.

    <div data-gb-custom-block data-tag="hint" data-style="warning" class="hint hint-warning"><p>Save the SSH password securely. If you lose this password, you cannot recover or change it, and to use SSH you will need to redeploy the cluster.</p></div>

    The password must be at least eight characters long and contain at least:

    * One lower case letter
    * One upper case letter
    * One number, or one of the following special characters: !@#%

    If this is not a first-time login, you can log in from the web console or from a terminal using the `ssh admin@<server ip address>` command to SSH log in.

    The textual UI menu opens with all the configuration and installation options.

    <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><ul><li>To start using the textual UI, click anywhere on the screen.</li><li>To navigate between the menu items, use the up and down arrow keys. To select a menu item, press the Enter key.</li><li>To navigate between fields within a menu item, use the Tab key. To save settings, tab to the Save button and press the Enter key.</li><li>To go back to the menu from a specific menu item field, press the esc key.</li></ul></div>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-xsoar-8-on-prem/8.11/onboard-cortex-xsoar/cortex-xsoar-installation/install-cortex-xsoar-on-a-vm-deployed-on-kvm/task-2.-deploy-your-virtual-machine-on-kvm.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
