{"id":1391,"date":"2016-09-19T19:00:09","date_gmt":"2016-09-19T23:00:09","guid":{"rendered":"http:\/\/enterpriseadmins.org\/blog\/?p=1391"},"modified":"2016-09-19T19:00:09","modified_gmt":"2016-09-19T23:00:09","slug":"lab-template-ubuntu-16-04","status":"publish","type":"post","link":"https:\/\/enterpriseadmins.org\/blog\/virtualization\/lab-template-ubuntu-16-04\/","title":{"rendered":"Lab template: Ubuntu 16.04"},"content":{"rendered":"<p>Recently I&#8217;ve been working in a couple of different \/ disconnected labs.  This means I&#8217;m managing a couple copies of all my templates manually.  Sometimes its hard to find the right section of my notes depending on when\/where I&#8217;m working on the lab, so I decided to post a couple quick blog posts so I can always find them.  The following notes are for creating a template based on Ubuntu 16.04.1, and include notes on setting a static IP and joining to the domain with pbis-open (formerly likewise-open).  <\/p>\n<p>Install Ubuntu 16.04.1 Server from ISO image (<a href=\"http:\/\/www.ubuntu.com\/download\/server\/thank-you?version=16.04.1&#038;architecture=amd64\">http:\/\/www.ubuntu.com\/download\/server\/thank-you?version=16.04.1&#038;architecture=amd64<\/a>), accepting all defaults.  When prompted for an admin user, use the name hostadmin.<\/p>\n<p>Once the install is complete, login as hostadmin.  Switch to root and set a password for the root user.<\/p>\n<pre>\r\nsudo su -\r\npasswd\r\n<\/pre>\n<p>Apply updates and install the packages openssh-server and ntp:<\/p>\n<pre>\r\napt-get update && apt-get upgrade\r\napt-get install openssh-server ntp -y\r\n<\/pre>\n<p>Get the template ready for PowerBroker Identity Services (formerly likewise-open) domain joins:<\/p>\n<pre>\r\nwget http:\/\/download1.beyondtrust.com\/Technical-Support\/Downloads\/PowerBroker-Identity-Services-Open-Edition\/pbiso\/850\/pbis-open-8.5.0.153.linux.x86_64.deb.sh\r\nchmod +x pbis-open-8.5.0.153.linux.x86_64.deb.sh\r\n.\/pbis-open-8.5.0.153.linux.x86_64.deb.sh\r\ncd \/opt\/pbis\/bin\/\u00a0\r\n<\/pre>\n<p>At this point, I shutdown the VM and convert it to a template.  When I&#8217;m ready to use the VM, I deploy a copy from template and follow the remaining steps.<\/p>\n<p>If needed, set a static IP by updating the following file:<\/p>\n<pre>nano \/etc\/network\/interfaces<\/pre>\n<p>The important sections to include in the iface settings are address, netmask, gateway, dns-search, and dns-nameservers.  An example has been included below:<\/p>\n<pre>\r\niface eth0 inet static\r\naddress 192.168.0.100\r\nnetmask 255.255.255.0\r\ngateway 192.168.0.1\r\ndns-search lab.enterpriseadmins.org\r\ndns-nameservers 192.168.0.20\r\n<\/pre>\n<p>Verify that the hostname is properly set:<\/p>\n<pre>nano \/etc\/hostname<\/pre>\n<p>Join the Linux VM to the domain and create a DNS record:<\/p>\n<pre>\r\ndomainjoin-cli join lab.enterpriseadmins.org adminbw\r\n\/opt\/pbis\/bin\/config AssumeDefaultDomain true\r\n\/opt\/pbis\/bin\/config LoginShellTemplate \/bin\/bash\r\n\/opt\/pbis\/bin\/config HomeDirTemplate %H\/%U\r\n\/opt\/pbis\/bin\/config RequireMembershipOf \"lab\\\\domain^users\"\r\n\/opt\/pbis\/bin\/update-dns\r\n<\/pre>\n<p>Once I reach this point, I kick off a quick reboot (just to make sure the domain join took) and am now free to use the VM.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I&#8217;ve been working in a couple of different \/ disconnected labs. This means I&#8217;m managing a couple copies of all my templates manually. Sometimes its hard to find the right section of my notes depending on when\/where I&#8217;m working &hellip; <a href=\"https:\/\/enterpriseadmins.org\/blog\/virtualization\/lab-template-ubuntu-16-04\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1391","post","type-post","status-publish","format-standard","hentry","category-virtualization"],"_links":{"self":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/1391","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/comments?post=1391"}],"version-history":[{"count":3,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/1391\/revisions"}],"predecessor-version":[{"id":1401,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/1391\/revisions\/1401"}],"wp:attachment":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/media?parent=1391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/categories?post=1391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/tags?post=1391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}