[SOLVED] VirtIO and Qemu-GA

Digre

Active Member
Sep 3, 2019
6
0
41
42
Italy
lucadigregorio.com
Hello,
i've just spin up a Proxmox host to test it's potential, i've now installed several W10 and Linux VM, using the Stable virtio-win ISO, but using the latest qemu-ga ( to have the ip info on the dashboard) for the windows VM, while using the standard apt install qemu-guest-agent for the debian vm guest.

Now, here's the problem:

When i try to backup my VM, i keep gettings error like this one:

Code:
* Win 10 VM Guest:
ERROR: VM 501 qmp command 'guest-fsfreeze-thaw' failed - got timeout

but if i execute a qm get-osinfo from root shell of proxmox

Code:
root@px01:~# qm agent 501 get-osinfo
{
   "id" : "mswindows",
   "kernel-release" : "18362",
   "kernel-version" : "10.0",
   "machine" : "x86_64",
   "name" : "Microsoft Windows",
   "pretty-name" : "Windows 10 Pro",
   "variant" : "client",
   "variant-id" : "client",
   "version" : "Microsoft Windows 10",
   "version-id" : "10"
}
same on the debian vm with the apt'd qemu-guest-agent:
Code:
root@px01:~# qm agent 800 get-osinfo
{
   "id" : "debian",
   "kernel-release" : "4.19.0-5-amd64",
   "kernel-version" : "#1 SMP Debian 4.19.37-5+deb10u2 (2019-08-08)",
   "machine" : "x86_64",
   "name" : "Debian GNU/Linux",
   "pretty-name" : "Debian GNU/Linux 10 (buster)",
   "version" : "10 (buster)",
   "version-id" : "10"
}
Also the ping command, don't generate any output:
Code:
root@px01:~# qm agent 800 ping
root@px01:~# qm agent 501 ping
What i'm missing ?

Thanks
 
The fsfreeze on windows is using VSS snapshot feature of windows. You should have 2 services on windows, 1 for qemu-agent (state running), and another one like qemu-agent vss provider. (don't remember exactly the name). In state stopped. (It's only launched by the agent when fsfreeze occur)
 
In Linux, can you look at the logfile the guest agent writes? Maybe there is something in there.

Uhm the backup feature seems to working fine on linux :

Code:
INFO: starting new backup job: vzdump 800 --node px01 --mode snapshot --storage local --remove 0 --compress lzo
INFO: Starting Backup of VM 800 (qemu)
INFO: Backup started at 2019-09-04 13:14:18
INFO: status = running
INFO: update VM 800: -lock backup
INFO: VM Name: Deb-Master
INFO: include disk 'scsi0' 'local-lvm:vm-800-disk-0' 32G
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: snapshots found (not included into backup)
INFO: creating archive '/var/lib/vz/dump/vzdump-qemu-800-2019_09_04-13_14_18.vma.lzo'
INFO: started backup task 'f0cfe92f-9b1a-43ee-9d5f-9ca84e0a3bcf'
.......
INFO: status: 100% (34359738368/34359738368), sparse 94% (32591286272), duration 46, read/write 1015/0 MB/s
INFO: transferred 34359 MB in 46 seconds (746 MB/s)
INFO: archive file size: 785MB
INFO: Finished Backup of VM 800 (00:00:48)
INFO: Backup finished at 2019-09-04 13:15:06
INFO: Backup job finished successfully
TASK OK

Log of guest:
Code:
Sep  4 13:14:19 deb-master qemu-ga: info: guest-fsfreeze called
Sep  4 13:16:30 deb-master qemu-ga: info: guest-ping called
Sep  4 13:16:30 deb-master qemu-ga: info: guest-ping called

Still, from the proxmox host, if i try to ping the vm guest, i get no response
Code:
root@px01:~# qm agent 800 ping
root@px01:~# qm agent 800 ping
But i can see on logs of qemu agent inside the linux the ping
Code:
Sep  4 13:16:30 deb-master qemu-ga: info: guest-ping called

So, the true problem for the Linux Guest vm, it's the no response from ping, and other commands, but seems to get correctly execute from the machine.
This it's a minor issue, it's just a problem for my auto snapshot script, since it does not recive the response from ping and stuff, but should not be a problem.

On the other end, the Windows 10Pro 1903 VM :

