[Users] /usr/sbin/vzmigrate: line 312: vzctl: command not found

Ekaterina.epifanova nixma at yandex.ru
Tue May 10 11:16:02 EDT 2011


Hello.

You can define LC_ENV in env_keep variable in sudoers file. In this case 
root PATH will be saved during sudo-session.


On 05/10/2011 05:59 PM, knawnd at gmail.com wrote:
> Hi!
>
> I am trying to migrate a VM from one remote node to another one but 
> invoking vzmigrate command from third machine (front-end). Something like
> [front-end]$ ssh <remote_host_1> sudo /usr/sbin/vzmigrate --online 
> <remote_host_2><CTID>
> But I am getting the following error when executing the command below 
> as unprivileged user with permissions in /etc/sudoers file to run 
> /usr/sbin/vz* scripts:
> [front-end]$ ssh <remote_host_1> sudo /usr/sbin/vzmigrate --online 
> <remote_host_2><CTID>
> Warning: Permanently added 'remote_hostname_1,remote_host_IP_1' (RSA) 
> to the list of known hosts.
> Starting online migration of CT <CTID> to <remote_host_2>
> /usr/sbin/vzmigrate: line 312: vzctl: command not found
> Error: Can't perform online migration of a stopped container
>
> In 312 line of/usr/sbin/vzmigrate file thevzctl is invoked as
> [...]
> get_status $($VZCTL status $VEID)
> [...]
>
> and VZCTL is defined in the beginning of that file as
> VZCTL=vzctl
>
> I wonder if there is any reason to define VZCTL as vzctl but not with 
> absolute path to it (i.e. /usr/sbin/vzctl)?
>
> Adding /usr/sbin to $PATH in ~oneadmin/.bashrc making the following 
> command works
> $ ssh <remote_hosts_1[2]>"which vzctl"
> Warning: Permanently added 'remote_hostname_1[2],remote_host_IP_1' 
> (RSA) to the list of known hosts.
> /usr/sbin/vzctl
>
> but vzmigrate still fails with the error message listed above.
>
> Any thoughts,hints,ideas on that issue?
>
> Thanks in advance,
> Nikolay.
>
> _______________________________________________
> Users mailing list
> Users at openvz.org
> https://openvz.org/mailman/listinfo/users



More information about the Users mailing list