OpenVZ Forum


Home » Mailing lists » Users » /usr/sbin/vzmigrate: line 312: vzctl: command not found
/usr/sbin/vzmigrate: line 312: vzctl: command not found [message #42667] Tue, 10 May 2011 13:59 Go to next message
knawnd is currently offline  knawnd
Messages: 27
Registered: April 2011
Junior Member
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.
Re: /usr/sbin/vzmigrate: line 312: vzctl: command not found [message #42669 is a reply to message #42667] Tue, 10 May 2011 15:16 Go to previous messageGo to next message
mercy is currently offline  mercy
Messages: 12
Registered: October 2010
Location: msk.ru.earth
Junior Member

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@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.
>


no fear. never give up. never surrender.
Re: /usr/sbin/vzmigrate: line 312: vzctl: command not found [message #42670 is a reply to message #42667] Tue, 10 May 2011 15:33 Go to previous messageGo to next message
Kirill Kolyshkin is currently offline  Kirill Kolyshkin
Messages: 9
Registered: October 2006
Junior Member
The issue you are describing is believed to be fixed in vzctl 3.0.26.3 which
was released 2 days ago :)
On May 10, 2011 6:03 PM, <knawnd@gmail.com> wrote:
Re: /usr/sbin/vzmigrate: line 312: vzctl: command not found [message #42676 is a reply to message #42670] Wed, 11 May 2011 06:26 Go to previous messageGo to next message
knawnd is currently offline  knawnd
Messages: 27
Registered: April 2011
Junior Member
updating vzctl to 3.0.26.3-1 fixes the described issue.
Thanks!

Nikolay.

Kirill Kolyshkin wrote on 10/05/11 19:33:
>
> The issue you are describing is believed to be fixed in vzctl 3.0.26.3
> which was released 2 days ago :)
>
Re: /usr/sbin/vzmigrate: line 312: vzctl: command not found [message #42678 is a reply to message #42669] Wed, 11 May 2011 06:27 Go to previous messageGo to next message
knawnd is currently offline  knawnd
Messages: 27
Registered: April 2011
Junior Member
Dear Ekaterina,

Thanks for a hint!

Nikolay.

Ekaterina.epifanova wrote on 10/05/11 19:16:
> Hello.
>
> You can define LC_ENV in env_keep variable in sudoers file. In this
> case root PATH will be saved during sudo-session.
Re: /usr/sbin/vzmigrate: line 312: vzctl: command not found [message #42685 is a reply to message #42667] Wed, 11 May 2011 09:02 Go to previous messageGo to next message
Thorsten Schifferdeck is currently offline  Thorsten Schifferdeck
Messages: 38
Registered: February 2006
Member
Hi,

see
http://git.openvz.org/?p=vzctl;a=commit;h=bfa856a9e440d536a4f11e33fe9748863cc85708

or/and upgrade to vzctl 3.0.26.2

see http://wiki.openvz.org/Download/vzctl/3.0.26.3

Bye,
Thorsten

Am 10.05.2011 15:59, schrieb knawnd@gmail.com:
> 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.
Re: /usr/sbin/vzmigrate: line 312: vzctl: command not found [message #42686 is a reply to message #42685] Wed, 11 May 2011 09:46 Go to previous message
knawnd is currently offline  knawnd
Messages: 27
Registered: April 2011
Junior Member
Hi Thorsten,

I've already update vzctl to 3.0.26.3 and it fixed my problem.

Anyway that for reply!
Nikolay.

Thorsten Schifferdecker wrote on 11/05/11 13:02:
> Hi,
>
> see
> http://git.openvz.org/?p=vzctl;a=commit;h=bfa856a9e440d536a4f11e33fe9748863cc85708
>
> or/and upgrade to vzctl 3.0.26.2
>
> see http://wiki.openvz.org/Download/vzctl/3.0.26.3
>
> Bye,
> Thorsten
Previous Topic: CfP 6th Workshop on Virtualization in High-Performance Cloud Computing (VHPC'11) - Deadline Extensio
Next Topic: How to identify the physical machine when you are inside the container?
Goto Forum:
  


Current Time: Mon May 13 00:00:02 GMT 2024

Total time taken to generate the page: 0.01467 seconds