Discussion:
[PVE-User] Can't set password with qm guest passwd
lyt_yudi
2018-07-30 02:12:36 UTC
Permalink
Hi,

Here use two version’s qemu-guest-agent, it can’t set up password.

1. qemu-guest-agent: "version" : "2.8.0"

# qm guest passwd 131 root
Enter new password: **********
Retype new password: **********
Use of inherited AUTOLOAD for non-method PVE::API2::Qemu::Agent::agent_cmd() is deprecated at /usr/share/perl5/PVE/API2/Qemu/Agent.pm line 255.
Can't locate object method "map_method_by_name" via package "131" (perhaps you forgot to load "131"?) at /usr/share/perl5/PVE/RESTHandler.pm line 326.

2. qemu-guest-agent: "version" : "2.11.1"

# qm guest passwd 123 root
Enter new password: **********
Retype new password: **********
Use of inherited AUTOLOAD for non-method PVE::API2::Qemu::Agent::agent_cmd() is deprecated at /usr/share/perl5/PVE/API2/Qemu/Agent.pm line 255.
Can't locate object method "map_method_by_name" via package "123" (perhaps you forgot to load "123"?) at /usr/share/perl5/PVE/RESTHandler.pm line 326.

Are there any related examples?

Did anyone succeed?

Thanks!
lyt_yudi
2018-07-30 03:46:02 UTC
Permalink
By pvesh result:

# pvesh create nodes/localhost/qemu/131/agent/set-user-password --password test123456 --username root --crypted 1
Use of inherited AUTOLOAD for non-method PVE::API2::Qemu::Agent::agent_cmd() is deprecated at /usr/share/perl5/PVE/API2/Qemu/Agent.pm line 255.
Can't locate object method "map_method_by_name" via package "131" (perhaps you forgot to load "131"?) at /usr/share/perl5/PVE/RESTHandler.pm line 326.

# pvesh create nodes/localhost/qemu/131/agent/set-user-password --password test123456 --username root --crypted 0
Use of inherited AUTOLOAD for non-method PVE::API2::Qemu::Agent::agent_cmd() is deprecated at /usr/share/perl5/PVE/API2/Qemu/Agent.pm line 255.
Can't locate object method "map_method_by_name" via package "131" (perhaps you forgot to load "131"?) at /usr/share/perl5/PVE/RESTHandler.pm line 326.
Post by lyt_yudi
Hi,
Here use two version’s qemu-guest-agent, it can’t set up password.
1. qemu-guest-agent: "version" : "2.8.0"
# qm guest passwd 131 root
Enter new password: **********
Retype new password: **********
Use of inherited AUTOLOAD for non-method PVE::API2::Qemu::Agent::agent_cmd() is deprecated at /usr/share/perl5/PVE/API2/Qemu/Agent.pm line 255.
Can't locate object method "map_method_by_name" via package "131" (perhaps you forgot to load "131"?) at /usr/share/perl5/PVE/RESTHandler.pm line 326.
2. qemu-guest-agent: "version" : "2.11.1"
# qm guest passwd 123 root
Enter new password: **********
Retype new password: **********
Use of inherited AUTOLOAD for non-method PVE::API2::Qemu::Agent::agent_cmd() is deprecated at /usr/share/perl5/PVE/API2/Qemu/Agent.pm line 255.
Can't locate object method "map_method_by_name" via package "123" (perhaps you forgot to load "123"?) at /usr/share/perl5/PVE/RESTHandler.pm line 326.
Are there any related examples?
Did anyone succeed?
Thanks!
_______________________________________________
pve-user mailing list
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
Dominik Csapak
2018-07-30 06:25:44 UTC
Permalink
yes there was a perl import missing, i already sent a fix on the devel
list, see:

https://pve.proxmox.com/pipermail/pve-devel/2018-July/033180.html
lyt_yudi
2018-07-30 07:15:35 UTC
Permalink
https://pve.proxmox.com/pipermail/pve-devel/2018-July/033180.html <https://pve.proxmox.com/pipermail/pve-devel/2018-July/033180.html>
thanks

This is a new error

# pvesh create nodes/localhost/qemu/131/agent/set-user-password --password test123456 --username root --crypted 0
Can't use string ("password") as a HASH ref while "strict refs" in use at /usr/share/perl5/PVE/QemuServer/Agent.pm line 62.
_______________________________________________
pve-user mailing list
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
Thomas Lamprecht
2018-07-30 08:43:53 UTC
Permalink
Post by lyt_yudi
https://pve.proxmox.com/pipermail/pve-devel/2018-July/033180.html <https://pve.proxmox.com/pipermail/pve-devel/2018-July/033180.html>
thanks
This is a new error
# pvesh create nodes/localhost/qemu/131/agent/set-user-password --password test123456 --username root --crypted 0
Can't use string ("password") as a HASH ref while "strict refs" in use at /usr/share/perl5/PVE/QemuServer/Agent.pm line 62.
Ah, yes, I found the issue and pushed a fix. Much thanks for the report.

cheers,
Thomas

Loading...