The fsfreeze on windows is using VSS snapshot feature of windows. You should have 2 services on windows, 1 for qemu-agent (state running), and another one like qemu-agent vss provider. (don't remember exactly the name). In state stopped. (It's only launched by the agent when fsfreeze occur)

The services are there:
Code:
PS C:\Users\Utente> Get-Service 'QEMU Guest Agent VSS Provider'

Status   Name               DisplayName
------   ----               -----------
Stopped  QEMU Guest Agen... QEMU Guest Agent VSS Provider


PS C:\Users\Utente> Get-Service QEMU-GA

Status   Name               DisplayName
------   ----               -----------
Running  QEMU-GA            QEMU Guest Agent

I've noticed on windows log viewer this error:

Code:
Log Name:      Application
Source:        VSS
Date:          03/09/2019 21:17:54
Event ID:      8194
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      DESKTOP-DE4V8IU
Description:
Volume Shadow Copy Service error: Unexpected error querying for the IVssWriterCallback interface.  hr = 0x80070005, Access is denied.
. This is often caused by incorrect security settings in either the writer or requestor process.

Operation:
   Gathering Writer Data

Context:
   Writer Class Id: {e8132975-6f93-4464-a53e-1050253ae220}
   Writer Name: System Writer
   Writer Instance ID: {fb73fb32-103d-422a-831f-88669a6b4946}
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="VSS" />
    <EventID Qualifiers="0">8194</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2019-09-03T19:17:54.678512400Z" />
    <EventRecordID>471</EventRecordID>
    <Channel>Application</Channel>
    <Computer>DESKTOP-DE4V8IU</Computer>
    <Security />
  </System>
  <EventData>
    <Data>0x80070005, Access is denied.
</Data>
    <Data>

Operation:
   Gathering Writer Data

Context:
   Writer Class Id: {e8132975-6f93-4464-a53e-1050253ae220}
   Writer Name: System Writer
   Writer Instance ID: {fb73fb32-103d-422a-831f-88669a6b4946}</Data>
    <Binary>2D20436F64653A20575254575254494330303030313238372D2043616C6C3A20575254575254494330303030313234312D205049443A202030303030323733362D205449443A202030303030333030302D20434D443A2020433A5C57696E646F77735C73797374656D33325C737663686F73742E657865202D6B204E6574776F726B53657276696365202D70202D732043727970745376632D20557365723A204E616D653A204E5420415554484F524954595C4E4554574F524B20534552564943452C205349443A532D312D352D3230</Binary>
  </EventData>
</Event>

This error seems strange, witch permission should i give to the VSS service ? i'm kinda lost.

Thanks

Code:
edit

After digging on some forum, i've found a partial fix to the issue:

I've run on the machine the file VSSfix64.exe from https://knowledgebase.macrium.com/display/KNOW7/Troubleshooting+Microsoft+VSS+errors and rebooted the machine, now if i start a backup of the running windows vm it complete fine without error of guest-fsfreeze-thaw, but on the windows event viewer the windows VSS error still appear....

Code:
Task viewer: VM/CT 501 - Backup

