# 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
```
