{"id":149,"date":"2016-12-23T18:28:03","date_gmt":"2016-12-23T18:28:03","guid":{"rendered":"http:\/\/www.beer.org\/blog\/?p=149"},"modified":"2016-12-23T18:28:25","modified_gmt":"2016-12-23T18:28:25","slug":"modifying-a-proxmox-lxc-container","status":"publish","type":"post","link":"https:\/\/www.beer.org\/blog\/index.php\/2016\/12\/23\/modifying-a-proxmox-lxc-container\/","title":{"rendered":"Modifying a Proxmox LXC container"},"content":{"rendered":"<p>I was introduced to the awesomeness that is <a href=\"https:\/\/www.proxmox.com\/en\/proxmox-ve\">Proxmox VE<\/a>\u00a0and got down to convering my old virtual server to Proxmox VM&#8217;s&#8230; Along the way I decided some of my VM&#8217;s didn&#8217;t need to be VM&#8217;s but that LXC containers would be just fine. \u00a0After making my second container, I got tired of running the same handful of commands (create a user account, git clone my dotfiles, install tmux, etc) so decided to investigate modifying the Ubuntu 16.04 template. \u00a0This turns out to be very easy using &#8216;vzdump&#8217;.<\/p>\n<p>&nbsp;<\/p>\n<p>So here&#8217;s another &#8220;memo to self&#8221;.<\/p>\n<p>First build a container, set it up the way you want it, then use vzdump to create a tarball of it. \u00a0Copy it to your templates directory and you&#8217;re done:<\/p>\n<pre class=\"p1\"><span class=\"s1\">cd &lt;container template dir&gt;<\/span>\r\n<span class=\"s1\">vzdump -dumpdir . 102<\/span>\r\n<span class=\"s1\">gzip vzdump-lxc-102-2016_12_23-07_53_55.tar<\/span>\r\n<span class=\"s1\">mv vzdump-lxc-102-2016_12_23-07_53_55.tar.gz ubuntu-16.04-mpv_1604-1_amd64.tar.gz<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I was introduced to the awesomeness that is Proxmox VE\u00a0and got down to convering my old virtual server to Proxmox VM&#8217;s&#8230; Along the way I decided some of my VM&#8217;s didn&#8217;t need to be VM&#8217;s but that LXC containers would be just fine. \u00a0After making my second container, I got tired of running the same&#8230; <a class=\"moretag\" href=\"https:\/\/www.beer.org\/blog\/index.php\/2016\/12\/23\/modifying-a-proxmox-lxc-container\/\">Continue reading &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,1],"tags":[],"class_list":["post-149","post","type-post","status-publish","format-standard","hentry","category-memotoself","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=149"}],"version-history":[{"count":1,"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/149\/revisions"}],"predecessor-version":[{"id":150,"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/149\/revisions\/150"}],"wp:attachment":[{"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.beer.org\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}