Help with Virtuozzo 4 vzmlocal command

Community support for Plesk, CPanel, WebMin and others with insight from two of the founders of Plesk. Ask for help here! No question is too simple or complicated. :-)
KrazyBob
Forum Regular
Forum Regular
Posts: 310
Joined: Mon Mar 19, 2007 3:47 pm

Help with Virtuozzo 4 vzmlocal command

Unread post by KrazyBob »

I am trying to move a container to a new number on the same server and I don't understand the command. The bottom line is that I don't understand the instructions. I simply want to move 101 to 1001 using Virtuozzo 4. I appreciate any help. Thank you in advance.

I don't understand /my_dir and /ct111 because ct111 is not how the node is referenced. It is referenced as /vz/private/101 or /vz/root/101

Code: Select all

Moving Container Within Hardware Node

The vzmlocal utility allows you to move Containers within your Hardware Node. Moving a Container within one and the same Hardware Node consists in changing the Container ID and its private area and root paths. So, you may use vzmlocal to change the ID of the corresponding Container only or to additionally modify its private area and root path.

Let us assume that you wish to change the ID of your Container from 101 to 111 and modify its private area and root paths from /vz/private/101 to /vz/private[b]/my_dir[/b] and from /vz/root/101 to /vz/root[b]/ct111[/b], respectively. To this effect, you should execute the following command on the Hardware Node:

# vzmlocal 101:111:/vz/private/my_dir:/vz/root/ct111

Moving/copying Container#101 -> Container#111,

[/vz/private/my_dir], [/vz/root/ct111] ...

...

Successfully completed

Code: Select all

[root@hw006 ~]# vzmlocal 101:1001:/vz/private/101:/vz/root/1001  
Moving/copying CT#101 -> CT#1001, [/vz/private/101], [/vz/root/1001] ...
OfflineManagement CT#101 ...
done
Stopping CT#101 ...
vzctl : Failed to run vzquota off for Container 101 [11]
/usr/sbin/vzctl exited with code 66
can not stop/umount CT#101 : /usr/sbin/vzctl exited with code 66
Can't move/copy CT#101 -> CT#1001, [/vz/private/101], [/vz/root/1001] : can not stop/umount CT#101 : /usr/sbin/vzctl exited with code 66
paulie
Forum User
Forum User
Posts: 76
Joined: Tue Apr 20, 2010 2:49 am

Re: Help with Virtuozzo 4 vzmlocal command

Unread post by paulie »

My experience is from Virtuozzo 4.7 and doesn't amount to much but what I can tell you is that the stupid command won't work on running containers!

And I think you only need to specify the second set of parameters (from/to directories) if you're using non-standard paths. Certainly when I've cloned containers I've never bothered to specify it.
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: Help with Virtuozzo 4 vzmlocal command

Unread post by faris »

Yeah, Paulie's right:

Code: Select all

vzmlocal oldID:newID


...will change the countainer's ID. There's no need for the additional stuff.

From the manual: "Specifying the destination Container private area path (<dest_private>) and
root path (<dest_root>) is optional; it allows you to override the default paths."

Also from the manual: "You may run the vzmlocal utility on both running and stopped Containers" but I'm with Paulie on this -- I'd stop the container first!!!
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
KrazyBob
Forum Regular
Forum Regular
Posts: 310
Joined: Mon Mar 19, 2007 3:47 pm

Re: Help with Virtuozzo 4 vzmlocal command

Unread post by KrazyBob »

You know, I knew there was a simple way! Why can't the Russians right in plain English :)
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: Help with Virtuozzo 4 vzmlocal command

Unread post by faris »

:-) I know what you mean.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
paulie
Forum User
Forum User
Posts: 76
Joined: Tue Apr 20, 2010 2:49 am

Re: Help with Virtuozzo 4 vzmlocal command

Unread post by paulie »

But if they did it'd all be too easy!
Post Reply