Open main menu

OpenVZ Virtuozzo Containers Wiki β

Editing Gentoo template creation

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 27: Line 27:
 
'''WARNING''': There is no warrantied that template should work, you can bugtack the errors. But I haven't confronted with problem.
 
'''WARNING''': There is no warrantied that template should work, you can bugtack the errors. But I haven't confronted with problem.
  
== Create directories for the new container and unarchive stage3 ==
+
== Create directory for the new container and unarchive stage3 ==
  
 
<pre>
 
<pre>
mkdir /vz/root/1001
 
 
mkdir /vz/private/1001
 
mkdir /vz/private/1001
tar -xvjpf /root/stage3-i686-20111213.tar.bz2 -C /vz/private/1001
+
tar -xjf /root/stage3-i686-20111213.tar.bz2 -C /vz/private/1001
 
</pre>
 
</pre>
  
Line 47: Line 46:
 
</pre>
 
</pre>
  
If you get the following error, you need to change the file /etc/vz/vz.conf to "VE_LAYOUT=simfs". Unfortunately, I couldn't find a solution for ploop.
 
<pre>
 
# vzctl set 1001 --applyconfig basic --save
 
Error in ploop_open_dd (di.c:288): Can't resolve /vz/private/1001/root.hdd/DiskDescriptor.xml: No such file or directory
 
Failed to read /vz/private/1001/root.hdd/DiskDescriptor.xml
 
Error: failed to apply some parameters, not saving configuration file!
 
</pre>
 
 
== Edit CT Config ==
 
== Edit CT Config ==
  
Line 65: Line 57:
 
values are providing 2 GB soft limit with 2.5 GB hard limit:
 
values are providing 2 GB soft limit with 2.5 GB hard limit:
  
  DISKSPACE="2.4G:2.5G"
+
  DISKSPACE="2G:2.5G"
 
 
If you use independed Gentoo portage tree for each container, is considered correct in the use of gentoo containers, don't forget to raise inodes number
 
 
 
DISKINODES="400000:420000"
 
 
 
You should also increase the ram to a minimum of 512 MB. Otherwise, you will get errors during compilation. Since vzctl 3.0.30 you can do:
 
 
 
vzctl set 1001 --ram 512M --swap 1G --save
 
 
 
Prior to vzctl 3.0.30 you have to do, which gives you 512 MB guaranteed and 1024 MB burstable:
 
 
 
vzctl set 1001 --vmguarpages 512M --save
 
vzctl set 1001 --oomguarpages 512M --save
 
vzctl set 1001 --privvmpages 512M:1024M --save
 
vzctl set 1001 --swappages 0:1024M --save
 
 
 
Independed Gentoo portage tree for each container would be good idea, because newer portage can delete older ebuilds already installed in container with other dependences.
 
Otherwise you can't reinstall already installed packages if you bind the newer version of portage in gentoo containers.
 
  
 
After that you copy that configuration file turning it into a sample configuration for later use:
 
After that you copy that configuration file turning it into a sample configuration for later use:
Line 186: Line 160:
 
</pre>
 
</pre>
  
'''Baselayout 2 and OpenRC:''' <code>/vz/private/1001/etc/conf.d/rc</code> is obsolete (http://www.gentoo.org/doc/en/openrc-migration.xml#doc_chap2_sect2) and <code>/vz/private/1001/etc/rc.conf</code> should be used instead. But, RC_DEVICES is missing in <code>/vz/private/1001/etc/rc.conf</code>?!?
 
  
 
If you want to enable udev read on.
 
If you want to enable udev read on.

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)

Templates used on this page: