<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

 <title>random writes</title>
 <link href="http://nilic.github.io/atom.xml" rel="self"/>
 <link href="http://nilic.github.io/"/>
 <updated>2016-10-02T18:17:16+00:00</updated>
 <id>http://nilic.github.io</id>
 <author>
   <name>Nebojsa Ilic</name>
   <email>blog@nilic.33mail.com</email>
 </author>

 
 <entry>
   <title>A few VMware Virtual Volumes (VVol) tips</title>
   <link href="http://nilic.github.io/2016/10/02/a-few-vmware-vvols-tips/"/>
   <updated>2016-10-02T00:00:00+00:00</updated>
   <id>http://nilic.github.io/2016/10/02/a-few-vmware-vvols-tips</id>
   <content type="html">&lt;p&gt;VMware Virtual Volumes (VVols) are a vSphere feature which allow for storing VM virtual disks and other files natively on the storage system (instead of on VMFS datastores created on top of LUNs) and managing their placement on the storage system through vSphere storage policies. VVols are available since vSphere 6.0 and require a vSphere Standard or Enterprise Plus license.&lt;/p&gt;

&lt;p&gt;VVols are a pretty fascinating piece of technology, which I’m guessing is set to completely replace VMFS datastores in a few years time. Since this is a fairly new feature without many implementation tips available online, here are a few things to bear in mind when deploying VVols:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;in order to use VVols, besides a VVol certified storage system, HBAs in your ESXi hosts need to support Secondary LUN IDs - to check whether this is the case, refer to the the &lt;a href=&quot;http://www.vmware.com/resources/compatibility/search.php?deviceCategory=io&quot;&gt;VMware Compatibility Guide for IO Devices&lt;/a&gt; and be sure to select &lt;em&gt;Secondary LUNID (Enables VVols)&lt;/em&gt; in the &lt;em&gt;Features&lt;/em&gt; section
    &lt;ul&gt;
      &lt;li&gt;if your hosts are running ESXi 6, you can check for HBA VVol compatibility from the command line by running &lt;code class=&quot;highlighter-rouge&quot;&gt;esxcli storage core adapter list&lt;/code&gt; and noting whether “Capabilites” column contains &lt;em&gt;Second Level Lun ID&lt;/em&gt; for the vmhbas in question&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;although maximum data VVol (= virtual disk) size in vSphere 6.0 is 62 TB, you should check what are the limits on the storage system side, because they could be much less and force you to create multiple VVol datastores on the same system in order to consume its full available capacity; one such example is EMC Unity which allows you to consume up to 16 TB of a single storage pool for a VVol datastore&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;migration of VMs from VMFS to VVol datastores is performed using Storage vMotion and should be initiated &lt;strong&gt;solely&lt;/strong&gt; from the web client; the vSphere C# client doesn’t offer the option to select a storage policy in the Storage vMotion wizard, which results in user-created storage policies being ignored and migrated VMs always being assigned the default “VVol No Requirements Policy”&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;if you are using Veeam Backup and Replication, VVols are supported since VBR 8.0U2b but with a few caveats:
    &lt;ul&gt;
      &lt;li&gt;direct SAN transport mode is not supported&lt;/li&gt;
      &lt;li&gt;Virtual Appliance (Hot Add) processing mode requires that all VBR proxy VM disks are located on the same VVol with the processed VM.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>Trying out Docker client for Windows</title>
   <link href="http://nilic.github.io/2015/07/18/trying-out-docker-client-for-windows/"/>
   <updated>2015-07-18T00:00:00+00:00</updated>
   <id>http://nilic.github.io/2015/07/18/trying-out-docker-client-for-windows</id>
   <content type="html">&lt;p&gt;Docker client for Windows was &lt;a href=&quot;https://azure.microsoft.com/blog/2015/04/16/docker-client-for-windows-is-now-available/&quot;&gt;released a few months ago&lt;/a&gt;, and recently I installed it inside of a Windows 10 CTP machine and tested it against a CentOS 7 serving as a Docker host.&lt;/p&gt;

&lt;p&gt;For the installation I employed the &lt;a href=&quot;https://chocolatey.org/&quot;&gt;Chocolatey&lt;/a&gt; package manager:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;C:\&amp;gt; choco install docker -y
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;which will install the latest version of the client (1.7.0 at the time of writing).&lt;/p&gt;

&lt;p&gt;By default, docker daemon listens only on &lt;code class=&quot;highlighter-rouge&quot;&gt;unix:///var/run/docker.sock&lt;/code&gt; socket and therefore accepts only local connections, so in order to access it from the outside I needed to bind it to a TCP port. So I first stopped the Docker daemon on my container host:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo systemctl stop docker
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;and then ran it like this so it binds to TCP port 2375 in addition to the default socket:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo docker -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock -d &amp;amp;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This was only for the purpose of a quick-and-dirty test, and you can read &lt;a href=&quot;https://docs.docker.com/articles/basics/&quot;&gt;here&lt;/a&gt; why allowing the daemon to accept remote calls in this way isn’t such a great idea security-wise.&lt;/p&gt;

&lt;p&gt;After this, everything was ready for connecting from my Windows client, or so I thought. I tried listing images on the docker host but was greeted with the following error:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;C:\&amp;gt; docker -H 10.0.0.1:2375 info
Error response from daemon: client and server don't have same version (client : 1.19, server: 1.18)
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;After a quick &lt;code class=&quot;highlighter-rouge&quot;&gt;docker -v&lt;/code&gt;, I realized that the daemon was running Docker version 1.6.2, while the client was running version 1.7.0.&lt;/p&gt;