INFO: starting new backup job: vzdump 501 --node px01 --storage local --mode snapshot --compress lzo --remove 0
INFO: Starting Backup of VM 501 (qemu)
INFO: Backup started at 2019-09-04 13:52:16
INFO: status = running
INFO: update VM 501: -lock backup
INFO: VM Name: W10P-C1
INFO: include disk 'scsi0' 'local-lvm:vm-501-disk-0' 128G
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: snapshots found (not included into backup)
INFO: creating archive '/var/lib/vz/dump/vzdump-qemu-501-2019_09_04-13_52_16.vma.lzo'
INFO: started backup task '66e424a0-803f-4f69-84ae-038e2f88391d'
INFO: status: 0% (672792576/137438953472), sparse 0% (202145792), duration 3, read/write 224/156 MB/s
INFO: status: 1% (1451425792/137438953472), sparse 0% (272400384), duration 8, read/write 155/141 MB/s
INFO: status: 2% (2858418176/137438953472), sparse 0% (411734016), duration 22, read/write 100/90 MB/s
INFO: status: 3% (4272422912/137438953472), sparse 0% (433295360), duration 33, read/write 128/126 MB/s
INFO: status: 4% (5517869056/137438953472), sparse 0% (436064256), duration 46, read/write 95/95 MB/s
INFO: status: 5% (6958219264/137438953472), sparse 0% (462319616), duration 59, read/write 110/108 MB/s
INFO: status: 6% (8388608000/137438953472), sparse 0% (474415104), duration 70, read/write 130/128 MB/s
INFO: status: 7% (9669967872/137438953472), sparse 0% (487133184), duration 79, read/write 142/140 MB/s
INFO: status: 8% (11750146048/137438953472), sparse 1% (2205360128), duration 89, read/write 208/36 MB/s
INFO: status: 9% (13128761344/137438953472), sparse 2% (3160051712), duration 94, read/write 275/84 MB/s
INFO: status: 10% (14292090880/137438953472), sparse 2% (4003065856), duration 97, read/write 387/106 MB/s
INFO: status: 11% (15124135936/137438953472), sparse 2% (4034736128), duration 102, read/write 166/160 MB/s
.....
....
INFO: status: 95% (130570977280/137438953472), sparse 83% (114739298304), duration 251, read/write 1120/0 MB/s
INFO: status: 97% (134013386752/137438953472), sparse 85% (118181707776), duration 254, read/write 1147/0 MB/s
INFO: status: 99% (137433382912/137438953472), sparse 88% (121601703936), duration 257, read/write 1139/0 MB/s
INFO: status: 100% (137438953472/137438953472), sparse 88% (121607270400), duration 258, read/write 5/0 MB/s
INFO: transferred 137438 MB in 258 seconds (532 MB/s)
INFO: archive file size: 9.29GB
INFO: Finished Backup of VM 501 (00:04:19)
INFO: Backup finished at 2019-09-04 13:56:35
INFO: Backup job finished successfully
TASK OK

screen_vss_error.png

Any hints ?

Thanks
 
Last edited:
Ok, seems i've found the solution, after applying the VSSfix64.exe i've followed the steps described on this post : https://www.ryadel.com/volume-shado...-ivsswritercallback-interface-come-risolvere/ , changing the COM Security Settings.

Code:
INFO: starting new backup job: vzdump 501 --remove 0 --compress lzo --storage local --mode snapshot --node px01
INFO: Starting Backup of VM 501 (qemu)
INFO: Backup started at 2019-09-04 14:06:30
INFO: status = running
INFO: update VM 501: -lock backup
INFO: VM Name: W10P-C1
INFO: include disk 'scsi0' 'local-lvm:vm-501-disk-0' 128G
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: snapshots found (not included into backup)
INFO: creating archive '/var/lib/vz/dump/vzdump-qemu-501-2019_09_04-14_06_30.vma.lzo'
INFO: started backup task 'e6cfdcf7-4f85-46cc-b596-b463bf221684'
INFO: status: 0% (1223950336/137438953472), sparse 0% (232116224), duration 3, read/write 407/330 MB/s
INFO: status: 1% (2037383168/137438953472), sparse 0% (318214144), duration 6, read/write 271/242 MB/s
....
....
INFO: status: 98% (135963082752/137438953472), sparse 87% (120116973568), duration 217, read/write 1158/0 MB/s
INFO: status: 100% (137438953472/137438953472), sparse 88% (121592840192), duration 219, read/write 737/0 MB/s
INFO: transferred 137438 MB in 219 seconds (627 MB/s)
INFO: archive file size: 9.30GB
INFO: Finished Backup of VM 501 (00:03:41)
INFO: Backup finished at 2019-09-04 14:10:11
INFO: Backup job finished successfully
TASK OK

Now the task complete fine, and there's no Errors on the Windows Event Viewer :D Just an informational Log that says :
Code:
The VSS service it's shutting down due to idle timeout

Seems almost all fine, the last issue remaining it's the no response of the qm agent xxx ping command from the host.

Any hint on that ?

Thanks
 
Maybe a dumb question, but did you install the virtio serial driver before using the qemu guest agent?

Hi, yes all avaible additional drivers have been added during the windows 10 Setup, with the virtio-win Stable ISO, but i've used the QEMU-GA from the Latest version avaible, else the IP information from the proxmox gui won't show up. :(

vio_serial.drv.jpg
 
but i've used the QEMU-GA from the Latest version avaible, else the IP information from the proxmox gui won't show up. :(

AFAIK, this is also retrieved through the qemu guest api, so there must be something wrong with the agent itself.
 
Seems almost all fine, the last issue remaining it's the no response of the qm agent xxx ping command from the host.
qm agent ID ping does not output anything when it is successful, only when there is an error (also the return code will be nonzero then)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!