# How to install QEMU Guest Agent

## **How to install on Linux**

On Linux-based operating systems, you can install the agent via the command line using [Secure Shell.](/ncs-documents/ncs-documents-en/compute/compute-instance/ssh-to-linux-compute-instance.md)

### 1. Install the QEMU Guest Agent

* On Debian or Ubuntu-based systems (using apt-get), run the command:

```
sudo apt-get install qemu-guest-agent
```

* On Debian or Ubuntu-based systems (using apt-get), run the command

```
sudo yum install qemu-guest-agent
```

### 2. Start the QEMU Guest Agent service

Depending on the OS, the QEMU Guest Agent may not start immediately after installation and might require you to start it manually. You can start it with the following command:

<pre><code><strong>sudo systemctl start qemu-guest-agent
</strong></code></pre>

### 3. Enable the QEMU Guest Agent to autostart on instance restart

To ensure the QEMU Guest Agent service starts automatically after a restart, use the command:

```
sudo systemctl enable qemu-guest-agent
```

## How to install on Windows

On Windows Server, you can install the agent via [Remote Desktop Protocol](/ncs-documents/ncs-documents-en/compute/compute-instance/remote-desktop-to-windows-instance.md).

### 1. **Download the VirtIO ISO File**

Download the VirtIO driver ISO file from <https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/virtio-win.iso> and attach the ISO file to your instance.

<figure><img src="/files/xcbUKiFwrLQQ5BOgqOXV" alt=""><figcaption></figcaption></figure>

### 2. **Open the File on the Instance**

Once the VirtIO file is attached to the instance, it will appear as a DVD drive (e.g., virtio-win-0.1.215). Right-click the drive and select "Open in new window".

<figure><img src="/files/vy8eGQBBbPnk99JJPFZR" alt=""><figcaption></figcaption></figure>

### 3. Install virtio-win-guest-tools

Double-click the virtio-win-guest-tools.exe file to begin the installation.

<figure><img src="/files/Q69sAsMdpIU6hOSAVEuT" alt=""><figcaption></figcaption></figure>

When the Virtio-win setup wizard appears, proceed through the installation by clicking:\
Next >> I accept... >> Next >> Next (no changes needed) >> Install.

<figure><img src="/files/xqhY9LVIj4WsTpt9aE40" alt=""><figcaption></figcaption></figure>

When prompted, click Install to confirm.

<figure><img src="/files/v7Vx0XU5rgkBpjywfAcC" alt=""><figcaption></figcaption></figure>

Once the installation is complete, click Finish.

<figure><img src="/files/sUW9vXW8I1fi8rszGNe2" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/JVG5AQrIKYOZI949LtZz" alt=""><figcaption></figcaption></figure>

### 4. Verify the QEMU Guest Agent is running

Open the "Services" application to check the status of the QEMU Guest Agent. If the installation was successful, its status should be "Running".

<figure><img src="/files/NQflIi4EmxMuGDa3ZX4g" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://docs-epc.gitbook.io/ncs-documents/ncs-documents-en/compute/compute-instance/how-to-install-qemu-guest-agent.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
