in cluster, how to running qm guest exec command?

haiwan

Active Member
Apr 23, 2019
234
1
38
36
hi , we have a trouble
in cluster 3 node .
we connectting node1, running vm location node3.
so we how to from node1 running qm guest exec node3 vm.

now we try this write
loging in node web shell running below shell
ssh root@node3 qm guest exec 394 C:\WINDOWS\SYSTEM32\CMD.EXE /c "shutdown -r -t 0"
but system notice me unknow r
tks give me guide.
 
Hi,

what exact error do you get? Did you install the QEMU guest agent properly in the VM [1]?

[1]: https://pve.proxmox.com/wiki/Qemu-guest-agent#Windows
yeah vm have install qemu guest.

we running
ssh root@node3 qm guest exec 394 C:\WINDOWS\SYSTEM32\CMD.EXE /c "shutdown -r -t 0"
unknow r
but we change write have ok
ssh root@node3 qm guest exec 394 C:\WINDOWS\SYSTEM32\CMD.EXE /c "shutdown /r" is ok
 
Then that soundsl like how the command should be invoced under Windows? I am not too familar with Windows myself so I can't really help you with that part.
 
forward slash is the correct prefix for most, if not all, native Windows cmd commands:
Code:
shutdown --help
Usage: shutdown [/i | /l | /s | /sg | /r | /g | /a | /p | /h | /e | /o] [/hybrid] [/soft] [/fw] [/f]
    [/m \\computer][/t xxx][/d [p|u:]xx:yy [/c "comment"]]


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: sterzy

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!