HI,ALL:
I am currently experiencing a problem, I am using qga(qm guest exec <commond>) to implement a function to set the IP for the virtual machine.
At present, the basic functions have been implemented, and the IP and DNS information can be successfully modified for the network card.
But when the network name is Chinese, it will fail, prompting timeout
vmnetwork Is an API interface I wrote myself, using PVE::QemuServer::Agent::qemu_exec($vmid, $cmd)
Does anyone know how to deal with this situation? Thank you
I am currently experiencing a problem, I am using qga(qm guest exec <commond>) to implement a function to set the IP for the virtual machine.
At present, the basic functions have been implemented, and the IP and DNS information can be successfully modified for the network card.
But when the network name is Chinese, it will fail, prompting timeout
Code:
root@vcloud151:~# pvesh create /nodes/vcloud151/qemu/226/agent/vmnetwork --netid net1 --isdhcp 0 --ipaddr 172.16.18.159 --netmask 255.255.255.0 --gateway 172.16.18.1 --dns 114.114.114.114
Wide character in print at /usr/share/perl5/PVE/API2/Qemu/Agent.pm line 538.
cmd=C:\Windows\System32\netsh.exe interface ipv4 set address name=本地连接 static 172.16.18.159 255.255.255.0 172.16.18.1
Wide character in print at /usr/share/perl5/PVE/API2/Qemu/Agent.pm line 539.
dnscmd=C:\Windows\System32\netsh.exe interface ipv4 set dnsservers name=本地连接 static 114.114.114.114 validate=no
VM 226 qmp command 'guest-exec' failed - got timeout
vmnetwork Is an API interface I wrote myself, using PVE::QemuServer::Agent::qemu_exec($vmid, $cmd)
Does anyone know how to deal with this situation? Thank you