&lt;p&gt;I had no choice but to fire up Chocolatey again and install version 1.6.0 of the client:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;C:\&amp;gt; choco uninstall docker -y
C:\&amp;gt; choco install docker -version 1.6.0 -y
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;and then everything worked as expected:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;C:\&amp;gt; docker -H 10.0.0.1:2375 info
Containers: 0
Images: 33
Storage Driver: devicemapper
...
Kernel Version: 3.10.0-123.el7.x86_64
Operating System: CentOS Linux 7 (Core)
CPUs: 1
Total Memory: 458.4 MiB
Name: dockerhost
ID: DBST:ZQ5O:LOAJ:XG7D:FEBL:6FYO:2JZ3:CQN2:QPK6:6ARN:XBEZ:THVQ
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;If you go back to the Docker host, you’ll notice that your client commands result in calls to the Docker API:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;...
INFO[0680] GET /v1.18/info                              
...
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;where &lt;code class=&quot;highlighter-rouge&quot;&gt;v1.18&lt;/code&gt; is the API version and when a client is running on a higher version than the daemon, a mismatch occurs in the API calls (trying to access &lt;code class=&quot;highlighter-rouge&quot;&gt;/v1.19/info&lt;/code&gt; instead of &lt;code class=&quot;highlighter-rouge&quot;&gt;/v1.18/info&lt;/code&gt; and similar). This explains the problem I originally had, although at the time it seemed kinda odd to me that you cannot use a higher version client to access a lower version daemon.&lt;/p&gt;

&lt;p&gt;In order to avoid having to specify your Docker host parameters with every command, you can set a Windows environment variable &lt;code class=&quot;highlighter-rouge&quot;&gt;DOCKER_HOST&lt;/code&gt; and assign it a value of &lt;code class=&quot;highlighter-rouge&quot;&gt;tcp://&amp;lt;FQDN or IP of Docker host&amp;gt;:&amp;lt;TCP port&amp;gt;&lt;/code&gt;, e.g. &lt;code class=&quot;highlighter-rouge&quot;&gt;tcp://10.0.0.1:2375&lt;/code&gt; in my case. Afterwards, you can run the commands on your Windows client machine as if you’re located directly on the Docker host:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;C:\&amp;gt; docker run -it ubuntu
root@825574d22c14:/# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION=&quot;Ubuntu 14.04.1 LTS&quot;
root@825574d22c14:/# exit
C:\&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Pretty crazy, huh :) Kudos to the Microsoft Azure Linux team for porting the Docker client to Windows, and be sure to read more about their efforts on &lt;a href=&quot;https://ahmetalpbalkan.com/blog/porting-docker-client-to-windows/&quot;&gt;Ahmet Alp Balkan’s blog&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>NetApp cDOT and ESXi SCSI UNMAP support</title>
   <link href="http://nilic.github.io/2015/06/22/netapp-cdot-esxi-scsi-unmap-support/"/>
   <updated>2015-06-22T00:00:00+00:00</updated>
   <id>http://nilic.github.io/2015/06/22/netapp-cdot-esxi-scsi-unmap-support</id>
   <content type="html">&lt;p&gt;I have recently noticed that LUNs created on NetApp cDOT storage systems by default don’t support space reclamation (aka SCSI UNMAP) which is a part of the vSphere VAAI Thin Provisioning primitive:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;~ # esxcli storage core device vaai status get
naa.600a0980424733322f5d444f76513730
   VAAI Plugin Name: VMW_VAAIP_NETAPP
   ATS Status: supported
   Clone Status: supported
   Zero Status: supported
   Delete Status: unsupported
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;and when you try to reclaim space, you are greeted with the following message:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;~ # esxcli storage vmfs unmap -l cdot_01
Devices backing volume 549a787c-f5a4021c-e59d-68b599cbd47c do not support UNMAP
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Based on a short review of a few systems, this seems to be the case only for the cDOT platform (tested on Ontap 8.2 and 8.3), while LUNs created on 7-mode systems show &lt;code class=&quot;highlighter-rouge&quot;&gt;Delete Status: supported&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Explanation for this behavior can be found in the NetApp cDOT official documentation, namely the &lt;a href=&quot;https://library.netapp.com/ecmdocs/ECMP1196784/html/GUID-93D78975-6911-4EF5-BA4E-80E64B922D09.html&quot;&gt;SAN Administration Guide&lt;/a&gt;. The document states that in order for space reclamation to be supported on a LUN:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;LUN needs to be thinly provisioned on the storage system&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;space-allocation&lt;/code&gt; option needs to be enabled on the LUN&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Information on how to enable &lt;code class=&quot;highlighter-rouge&quot;&gt;space-allocation&lt;/code&gt; on a LUN is available in the &lt;a href=&quot;https://library.netapp.com/ecmdocs/ECMP1196784/html/GUID-6AD84908-041A-497D-95A7-BB6AFDD1B282.html&quot;&gt;same guide&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;lun modify -vserver &amp;lt;vs&amp;gt; -volume &amp;lt;vol&amp;gt; -lun &amp;lt;lun&amp;gt; -space-allocation enabled
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;What’s a bugger is that the LUN needs to be &lt;strong&gt;offline&lt;/strong&gt; in order to run this command, so best thing to do would be to enable this prior to presenting the LUN to the hosts.&lt;/p&gt;

