{"id":3,"date":"2007-02-28T21:01:29","date_gmt":"2007-02-28T20:01:29","guid":{"rendered":"http:\/\/www.amikkelsen.com\/?p=3"},"modified":"2008-06-26T21:30:36","modified_gmt":"2008-06-26T20:30:36","slug":"mounting-nas-nfs-share-on-esx-30","status":"publish","type":"post","link":"http:\/\/www.amikkelsen.com\/?p=3","title":{"rendered":"Mounting NAS \/ NFS share on ESX 3.0"},"content":{"rendered":"<p>If you want to mount a NAS \/ NFS share in ESX 3.0, then you are not given the option to choose a username and password.<br \/>\nThis presented me with a small challange because i needed to mount \/vmimages\/vmiso\/ to a share on a W2K3 server.<\/p>\n<p>SoI created this small script, that mounts \/vmimages\/vmiso\/ to a NFS share on a W2K3 server.<br \/>\nThe script is intented to run as part of the Service Console&#8217;s startup routine.<br \/>\nI have implemented a simpel log feature, that logs the date and time the script is run and any errors if any.<\/p>\n<p>Create a file <strong>S99mount<\/strong> with the following content: (<a href=\"http:\/\/www.amikkelsen.com\/?page_id=4\">Download it here<\/a>)<\/p>\n<p>echo &#8220;****************************************&#8221; &gt;&gt; \/tmp\/mount.log<br \/>\ndate &gt;&gt; \/tmp\/mount.log<br \/>\nsleep 30<br \/>\necho &#8220;Start the mount&#8221; &gt;&gt; \/tmp\/mount.log<br \/>\nmount -t smbfs -o username=myusername,password=mypassword \/\/myservername\/myshare \/vmimages\/vmiso\/ &gt;&gt; \/tmp\/mount.log<br \/>\necho &#8221; &#8221; &gt;&gt; \/tmp\/mount.log<\/p>\n<p>Copy the file to <strong>\/etc\/rc3.d\/<\/strong><br \/>\nMake the file executable<br \/>\n<span style=\"font-size: 11pt; line-height: 115%; font-family: 'Courier New';\">chmod 777 \/etc\/rc3.d\/S99mount<\/span><br \/>\nCreate the directory vmiso under \/vmimages\/<br \/>\n<span style=\"font-size: 11pt; line-height: 115%; font-family: 'Courier New';\">mkdir \/vmimages\/vmiso<\/span><br \/>\nChange the firewall to allow outbound traffic for the SMB Client<br \/>\n<span style=\"font-size: 11pt; line-height: 115%; font-family: 'Courier New';\">esxcfg-firewall &#8211;enableService smbClient<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to mount a NAS \/ NFS share in ESX 3.0, then you are not given the option to choose a username and password. This presented me with a small challange because i needed to mount \/vmimages\/vmiso\/ to a share on a W2K3 server. SoI created this small script, that mounts \/vmimages\/vmiso\/ to\u2026 <span class=\"read-more\"><a href=\"http:\/\/www.amikkelsen.com\/?p=3\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-3","post","type-post","status-publish","format-standard","hentry","category-scripting"],"_links":{"self":[{"href":"http:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/posts\/3","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.amikkelsen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3"}],"version-history":[{"count":0,"href":"http:\/\/www.amikkelsen.com\/index.php?rest_route=\/wp\/v2\/posts\/3\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.amikkelsen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.amikkelsen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.amikkelsen.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}