Editing User Guide/Operations on Containers

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 381: Line 381:
 
You can delete a Container that is not needed anymore with the <code>vzctl destroy ''CTID''</code> command. This command removes the Container private area completely and renames the Container configuration file and action scripts by appending the <code>.destroyed</code> suffix to them.
 
You can delete a Container that is not needed anymore with the <code>vzctl destroy ''CTID''</code> command. This command removes the Container private area completely and renames the Container configuration file and action scripts by appending the <code>.destroyed</code> suffix to them.
  
{{Note|Since vzctl-3.0.24, you can also use the <code>vzctl delete</code> command introduced in Virtuozzo Containers 4.0 to remove Containers from your Hardware Node. This command has the syntax identical to vzctl destroy and is meant to replace the latter in the future.}}
+
{{Note|Since vzctl-3.0.24, you can also use the vzctl delete command introduced in Virtuozzo Containers 4.0 to remove Containers from your Hardware Node. This command has the syntax identical to vzctl destroy and is meant to replace the latter in the future.}}
  
 
A running Container cannot be destroyed with the <code>vzctl destroy</code> command. The example below illustrates destroying Container 101:
 
A running Container cannot be destroyed with the <code>vzctl destroy</code> command. The example below illustrates destroying Container 101:
  
# '''vzctl destroy 101'''
+
# vzctl destroy 101
Container is currently running. Stop it first.
+
 
# '''vzctl stop 101'''
+
Destroying Container private area: /vz/private/101
Stopping container ...
+
 
Container was stopped
+
Container is currently mounted (unmount first)
Container is unmounted
+
 
# '''vzctl destroy 101'''
+
# vzctl stop 101
Destroying container private area: /vz/private/101
+
 
Container private area was destroyed
+
Stopping Container ...
# '''ls /etc/vz/conf/101.*'''
+
 
/etc/vz/conf/101.conf.destroyed
+
Container was stopped
# '''vzctl status 101'''
+
 
CTID 102 deleted unmounted down
+
Container is unmounted
 +
 
 +
# vzctl destroy 101
 +
 
 +
Destroying Container private area: /vz/private/101
 +
 
 +
Container private area was destroyed
 +
 
 +
# ls /etc/vz/conf/101.*
 +
 
 +
/etc/vz/conf/101.conf.destroyed
 +
 
 +
# vzctl status 101
 +
 
 +
VEID 101 deleted unmounted down
  
 
If you do not need the backup copy of the Container configuration files (with the .destroyed suffix), you may delete them manually.
 
If you do not need the backup copy of the Container configuration files (with the .destroyed suffix), you may delete them manually.
 
 
== Disabling Container ==
 
== Disabling Container ==
  

Please note that all contributions to OpenVZ Virtuozzo Containers Wiki may be edited, altered, or removed by other contributors. If you don't want your writing to be edited mercilessly, then don't submit it here.
If you are going to add external links to an article, read the External links policy first!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)