&lt;p&gt;One more thing to have in mind is that the &lt;a href=&quot;http://www.vmware.com/resources/compatibility/search.php&quot;&gt;VMware Compatibility Guide&lt;/a&gt; explicitly states that “VAAI Thin Provisioning Space Reclamation is not supported” for ESXi &amp;gt;= 5.5, and Data Ontap &amp;lt; 8.3 (both clustered and 7-mode). So, even if your NetApp LUNs are configured properly for space reclamation, be sure that you are running a supported configuration before initiating a SCSI UNMAP operation from an ESXi host.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Centralized ESXi syslog with ELK feat. SexiLog</title>
   <link href="http://nilic.github.io/2015/04/06/esxi-syslog-with-elk-sexilog/"/>
   <updated>2015-04-06T00:00:00+00:00</updated>
   <id>http://nilic.github.io/2015/04/06/esxi-syslog-with-elk-sexilog</id>
   <content type="html">&lt;p&gt;The ELK stack is a commonly used open source solution for log collection and analysis. It consists of three components:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Elasticsearch - distributed search engine, responsible for storing and searching through the received data;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Logstash - log collector, parser and forwarder;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Kibana - Elasticsearch web frontend, the end user interface for searching and visualizing log data.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are a lot of tutorials on setting up the ELK stack, but if you’re looking into implementing ELK as a centralized (sys)log server for your vSphere environment, you should probably look no further than &lt;a href=&quot;http://www.sexilog.fr/&quot;&gt;SexiLog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To quote the official site - &lt;em&gt;SexiLog is a specific ELK virtual appliance designed for vSphere environment. It’s pre-configured and heavily tuned for VMware ESXi logs.&lt;/em&gt; This means that the nice folks from &lt;a href=&quot;http://www.hypervisor.fr/&quot;&gt;Hypervisor.fr&lt;/a&gt; and &lt;a href=&quot;http://www.vmdude.fr/&quot;&gt;VMdude.fr&lt;/a&gt; have gone through the trouble of installing ELK, optimizing it for vSphere log collection, adding a bunch of other useful tools and packaging everything as an easy to deploy VMware virtual appliance.&lt;/p&gt;

&lt;p&gt;The appliance is a Debian-based VM with 2vCPU, 4GB RAM and 58GB hard drive space (8GB system disk + 50GB disk for storing indexed logs), and is sized for collecting up to 1500 events per second. Default credentials for the appliance are &lt;code class=&quot;highlighter-rouge&quot;&gt;root&lt;/code&gt; / &lt;code class=&quot;highlighter-rouge&quot;&gt;Sex!Log&lt;/code&gt; and after each log in you will be greeted with a menu that can be used for basic configuration and operations. Since this “SexiMenu” is a bash script which can be run manually from &lt;code class=&quot;highlighter-rouge&quot;&gt;/root/seximenu/seximenu.sh&lt;/code&gt;, if you want to avoid it and log in directly to shell each time, you can simply comment out the last three lines from &lt;code class=&quot;highlighter-rouge&quot;&gt;/root/.bashrc&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;After deploying the appliance, you’ll need to configure your ESXi hosts to start sending syslog data, which can be done manually through &lt;a href=&quot;http://kb.vmware.com/kb/2003322&quot;&gt;vSphere client or ESXCLI&lt;/a&gt; or in an automated manner, e.g. with &lt;a href=&quot;http://blogs.vmware.com/vsphere/2013/07/log-insight-bulk-esxi-host-configuration-with-powercli.html&quot;&gt;PowerCLI&lt;/a&gt;. Besides syslog, SexiLog also offers the possibility of collecting SNMP traps (and has Logstash SNMP grok patterns optimized for ESXi and Veeam Backup and Replication), as well as vCenter &lt;code class=&quot;highlighter-rouge&quot;&gt;vpxd&lt;/code&gt; logs and Windows event logs with the help of the &lt;a href=&quot;http://nxlog.co/products/nxlog-community-edition&quot;&gt;NXLog agent&lt;/a&gt;. For more info, &lt;a href=&quot;http://www.sexilog.fr/rtfm/&quot;&gt;RTFM&lt;/a&gt; :)&lt;/p&gt;

&lt;h2 id=&quot;sexilog-goodies&quot;&gt;SexiLog goodies&lt;/h2&gt;

&lt;p&gt;SexiLog offers much more than just a vanilla ELK installation. Besides providing Logstash filters optimized for vCenter, ESXi and Veeam B&amp;amp;R log and SNMP trap collection, it also comes with a bunch of &lt;a href=&quot;http://www.sexilog.fr/sexiboards/&quot;&gt;pre-configured Kibana dashboards&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Then, there is a notification service powered by &lt;a href=&quot;http://riemann.io/&quot;&gt;Riemann&lt;/a&gt;, which receives warnings and alerts from Logstash and either sends them every 10 minutes (critical alerts) or aggregates them and e-mails them once per hour (all other alerts). You can check out which events are considered critical by looking at Logstash configuration files located at &lt;code class=&quot;highlighter-rouge&quot;&gt;/etc/logstash/conf.d/&lt;/code&gt; and searching for rules which add the &lt;em&gt;achtung&lt;/em&gt; tag. In order for Riemann to do its job, it is necessary to configure SMTP parameters for the appliance, which can be done through the SexiMenu (option 7).&lt;/p&gt;

&lt;p&gt;Another important part of SexiLog is &lt;a href=&quot;https://github.com/elasticsearch/curator&quot;&gt;Curator&lt;/a&gt;, which is used for purging Elasticsearch indices, in order for them not to fill up the &lt;code class=&quot;highlighter-rouge&quot;&gt;/dev/sdb1&lt;/code&gt; partition used for storing logs. Curator runs once per hour, as defined in &lt;code class=&quot;highlighter-rouge&quot;&gt;/etc/crontab&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;5 * * * * root curator delete --disk-space 40
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;and takes maximum allowed size of indices in GB as the input parameter. By default this is set to 40[GB] and should be changed if you decide to extend SexiLog’s hard disk no. 2.&lt;/p&gt;

