Monitor VM resource usage?

Hi forum, I’ve started to use lxd to run my Windows Server 2019 vm.
But I found that I can’t find how many cpu / memory resources were being used by VM?

root@workstation:/home/linyu# lxc info server2019
Name: server2019
Location: none
Remote: unix://
Architecture: x86_64
Created: 2021/06/21 05:40 UTC
Status: Running
Type: virtual-machine
Profiles: default
Pid: 3496
  eth0:	inet6	fe80::f5a4:7746:d621:15a0	tapa5499463
  Processes: -1
  Disk usage:
    root: 9.78GB
  Network usage:
      Bytes received: 824.66kB
      Bytes sent: 1.46MB
      Packets received: 6740
      Packets sent: 4835

Also, by pylxd:

>>> for vm in allvm:
...     cno = vm.state()
...     cno.cpu
{'usage': 0}
>>> for vm in allvm:
...     cno = vm.state()
...     cno.memory
{'usage': 0, 'usage_peak': 0, 'swap_usage': 0, 'swap_usage_peak': 0}

Is there are any way to monitor the resource usage? Thank you.

Not currently. As it stands, LXD relies on its agent to give you that data and as we currently can’t run the agent on Windows (missing vsock and virtio-fs drivers), we don’t have that data.

But we’re looking at implementing a secondary mode for that data where the host side is reported rather than the guest side which would then let you get some usage info for Windows VMs too.

Yea, thank you for your reply, looking forward to the resource usage information from the host, so that we could monitor any OS installation on LXD. :grin: