<?xml version="1.0" encoding="utf-8"?>
<!-- If you are running a bot please visit this policy page outlining rules you must respect. https://www.livejournal.com/bots/ -->
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:lj="https://www.livejournal.com">
  <id>urn:lj:livejournal.com:atom1:openvz</id>
  <title>OpenVZ</title>
  <subtitle>OpenVZ</subtitle>
  <author>
    <name>OpenVZ</name>
  </author>
  <link rel="alternate" type="text/html" href="https://openvz.livejournal.com/"/>
  <link rel="self" type="text/xml" href="https://openvz.livejournal.com/data/atom"/>
  <updated>2012-11-11T19:36:51Z</updated>
  <lj:journal userid="9392309" username="openvz" type="community"/>
  <link rel="service.feed" type="application/x.atom+xml" href="https://openvz.livejournal.com/data/atom" title="OpenVZ"/>
  <entry>
    <id>urn:lj:livejournal.com:atom1:openvz:39765</id>
    <author>
      <name>Kir Kolyshkin</name>
    </author>
    <lj:poster user="k001" userid="990679"/>
    <link rel="alternate" type="text/html" href="https://openvz.livejournal.com/39765.html"/>
    <link rel="self" type="text/xml" href="https://openvz.livejournal.com/data/atom/?itemid=39765"/>
    <title>Recent improvements in vzctl</title>
    <published>2011-12-27T16:03:39Z</published>
    <updated>2012-11-11T19:36:51Z</updated>
    <content type="html">&lt;b&gt;Update: note you need VSwap enabled (ie currently RHEL6-based) kernel for the below stuff to work, see &lt;a target='_blank' href='http://wiki.openvz.org/VSwap' rel='nofollow'&gt;http://wiki.openvz.org/VSwap&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;VSwap is an excellent feature, simplifying container resource management a lot. Now it's time to also simplify the command line interface, i.e. vzctl. Here is what we did recently (take a look at vzctl git repo if you want to review the actual changes):&lt;br /&gt;&lt;br /&gt;1. We no longer require to set kmemsize, dcachesize and lockedpages parameters to non-unlimited values (this is one of the enhancements in the recent kernels we have talked about recently). Therefore, setting these parameters to fractions of CT RAM (physpages) are now removed from configuration files and vzsplit output.&lt;br /&gt;&lt;br /&gt;2. There is no longer a need to specify all the UBC parameters in per-container configuration file. If you leave some parameters unset, the kernel will use default values (usually unlimited). So, VSwap example configs are now much smaller, with as much as 19 parameters removed from those.&lt;br /&gt;&lt;br /&gt;3. vzctl set now supports two new options: --ram and --swap. These are just convenient short aliases for --physpages and --swappages, the differences being that you only need to specify one value (the limit) and the argument is in bytes rather than pages.&lt;br /&gt;&lt;br /&gt;So, to configure a container named MyCT to have 1.5GB of RAM and 3GB of swap space available, all you need to do is just run this command:&lt;br /&gt;&lt;code&gt;vzctl set MyCT --ram 1.5G --swap 3G --save&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;4. This is not VSwap-related, but nevertheless worth sharing. Let's illustrate it by a copy-paste from a terminal:&lt;br /&gt;&lt;code&gt;# vzctl create 123 --ostemplate centos-4-x86_64&lt;br /&gt;Creating container private area (centos-4-x86_64)&lt;br /&gt;Found centos-4-x86_64.tar.gz at &lt;a target='_blank' href='http://download.openvz.org/template/precreated//centos-4-x86_64.tar.gz' rel='nofollow'&gt;http://download.openvz.org/template/precreated//centos-4-x86_64.tar.gz&lt;/a&gt;&lt;br /&gt;Downloading...&lt;br /&gt;-- 2011-11-29 18:54:08 -- &lt;a target='_blank' href='http://download.openvz.org/template/precreated//centos-4-x86_64.tar.gz' rel='nofollow'&gt;http://download.openvz.org/template/precreated//centos-4-x86_64.tar.gz&lt;/a&gt;&lt;br /&gt;Resolving download.openvz.org... 64.131.90.11&lt;br /&gt;Connecting to download.openvz.org|64.131.90.11|:80... connected.&lt;br /&gt;HTTP request sent, awaiting response... 200 OK&lt;br /&gt;Length: 171979832 (164M) [application/x-gzip]&lt;br /&gt;Saving to: `/vz/template/cache/centos-4-x86_64.tar.gz'&lt;br /&gt;&lt;br /&gt;100%[======================================&amp;gt;] 171,979,832 588K/s in 4m 27s &lt;br /&gt;&lt;br /&gt;2011-11-29 18:58:35 (630 KB/s) - `/vz/template/cache/centos-4-x86_64.tar.gz' saved [171979832/171979832]&lt;br /&gt;&lt;br /&gt;Success!&lt;br /&gt;Performing postcreate actions&lt;br /&gt;Saved parameters for CT 123&lt;br /&gt;Container private area was created&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;All this will be available in vzctl-3.0.30, which is to be released soon (next week? who knows). If you can't wait and want to test this stuff, here's a nightly build of vzctl available (version 3.0.29.3-27.git.0535fe1) from &lt;a target='_blank' href='http://wiki.openvz.org/Download/vzctl/nightly' rel='nofollow'&gt;http://wiki.openvz.org/Download/vzctl/nightly&lt;/a&gt;. Please give it a try and tell me what you think.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update:&lt;/b&gt; comments disabled due to spam</content>
  </entry>
</feed>
