# Install guest-agent on new VM

## For Linux:

1. ssh into the server
2. install the agent

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

1. enable the agent

```bash
systemctl enable qemu-guest-agent
```

1. reboot server

## For Windows:

First you have to download the virtio-win driver iso (see [Windows VirtIO Drivers](https://pve.proxmox.com/wiki/Windows_VirtIO_Drivers)).

Then install the virtio-serial driver:

1. Attach the ISO to your windows VM (virtio-\*.iso)
2. Go to the windows Device Manager&#x20;
3. Look for "PCI Simple Communications Controller"
4. Right Click:

```powershell
Update Driver and select on the mounted iso in DRIVE:\vioserial\<OSVERSION>\ where <OSVERSION> is your Windows Version (e.g. 2k12R2 for Windows 2012 R2
```

After that, you have to install the qemu-guest-agent:

1. Go to the mounted ISO in explorer
2. The guest agent installer is in the directory guest-agent
3. Execute the installer with double click (either qemu-ga-x86\_64.msi (64-bit) or qemu-ga-i386.msi (32-bit)

After that the qemu-guest-agent should be up and running. You can validate this in the list of Window Services, or in a PowerShell with:

```powershell
PS C:\Users\Administrator> Get-Service QEMU-GA
```


---

# 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.arkannis.net/virtualization/proxmox/install-guest-agent-on-new-vm.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.