&lt;p&gt;Also, for more info about the health and performance of the Elasticsearch service,  SexiLog provides two useful plugins - &lt;a href=&quot;https://github.com/mobz/elasticsearch-head&quot;&gt;Head&lt;/a&gt; and &lt;a href=&quot;http://bigdesk.org/&quot;&gt;Bigdesk&lt;/a&gt;, which can be accessed from &lt;code class=&quot;highlighter-rouge&quot;&gt;http://&amp;lt;sexilog_IP_or_FQDN&amp;gt;/_plugin/head&lt;/code&gt; and  &lt;code class=&quot;highlighter-rouge&quot;&gt;http://&amp;lt;sexilog_IP_or_FQDN&amp;gt;/_plugin/bigdesk&lt;/code&gt;.&lt;/p&gt;

&lt;h2 id=&quot;feature-requests&quot;&gt;Feature requests&lt;/h2&gt;

&lt;p&gt;Two possible improvements have come to my mind while using SexiLog. First, it would be nice if there was a way to provide user authentication for accessing the Kibana interface (maybe &lt;a href=&quot;https://github.com/fangli/kibana-authentication-proxy&quot;&gt;kibana-authentication-proxy&lt;/a&gt; could help with this since &lt;a href=&quot;https://www.elastic.co/products/shield&quot;&gt;Shield&lt;/a&gt; seems to be a commercial product?). Also, an option to export search results would be useful (e.g. when dealing with techical support), but this seems to be a current limitation of Elasticsearch/Kibana.&lt;/p&gt;

&lt;h2 id=&quot;further-steps&quot;&gt;Further steps&lt;/h2&gt;

&lt;p&gt;For more information about SexiLog check out the &lt;a href=&quot;http://sexilog.fr/&quot;&gt;site&lt;/a&gt;, and be sure to try out the &lt;a href=&quot;http://demo.sexilog.fr/&quot;&gt;demo&lt;/a&gt;. You can also contribute to this great project via &lt;a href=&quot;https://github.com/sexilog/sexilog&quot;&gt;Github&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Exploring VCSA embedded PostgreSQL database</title>
   <link href="http://nilic.github.io/2015/03/21/exploring-vcsa-embedded-postgresql-database/"/>
   <updated>2015-03-21T00:00:00+00:00</updated>
   <id>http://nilic.github.io/2015/03/21/exploring-vcsa-embedded-postgresql-database</id>
   <content type="html">&lt;p&gt;Since vSphere 5.0U1, VMware vCenter Server Appliance (VCSA) uses vPostgres - VMware flavored PostgreSQL as the embedded database. This post describes how to connect to the VCSA vPostgres server locally and remotely, and perform database backups using native PostgreSQL tools.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Following procedures are probably unsupported by VMware and are given here just for the fun of hacking around VCSA. The instructions have been tested for VCSA 5.5 and 6.0 (VCSA 6.0 requires additional steps which can be found at the bottom of the post).&lt;/p&gt;

&lt;h2 id=&quot;connecting-to-postgresql-server-locally&quot;&gt;Connecting to PostgreSQL server locally&lt;/h2&gt;

&lt;p&gt;After logging to the VCSA over SSH or console, you can easily connect to the PostgreSQL server locally using &lt;code class=&quot;highlighter-rouge&quot;&gt;psql&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;/opt/vmware/vpostgres/current/bin/psql -U postgres&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After connecting you can use psql or regular SQL commands, e.g.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;# /opt/vmware/vpostgres/current/bin/psql -U postgres
psql.bin (9.3.5 (VMware Postgres 9.3.5.2-2444648 release))
Type &quot;help&quot; for help.

postgres=# \du
                             List of roles
 Role name |                   Attributes                   | Member of 
-----------+------------------------------------------------+-----------
 postgres  | Superuser, Create role, Create DB, Replication | {}
 vc        | Create DB                                      | {}
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Here we see that there are two users defined in the PostgreSQL server, the &lt;code class=&quot;highlighter-rouge&quot;&gt;postgres&lt;/code&gt; superuser, and the &lt;code class=&quot;highlighter-rouge&quot;&gt;vc&lt;/code&gt; user, used by vCenter for connecting to its database.&lt;/p&gt;

&lt;h2 id=&quot;enabling-remote-postgresql-server-access&quot;&gt;Enabling remote PostgreSQL server access&lt;/h2&gt;

&lt;p&gt;By default, only local connections to the database server are allowed. In order to allow remote access (e.g. so that you can connect via GUI based administrative tools such as &lt;a href=&quot;http://www.pgadmin.org/&quot;&gt;pgAdmin&lt;/a&gt;), first take a look at the following files:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;/etc/vmware-vpx/embedded_db.cfg&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;/etc/vmware-vpx/vcdb.properties&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;embedded_db.cfg&lt;/code&gt; file stores general PostgreSQL server information (as well as the password for the &lt;code class=&quot;highlighter-rouge&quot;&gt;postgres&lt;/code&gt; superuser), while &lt;code class=&quot;highlighter-rouge&quot;&gt;vcdb.properties&lt;/code&gt; stores connection information for the vCenter server database &lt;code class=&quot;highlighter-rouge&quot;&gt;VCDB&lt;/code&gt;, along with the password for the &lt;code class=&quot;highlighter-rouge&quot;&gt;vc&lt;/code&gt; user. Take a note of these passwords, since you’ll be required to supply them for remote access.&lt;/p&gt;

&lt;p&gt;Then, edit the &lt;code class=&quot;highlighter-rouge&quot;&gt;/storage/db/vpostgres/pg_hba.conf&lt;/code&gt; configuration file in order to allow your IP to connect to the PostgreSQL server by adding the following line:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;host    all             all             1.2.3.4/24          md5
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;replacing &lt;code class=&quot;highlighter-rouge&quot;&gt;1.2.3.4/24&lt;/code&gt; with the actual IP address or range of addresses for which you want to allow access (e.g. &lt;code class=&quot;highlighter-rouge&quot;&gt;192.168.1.0/24&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Next, edit the &lt;code class=&quot;highlighter-rouge&quot;&gt;/storage/db/vpostgres/postgresql.conf&lt;/code&gt; in order to configure PostgreSQL server to listen on all available IP addresses by adding the following line:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;listen_addresses = '*'
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Finally, restart the PostgreSQL server by running&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;/etc/init.d/vmware-vpostgres restart&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&quot;backing-up-the-vcenter-database&quot;&gt;Backing up the vCenter database&lt;/h2&gt;

&lt;p&gt;For information on using native PostgreSQL tools to perform VCDB backups and restores check out &lt;a href=&quot;http://kb.vmware.com/kb/2034505&quot;&gt;VMware KB 2034505&lt;/a&gt;. The requirement for the vCenter service to be stopped during the database backup seems kinda redundant, since &lt;code class=&quot;highlighter-rouge&quot;&gt;pg_dump&lt;/code&gt; should perform consistent backups even if the database is in use.&lt;/p&gt;

&lt;p&gt;Sample backup scripts and instructions on how to schedule them via &lt;code class=&quot;highlighter-rouge&quot;&gt;cron&lt;/code&gt; can be found on &lt;a href=&quot;http://bidabe.zapto.org/?p=360&quot;&gt;Florian Bidabe’s&lt;/a&gt; and &lt;a href=&quot;http://vninja.net/virtualization/vpostgres-database-backup-vcsa-5-5/&quot;&gt;vNinja&lt;/a&gt; blogs. Since &lt;code class=&quot;highlighter-rouge&quot;&gt;mount.nfs&lt;/code&gt; is available on the VCSA, it seems that you can even use an NFS share as a destination for your VCDB backups (haven’t tested it though).&lt;/p&gt;

&lt;h2 id=&quot;vcsa-60-additional-steps&quot;&gt;VCSA 6.0 additional steps&lt;/h2&gt;

&lt;p&gt;VCSA 6.0 comes extra hardened compared to previous vSphere editions and additional steps are needed in order to allow remote access to the OS and then to the PostgreSQL server.&lt;/p&gt;

&lt;p&gt;First, you need to enable SSH access to VCSA. This can be done during the deployment, or later, over VM console (similar interface to ESXi DCUI: &lt;strong&gt;F2&lt;/strong&gt; - &lt;strong&gt;Troubleshooting Mode Options&lt;/strong&gt; - &lt;strong&gt;Enable SSH&lt;/strong&gt;) or vSphere Web Client (&lt;strong&gt;Home&lt;/strong&gt; - &lt;strong&gt;System Configuration&lt;/strong&gt; - &lt;strong&gt;Nodes&lt;/strong&gt; - &lt;strong&gt;Manage&lt;/strong&gt; - &lt;strong&gt;Settings&lt;/strong&gt; - &lt;strong&gt;Access&lt;/strong&gt;).&lt;/p&gt;

&lt;p&gt;After logging as &lt;code class=&quot;highlighter-rouge&quot;&gt;root&lt;/code&gt; over SSH, you will be greeted with a limited shell called &lt;code class=&quot;highlighter-rouge&quot;&gt;appliancesh&lt;/code&gt;. To switch to &lt;code class=&quot;highlighter-rouge&quot;&gt;bash&lt;/code&gt; temporarily, run:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;shell.set --enabled True
shell
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;For switching to &lt;code class=&quot;highlighter-rouge&quot;&gt;bash&lt;/code&gt;  permanently you can follow the instructions from &lt;a href=&quot;http://www.virtuallyghetto.com/2015/03/how-to-changedeploy-vcsa-6-0-with-default-bash-shell-vs-appliancesh.html&quot;&gt;this virtuallyGhetto post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The final step is to allow external access to the PostgreSQL through the VCSA IPTables-based firewall. This can be done by editing the &lt;code class=&quot;highlighter-rouge&quot;&gt;/etc/vmware/appliance/firewall/vmware-vpostgres&lt;/code&gt; file so that it looks like this:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;firewall&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;enable&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;rules&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;direction&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;inbound&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;protocol&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;tcp&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;porttype&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;dst&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;port&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;5432&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;portoffset&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;internal-ports&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;rules&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;server_port&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;port&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5432&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Afterwards, reload VCSA firewall by running&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;/usr/lib/applmgmt/networking/bin/firewall-reload&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;and PostgreSQL server should be accessible from the outside world after configuring &lt;code class=&quot;highlighter-rouge&quot;&gt;pg_hba.conf&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;postgresql.conf&lt;/code&gt; as described above.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Trying out CoreOS on vSphere</title>
   <link href="http://nilic.github.io/2015/03/12/trying-out-coreos-on-vsphere/"/>
   <updated>2015-03-12T00:00:00+00:00</updated>
   <id>http://nilic.github.io/2015/03/12/trying-out-coreos-on-vsphere</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;https://coreos.com/&quot;&gt;CoreOS&lt;/a&gt; is a minimal Linux distribution created to serve as a host for running &lt;a href=&quot;http://www.docker.com&quot;&gt;Docker&lt;/a&gt; containers. Here’s some info on how to try it out on vSphere.&lt;/p&gt;

&lt;p&gt;Since stable release 557, CoreOS comes packaged as an OVA and is supported as a guest OS on vSphere 5.5 and above. Deployment instructions can be found in &lt;a href=&quot;http://kb.vmware.com/kb/2109161&quot;&gt;VMware KB 2109161&lt;/a&gt; and they are pretty much straightforward, with the exception of the need to modify boot parameters in order to change the password for the &lt;code class=&quot;highlighter-rouge&quot;&gt;core&lt;/code&gt; user before logging in for the first time.&lt;/p&gt;

&lt;p&gt;vCenter customization of CoreOS is currently not supported and customization can be done only through &lt;code class=&quot;highlighter-rouge&quot;&gt;coreos-cloudinit&lt;/code&gt;. This is a CoreOS implementation of &lt;a href=&quot;http://cloudinit.readthedocs.org/en/latest/&quot;&gt;cloud-init&lt;/a&gt;, a mechanism for boot time customization of Linux instances, which can be employed on vSphere with some manual effort. More info on &lt;code class=&quot;highlighter-rouge&quot;&gt;coreos-cloudinit&lt;/code&gt; and its configuration files called &lt;code class=&quot;highlighter-rouge&quot;&gt;cloud-config&lt;/code&gt; can be found in the &lt;a href=&quot;https://coreos.com/docs/cluster-management/setup/cloudinit-cloud-config/&quot;&gt;CoreOS Cloud-Config Documentation page&lt;/a&gt;, while for a tutorial on how to make Cloud-Config work in vSphere take a look at &lt;a href=&quot;http://www.chrismoos.com/2014/05/28/coreos-with-cloud-config-on-vmware-esxi&quot;&gt;CoreOS with Cloud-Config on VMware ESXi&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;CoreOS comes with integrated &lt;code class=&quot;highlighter-rouge&quot;&gt;open-vm-tools&lt;/code&gt;, an open source implementation of VMware Tools, which is quite handy since CoreOS doesn’t offer a package manager or Perl, so no way to manually install VMware Tools after deployment. According to &lt;a href=&quot;https://www.vmware.com/resources/compatibility/search.php&quot;&gt;VMware Compatibility Guide&lt;/a&gt;, the &lt;code class=&quot;highlighter-rouge&quot;&gt;open-vm-tools&lt;/code&gt; package has recently become the recommended way for running VMware Tools on newer Linux distros and vSphere editions (e.g. RHEL/CentOS 7.x and Ubuntu &amp;gt;=14.04 on vSphere 5.5 and above). For more info on &lt;code class=&quot;highlighter-rouge&quot;&gt;open-vm-tools&lt;/code&gt; head to &lt;a href=&quot;http://kb.vmware.com/kb/2073803&quot;&gt;VMware KB 2073803&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As for CoreOS stable releases prior to 557, releases 522 and 494 are supported on vSphere as a &lt;a href=&quot;http://kb.vmware.com/kb/2015161&quot;&gt;Technical Preview&lt;/a&gt;. Since they don’t come prepackaged in a format that can be used directly on vSphere, their deployment involves one additional step - converting the downloaded .vmx file to OVF via &lt;a href=&quot;https://developercenter.vmware.com/web/dp/tool/ovf&quot;&gt;OVF Tool&lt;/a&gt;. Check out &lt;a href=&quot;http://kb.vmware.com/kb/2104303&quot;&gt;VMware KB 2104303&lt;/a&gt; for detailed installation instructions.&lt;/p&gt;

&lt;h2 id=&quot;coreos-quickstart&quot;&gt;CoreOS quickstart&lt;/h2&gt;

&lt;p&gt;After logging in for the first time, you’ll probably want to start building and running containers. Obviously, Docker comes preinstalled and CoreOS currently uses BTRFS as the filesystem for storing images and containers:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ docker -v
Docker version 1.4.1, build 5bc2ff8-dirty
$ docker info
Containers: 0
Images: 23
Storage Driver: btrfs
 Build Version: Btrfs v3.17.1
 Library Version: 101
Execution Driver: native-0.2
Kernel Version: 3.18.1
Operating System: CoreOS 557.2.0
CPUs: 2
Total Memory: 5.833 GiB
Name: core557
ID: 2BUV:642W:WTZQ:3L4O:FFIY:JOC5:XKO2:3QPC:ADEJ:LSCS:QS5K:XHKB
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;As mentioned before, CoreOS doesn’t offer a way to install additional packages directly to the OS, but provides &lt;strong&gt;Toolbox&lt;/strong&gt;, which is by default a stock Fedora Docker container that can be used for installing sysadmin tools. Toolbox can be run using &lt;code class=&quot;highlighter-rouge&quot;&gt;/usr/bin/toolbox&lt;/code&gt;, first execution of which will pull and run the container:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ toolbox 
fedora:latest: The image you are pulling has been verified
00a0c78eeb6d: Pull complete 
834629358fe2: Pull complete 
834629358fe2: Pulling fs layer 
Status: Downloaded newer image for fedora:latest
core-fedora-latest
Spawning container core-fedora-latest on /var/lib/toolbox/core-fedora-latest.
Press ^] three times within 1s to kill container.
-bash-4.3#
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;After that, packages are &lt;code class=&quot;highlighter-rouge&quot;&gt;yum install &amp;lt;package&amp;gt;&lt;/code&gt; away, while CoreOS filesystem is mounted inside the container to &lt;code class=&quot;highlighter-rouge&quot;&gt;/media/root&lt;/code&gt;.&lt;/p&gt;

&lt;h2 id=&quot;further-reading&quot;&gt;Further reading&lt;/h2&gt;

&lt;p&gt;Compared to traditional Linux distributions, CoreOS has a fundamentally different approach to perfoming updates, which involves automatic upgrades of the complete OS as soon as the new release is available . Therefore, take a look at the &lt;a href=&quot;https://coreos.com/using-coreos/updates/&quot;&gt;CoreOS Update Philosophy&lt;/a&gt; in order not to be surprised when your container hosts start automatically upgrading and rebooting themselves.&lt;/p&gt;

&lt;p&gt;For running containers at scale, check out CoreOS documentation pages on &lt;a href=&quot;https://coreos.com/using-coreos/etcd/&quot;&gt;etcd&lt;/a&gt; and &lt;a href=&quot;https://coreos.com/using-coreos/clustering/&quot;&gt;fleet&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>List host's modified advanced settings via ESXCLI</title>
   <link href="http://nilic.github.io/2015/02/06/list-modified-advanced-settings-via-esxcli/"/>
   <updated>2015-02-06T00:00:00+00:00</updated>
   <id>http://nilic.github.io/2015/02/06/list-modified-advanced-settings-via-esxcli</id>
   <content type="html">&lt;p&gt;Just wanted to share a great tip by &lt;a href=&quot;http://atherbeg.com/&quot;&gt;Ather Beg&lt;/a&gt; on how to display all of ESXi host’s advanced settings which are different than the default values via ESXCLI:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;esxcli system settings advanced list -d
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;This will return a list of advanced settings similar to:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;...

   Path: /Net/TcpipHeapSize
   Type: integer
   Int Value: 32
   Default Int Value: 0
   Min Value: 0
   Max Value: 32
   String Value: 
   Default String Value: 
   Valid Characters: 
   Description: Initial size of the tcpip module heap in megabytes. (REQUIRES REBOOT!)

   Path: /NFS/MaxVolumes
   Type: integer
   Int Value: 256
   Default Int Value: 8
   Min Value: 8
   Max Value: 256
   String Value: 
   Default String Value: 
   Valid Characters: 
   Description: Maximum number of mounted NFS volumes. TCP/IP heap must be increased accordingly (Requires reboot)

...
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;where &lt;strong&gt;Int Value&lt;/strong&gt; / &lt;strong&gt;String Value&lt;/strong&gt; (depending whether the parameter stores its value as integer or string) shows the current value for the parameter, while &lt;strong&gt;Default Int Value&lt;/strong&gt; / &lt;strong&gt;Default String Value&lt;/strong&gt; show its default value.&lt;/p&gt;

&lt;p&gt;Source: &lt;a href=&quot;http://atherbeg.com/2014/11/10/protip-how-to-remind-yourself-of-advanced-settings-changes-in-esxi/&quot;&gt;ProTip: How to remind yourself of Advanced Settings changes in ESXi&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>vSphere CBT bug (and PowerCLI to the rescue)</title>
   <link href="http://nilic.github.io/2015/01/24/vsphere-cbt-bug-powercli-to-the-rescue/"/>
   <updated>2015-01-24T00:00:00+00:00</updated>
   <id>http://nilic.github.io/2015/01/24/vsphere-cbt-bug-powercli-to-the-rescue</id>
   <content type="html">&lt;p&gt;A few months ago, VMware published information about a pretty catastrophic vSphere bug described in &lt;a href=&quot;http://kb.vmware.com/kb/2090639&quot;&gt;VMware KB 2090639&lt;/a&gt;. TLDR version: if you have expanded a CBT-enabled .vmdk past any 128GB boundary (e.g. 128GB, 256GB, 512GB etc.), all your backups since are possibly corrupted.&lt;/p&gt;

&lt;p&gt;The above KB article provides workaround information for this issue, which involves resetting CBT for the affected VMs. This can be accomplished either via shutting down the VM and editing its Configuration Parameters or on-the-fly via PowerCLI / VDDK API. &lt;a href=&quot;http://www.veeam.com/kb1940&quot;&gt;Veeam KB 1940&lt;/a&gt; provides PowerCLI code which can be employed for resetting CBT for all CBT-enabled VMs in the vCenter inventory, without the need for shutting them down first.&lt;/p&gt;

&lt;p&gt;I have adapted this code to a quick-and-dirty PowerCLI script, which can be found &lt;a href=&quot;https://github.com/nilic/powercli/blob/master/ResetCBT.ps1&quot;&gt;here&lt;/a&gt; (for those not familiar with Github, clicking on &lt;strong&gt;raw&lt;/strong&gt; will take you directly to the script).&lt;/p&gt;

&lt;p&gt;Just take notice that the script will create and instantly delete a snapshot for &lt;em&gt;all&lt;/em&gt; CBT-enabled VMs, so it’s probably a good idea not to execute the script during work hours. Also, the first following backup will last longer, since backup software won’t be able to use CBT information and will have to scan the whole .vmdk for changed blocks.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Downloading files with wget on ESXi</title>
   <link href="http://nilic.github.io/2015/01/15/downloading-files-with-wget-on-esxi/"/>
   <updated>2015-01-15T00:00:00+00:00</updated>
   <id>http://nilic.github.io/2015/01/15/downloading-files-with-wget-on-esxi</id>
   <content type="html">&lt;p&gt;A limited set of familiar POSIX-like tools and utilities is available on ESXi, courtesy of the &lt;a href=&quot;http://www.busybox.net/&quot;&gt;busybox&lt;/a&gt; executable:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;~ # /usr/lib/vmware/busybox/bin/busybox --list
[
[[
addgroup
adduser
ash
awk
basename
cat
chgrp
chmod
chown
chvt
cksum
clear
cp
crond
cut
date
dd
delgroup
deluser
diff
dirname
dnsdomainname
du
echo
egrep
eject
env
expr
false
fdisk
fgrep
find
getty
grep
groups
gunzip
gzip
halt
head
hexdump
hostname
inetd
init
kill
ln
logger
login
ls
lzop
lzopcat
md5sum
mkdir
mkfifo
mknod
mktemp
more
mv
nohup
nslookup
od
passwd
poweroff
printf
readlink
reboot
reset
resize
rm
rmdir
sed
seq
setsid
sh
sha1sum
sha256sum
sha512sum
sleep
sort
stat
stty
sum
sync
tail
tar
tee
test
time
timeout
touch
true
uname
uniq
unlzop
unzip
usleep
vi
watch
wc
wget
which
who
xargs
zcat
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;As you can see, one of the tools present is &lt;code class=&quot;highlighter-rouge&quot;&gt;wget&lt;/code&gt; which can be used for downloading files (e.g. installation ISOs, VIBs, offline bundles..) directly from the ESXi Shell, instead of first downloading locally to your desktop or jumphost and then uploading to hosts or datastores.&lt;/p&gt;

&lt;p&gt;First, connect to ESXi Shell over SSH or DCUI and &lt;code class=&quot;highlighter-rouge&quot;&gt;cd&lt;/code&gt; into the destination directory, which can be e.g. a shared datastore available to all hosts in your cluster:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;cd /vmfs/volumes/datastore_name_here
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;or host’s &lt;code class=&quot;highlighter-rouge&quot;&gt;/tmp&lt;/code&gt; directory (common choice for VIBs and offline bundles since it gets emptied on reboot). After that, just fire wget away as &lt;code class=&quot;highlighter-rouge&quot;&gt;wget &amp;lt;file URL&amp;gt;&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;~ # cd /vmfs/volumes/ISO_images/
.. # wget http://releases.ubuntu.com/14.04.1/ubuntu-14.04.1-server-amd64.iso
Connecting to releases.ubuntu.com (91.189.92.163:80)
ubuntu-14.04.1-serve 100% |*****************************|   572M  0:00:00 ETA
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Here we downloaded Ubuntu Server installation ISO directly to our “ISO_images” datastore.&lt;/p&gt;

&lt;h2 id=&quot;direct-installation-of-vibs-from-an-url&quot;&gt;Direct installation of VIBs from an URL&lt;/h2&gt;

&lt;p&gt;Downloading installation ISOs is far from a best practice, since it’s probably not the best idea to use your host’s resources for downloading large files from the Internet, but the wget approach can save you same time if you’re often manually installing VIBs or offline bundles on your ESXi hosts.&lt;/p&gt;

&lt;p&gt;For VIB files, an alternative to wget-ing and then installing the VIB would be to directly supply the URL of the VIB file to the &lt;code class=&quot;highlighter-rouge&quot;&gt;esxcli software vib install&lt;/code&gt; command:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;esxcli software vib install -v &amp;lt;URL of the VIB file&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;e.g.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/tmp # esxcli software vib install -v http://vibsdepot.v-front.de/depot/DAST/iperf-2.0.5/iperf-2.0.5-1.x86_64.vib --no-sig-check
Installation Result
   Message: Operation finished successfully.
   Reboot Required: false
   VIBs Installed: DAST_bootbank_iperf_2.0.5-1
   VIBs Removed: 
   VIBs Skipped: 
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Here we installed &lt;a href=&quot;http://www.hypervisor.fr/&quot;&gt;hypervisor.fr&lt;/a&gt; iperf for ESXi VIB directly from the &lt;a href=&quot;http://vibsdepot.v-front.de/wiki/index.php/Welcome&quot;&gt;V-Front Software Depot&lt;/a&gt;. &lt;code class=&quot;highlighter-rouge&quot;&gt;--no-sig-check&lt;/code&gt; is there to bypass signature verification, since the iperf VIB we are installing doesn’t have one.&lt;/p&gt;

&lt;p&gt;As &lt;code class=&quot;highlighter-rouge&quot;&gt;esxcli software vib install --help&lt;/code&gt; informs us, the supplied URL can be HTTP, HTTPS or FTP. URLs can be supplied only to the command’s &lt;code class=&quot;highlighter-rouge&quot;&gt;-v&lt;/code&gt; switch, so this approach is limited to VIB files and not available for offline bundles.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Search available ESXCLI commands</title>
   <link href="http://nilic.github.io/2014/11/28/search-available-esxcli-commands/"/>
   <updated>2014-11-28T00:00:00+00:00</updated>
   <id>http://nilic.github.io/2014/11/28/search-available-esxcli-commands</id>
   <content type="html">&lt;p&gt;A way to search through available ESXCLI commands from ESXi Shell, vCLI or vMA:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;esxcli esxcli command list | grep &amp;lt;keyword&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;E.g.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;~ # esxcli esxcli command list | grep snmp
system.snmp                                             get         
system.snmp                                             hash        
system.snmp                                             set         
system.snmp                                             test
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
</content>
 </entry>
 

</feed>
