{"id":216,"date":"2011-06-22T08:06:00","date_gmt":"2011-06-22T08:06:00","guid":{"rendered":"http:\/\/pheonixsolutions.com\/?p=216"},"modified":"2011-06-22T08:06:00","modified_gmt":"2011-06-22T08:06:00","slug":"open-vz-and-commands","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/open-vz-and-commands\/","title":{"rendered":"Open VZ and commands"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\" trbidi=\"on\"><\/p>\n<div style=\"margin: 0px; text-indent: 0px;\"><!--StartFragment--><a href=\"http:\/\/cethal.blogspot.com\/2010\/07\/openvz-commands.html\" target=\"_blank\" rel=\"noopener\"><span style=\"color: #0057ae; font-family: 'DejaVu Sans'; font-size: 9pt; font-weight: 600; text-decoration: underline;\">OpenVZ Commands<\/span><\/a><span style=\"font-family: 'DejaVu Sans'; font-size: 9pt; font-weight: 600;\"> <\/span><\/div>\n<div style=\"margin: 0px; text-indent: 0px;\"><a href=\"http:\/\/linux-bloggers.blogspot.com\/\" name=\"post-body-1911678756524812724\" target=\"_blank\" rel=\"noopener\"><\/a><span style=\"font-family: 'DejaVu Sans'; font-size: 9pt;\">I<\/span><span style=\"font-family: 'DejaVu Sans'; font-size: 9pt;\">ntroduction<\/p>\n<p>====================<br \/>vz -> recommends ext3 file system<br \/>PIM -> IP:4643<br \/>PMC -> mangaing h\/w node<br \/>PPP -> for managing a single container<br \/>All the above things need a license from parallel<br \/>====================<\/p>\n<p>Templates<\/p>\n<p>====================<br \/>OS template -> vzpkg (cache needs to created before creating the container)<br \/>EZ template -> points to the repository that contains packages that constitute the template<br \/>Application template -> mysql template<br \/>====================<\/p>\n<p>To create a container<\/p>\n<p>====================<br \/>vzctl create<br \/>the container ID > 100<br \/>32 -bit integer<br \/>ID &#8211; 0 -> h\/w node<br \/>ID -1 -> service container<\/p>\n<p>\/etc\/vz\/conf -> for the sample file names (only use the main part of the file name)<\/p>\n<p>vzctl set &#8211; configure the container<br \/>vzctl exec &#8211; run anything on the container<br \/>vzctl status\/vzlist 101<\/p>\n<p>vzpkg &#8211; for adding application templates on h\/w node (\/vz\/templates)<br \/>&#8211; the same command can be used for installing\/removing the template into a the container.<\/p>\n<p>Virtuozzo &#8211; User&#8217;s guide<\/p>\n<p>OS virtualization &#8211; (1-2% of is spent on the virtualization s\/w)<br \/>VZFS &#8211; allows sharing of common files among containers<br \/>Hardware node &#038; Containers<\/p>\n<p>\/etc\/vz\/vz.conf<br \/>\/etc\/vz\/conf\/<br \/>\/etc\/vzbackup.conf<\/p>\n<p>Standard migration<br \/>vzmigrate<\/p>\n<p>Zero downtime migration<br \/>vzmigrate &#8211;online &#8211;require-realtime my_node.com 101<\/p>\n<p>Move the container within the h\/w node<br \/>vzmlocal<\/p>\n<p>Backup &#038; restore<br \/>vzabackup\/vzarestore<\/p>\n<p>Reinstall container<br \/>vzctl recover -> restores the VZFS symlinks<br \/>vzctl reinstall -> creates new private area for the container, copies the old private area to \/old dir<br \/>&#8211; vps.configure, vps.reinstall<\/p>\n<p>Delete the container<br \/>vzctl destroy<\/p>\n<p>Disabling the container<br \/>vzctl set<\/p>\n<p>Suspending the container<br \/>vzctl suspend<\/p>\n<p>Setting up resources<br \/>disk quotas &#8211; first level(how much files or disk space the container can use) and second level (quotaugidlimit > no of entries in \/etc\/passwd or group files)<br \/>Container must be restarted to come this changes into effect<\/p>\n<p>vzquota &#8211; to check the status of the quota info<\/p>\n<p>Cleaning up containers &#8211; to move identical files from contrainers to \/vz\/template\/vc folder<br \/>vzcache<\/p>\n<p>Linking container files with application templates<br \/>vzpkg link<br \/>vzpkglink<br \/>vzpkgls<\/p>\n<p>Managing CPU &#8211; cpu share and the number of processors the node can make use of.<br \/>vzcpucheck<\/p>\n<p>Network traffic<br \/>\/etc\/vz\/conf\/networks_classes &#8211; after any changes, you need to service vz accrestart<br \/>class 0 &#8211; no accounting will be performed<br \/>class 1 &#8211; defined by containers to match any IP address<br \/>vznetstat<\/p>\n<p>Bandwidth management (outgoing traffic)<br \/>service vz shaperon, shaperrestart, shaperoff<br \/>BANDWIDTH -> kilobites per second<br \/>TOTALRATE -> ::<\/p>\n<p>For container<br \/>RATE -> ::<br \/>RATEBOUND -> to specify if the bandwidth is limited to the RATEBOUND<br \/>====================<\/p>\n<p>Monitoring tools<\/p>\n<p>====================<br \/>vzstat<br \/>vzps<br \/>vzpid<br \/>vztop<br \/>vzsetxinetd<\/p>\n<p>Virtuozzo networks<br \/>vznetcfg if list<\/p>\n<p>vznetcfg vlan add eth0 5<br \/>vznetcfg vlan del eth0.5<\/p>\n<p>vznetcfg net addif vznetwork1 eth0<br \/>vznetcfg net delif eth0<\/p>\n<p>vznetcfg net new vznetwork1<br \/>vznetcfg net del vznetwork1<br \/>vznetcfg net list<\/p>\n<p>venet0 &#8211;?<\/p>\n<p>License<br \/>vzlicload<br \/>vzlicupdate<br \/>vzlicview<\/p>\n<p>Keeping system up2date<br \/>The h\/w node can be updated using the normal update procedures without affecting virtuozzo<br \/>vzup2date &#8211; \/etc\/sysconfig\/vzup2date\/vzup2date.conf<br \/>vzup2date -m batch install &#8211;core<br \/>vzup2date -t -m batch install &#8211;all-os<\/p>\n<p>Updating the containers<br \/>vzpkg update 101 redhat-el5-x86<br \/>vzpkg update 101<br \/>vzpkg update cache fedora-core-8-x86<\/p>\n<p>Loading iptables modules<br \/>\/etc\/sysconfig\/iptables-config<br \/>\/etc\/vz\/vz.conf<br \/>\/etc\/vz\/conf\/.conf<\/p>\n<p>VZFS-v2<\/p>\n<p>Virtuozzo &#8211; Templates management guide<\/p>\n<p>\/vz\/template<br \/>\/vz\/private\/<br \/>\/vz\/root\/<\/p>\n<p>vzpkg &#8211; for managing VZ template<br \/>vzpkgls &#8211; for listing standard template<\/p>\n<p>vzpkg install -p 110 yum<\/p>\n<p>Virtuozzo &#8211; Managing UBC Resources<\/p>\n<p>vzcfgvalidate<\/p>\n<p>VE0CPUUNITS<br \/>SLM parameters<\/p>\n<p>i-node setups<\/p>\n<p>ext3 &#8211; 1 inode per every 4K <\/span><!--EndFragment--><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>OpenVZ Commands Introduction ====================vz -> recommends ext3 file systemPIM -> IP:4643PMC -> mangaing h\/w nodePPP -> for managing a single [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1022],"tags":[],"class_list":["post-216","post","type-post","status-publish","format-standard","hentry","category-web-architecture","psol-cat-web-architecture"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-3u","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=216"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/216\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}