SSH into the Proxmox host and run:

qm shutdown <VMID>

This sends an ACPI shutdown signal to the guest OS for a graceful shutdown.

To find the VM ID:

qm list

If the VM doesn’t respond to the shutdown signal, force it:

qm stop <VMID>

qm stop is equivalent to pulling the power cable. Use it only when qm shutdown hangs.