Setup an L2TP/IPSEC VPN On Your Ubitquiti EdgeRouter

The planned follow up to the Ubiquiti UniFi AP deployment/RaspberryPi controller post about running an ELK stack on the controller is on hold; there are no preexisting binaries for the ARM platform and a successful compile from source has eluded me so far.  So instead we’re going to walk through setting up an L2TP/IPSEC VPN up on Ubiquiti’s EdgeRouter line of routers.  Ubiquiti has a good guide here that will get you 90% of the way there, but is missing a few key pieces of info.

Continue reading…

Deploying Ubiquiti UniFi APs with a RaspberryPi 2 Controller

I recently got fed up with the mediocre coverage and speeds of my home wireless network even after throwing DD-WRT on the pair of APs (Netgear and Linksys .11n) to eek out all the performance I could.  So I decided to take the plunge and go up market a bit with a couple APs from Ubiquiti Networks.

Ubiquiti UniFi APsI went with a pair of UAP (.11n) and UA-AC-LR (.11ac) units for a mix of coverage in light usage areas and better performance in high usage areas, along with a RaspberryPi 2 to act as the controller.    Since the UniFi APs are becoming more popular among home users, and I can’t be the only one wary of putting management functions in the cloud, I decided to document the setup process. Continue reading…

How to Install git on Centos 7

I found my self needing git to pull down scripts for ansible. Thus this is how to configure git on Centos 7.

 

  1. # yum install git -y
  2. git --version
  3. You should see a version like this. Install Done!

git version

 

  1. Next lets configure it!
  2. # git config --global user.name "Your Name"
  3. # git config –global user.email “[email protected]
  4.  # git config –list
  5. You should see the following, and we are done!

configgit

  1. Lets create a new location for our git repository
  2. mkdir /git
  3. cd /git
  4. git init
  5. now lets pull down a configure we want to use.
  6. the command git clone (URL) clones a entire repository down to your server or workstation.
  7. Enjoy!

 

Sources.

How To Install Git on CentOS 7 https://www.digitalocean.com/community/tutorials/how-to-install-git-on-centos-7

Using Git with Github. http://blog.scottlowe.org/2015/01/26/using-git-with-github/

A Non-Programmer’s Introduction to Git http://blog.scottlowe.org/2015/01/14/non-programmer-git-intro/

credit to Scott Lowe and Josh Barnett

 

 

 

Roger L

PowerCLI: Get VM disk usage per cluster

powercli

 

 

Today I was asked to gather a list of all VMs within a given cluster and report on their disk usage (all the VMs are thick provisioned) and currently do not have a tool to perform a seemly simple task. After some searching I have found many versions of this script around the internet but none that quite suited me needs. I have modified about 50% of the original script to suit my needs and added these features.

  • Prompts for vCenter hostname or IP
  • Requires user to select a cluster
  • Queries vCenter for list of cluster names (for use above)
  • Limits results to specified cluster
  • Prompts for output filename
  • Default saves to current user’s Documents folder
  • Prints location of filename
  • Auto launches file once complete

I should also mention that I am not a script writer. My abilities exist in finding, understanding (most of the time), and modifying existing Powershell scripts. I will be unable to assist with drastic modifications to any script.

Requirements: VMware PowerCLI, vCenter Credentials with appropriate permissions

How to run: Save below script to .ps1 format and run from PowerCLI. No need to modify anything to make compatible with your environment.

$vCenterName = Read-Host -Prompt ‘Enter vCenter hostname or IP’
Write-Host “Connecting…”
connect-viserver $vCenterName

$MyCollection = @()

get-cluster | select-object name
$ClusterName = Read-Host -Prompt ‘Enter Cluster Name (must be exact)’
$ClusterFilter = get-view -ViewType ClusterComputeResource -Property Name -Filter @{“Name” = $ClusterName } | select -ExpandProperty MoRef

$AllVMs = Get-View -ViewType VirtualMachine -SearchRoot $ClusterFilter | Where {-not $_.Config.Template}
$SortedVMs = $AllVMs | Select *, @{N=”NumDisks”;E={@($_.Guest.Disk.Length)}} | Sort-Object -Descending NumDisks

ForEach ($VM in $SortedVMs){
$Details = New-object PSObject
$Details | Add-Member -Name Name -Value $VM.name -Membertype NoteProperty
$DiskNum = 0
Foreach ($disk in $VM.Guest.Disk){
$Details | Add-Member -Name “Disk$($DiskNum)path” -MemberType NoteProperty -Value $Disk.DiskPath
$Details | Add-Member -Name “Disk$($DiskNum)Capacity(MB)” -MemberType NoteProperty -Value ([fusion_builder_container hundred_percent=”yes” overflow=”visible”][fusion_builder_row][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][math]::Round($disk.Capacity/ 1MB))
$Details | Add-Member -Name “Disk$($DiskNum)FreeSpace(MB)” -MemberType NoteProperty -Value ([math]::Round($disk.FreeSpace / 1MB))
$DiskNum++
}
$MyCollection += $Details
}

$OutputFileName = Read-Host ‘Enter filename including extension (.csv)’
$MyCollection | Export-Csv $env:USERPROFILE\Documents\$OutputFileName

Write-Host “File has been saved to” $env:USERPROFILE\Documents\$OutputFileName

explorer.exe $env:USERPROFILE\Documents\$OutputFileName

# Out-GridView, Export-Csv, ConvertTo-Html or ConvertTo-Xml can be used above instead

 


[/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]

How to Install and config Ansible on CentOS 7.

In preparation for my lab and openstack testing. I wanted to look at implementing a automation tool. I decided on ansible, as I haven’t used it, and I like a challenge. 🙂

What is ansible?

I turn to Wikipedia.

Ansible (software)

From Wikipedia, the free encyclopedia

 

Ansible, a free-software platform for configuring and managing computers, combines multi-node software deployment, ad hoc task execution, and configuration management.[fusion_builder_container hundred_percent=”yes” overflow=”visible”][fusion_builder_row][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][1] It manages nodes (which must have Python 2.4 or later installed on them) over SSH or over PowerShell.[2] Modules work over JSON and standard output and can be written in any programming language. The system uses YAML to express reusable descriptions of systems.[3]

Michael DeHaan, the author of the provisioning server application Cobbler and co-author of the Func framework for remote administration, developed the platform.[4] It is included as part of the Fedora distribution of Linux, owned by Red Hat Inc., and is also available for Red Hat Enterprise Linux, CentOS, and Scientific Linux via Extra Packages for Enterprise Linux (EPEL) as well as for other operating systems.[5] Ansible, Inc commercially supports and sponsors Ansible[6] On 16 October, 2015, Red Hat Inc. announced that it had signed a definitive agreement to acquire Ansible, Inc.[7][8]

The name “Ansible” references the fictional instantaneous hyperspace communication system (featured in Orson Scott Card‘s Ender’s Game,[9] and originally invented by Ursula K. Le Guin for her 1966 novel Rocannon’s World).”

 

 

After some research on how to install Ansible on Centos 7, I found this write up quite detailed.

 

Ansible is a free & open source Configuration and automation tool for UNIX like operating system. It is written in python and similar to Chef or Puppet but there is one difference and advantage of Ansible is that we don’t need to install any agent on the nodes. It uses SSH for making communication to its nodes.

In this article we will install and configure Ansible in CentOS 7 and will try to manage its two nodes.”

http://www.linuxtechi.com/install-and-use-ansible-in-centos-7/

 

So lets do it!

 

#1 will be putty term 1, #2 will be putty term 2.

 

  • First I like nano, #1 yum install nano -y
  • Connect with putty to the host #1
  • #1 rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
  • #1 yum install ansible -y
  • #1 ansible –version
  • #1 ssh-keygen

ssh gen

  • #1 ssh-copy-id -i [email protected]ress , then type yes, and type the password for root.

copyssh

  • #1 nano /etc/ansible/hosts
  • add this at the bottom. I am calling this openstack servers.

[openstackservers]

192.168.50.200

192.168.50.201

192.168.50.202

192.168.50.203

192.168.50.204

192.168.50.205

192.168.50.206

 

  • alt x to save, y enter.
  • #1 cat /etc/ansible/hosts

openstackservers

 

  • #1 ansible -m ping 'openstackservers'
  • pingpong

 

  • Sweet. Now let’s have some fun. First I like to watch my work. Lets logs our progress in a new putty session. once your connected lets create some new directories.
  • #2 mkdir /anisble/
  • #2 mkdir /anisble/logs
  • now lets go back to the first putty session. and do the following.
  • #1 anisble -m command -a “who” ‘openstackservers’ >> /anisble/logs.log
  • then lets go back to term 2
  • #2 tail -f /anisble/logs.log
  • This will allow us to see the results on term #2 without losing our commands on term #1. lets check for updates.
  • #1 anisble -m command -a “update -y” ‘openstackservers’ >> /anisble/logs.log
  • in term #2 you will see the following.

updates

 

We are all done! See future posts about way’s to use anisble.

 

Roger Lund[/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]

Nutanix Announces New Release with 4x Performance Improvement

Nutanix-Logo

The Nutanix web-scale computing platform is getting an upgrade!  A new release was announced on February 16 that promises 4x performance improvement for any workload without additional hardware or software license.  Some snippets from the press release are below:

SAN JOSE, Calif. – February 16, 2016Nutanix, the enterprise cloud company, today announced a new release of its web-scale computing platform that delivers up to 4x performance improvement for any workload with no additional hardware or software license, freedom to choose hypervisors without lock-in, and built-in machine learning capabilities that increase operational efficiency. Nutanix solutions for building and operating enterprise clouds uniquely deliver the agility, pay-as-you-grow consumption, and operational simplicity of the public cloud without sacrificing the predictability, security, and control of on-premises infrastructure.

To support the increasing demands of modern businesses, an enterprise cloud platform must include a web-scale infrastructure fabric that delivers resiliency, availability, predictable performance across a wide range of enterprise applications. In addition, it should incorporate seamless application and data mobility, invisible operations with one-click simplicity through built-in machine intelligence, extensive automation and rich analytics, and a security-first design. The 4.6 release of the Nutanix software extends the company’s technology leadership and provides a platform that furthers its mission to deliver invisible infrastructure to elevate IT.

 

Delivering Continuous Value with 4x Better Price/Performance
Enterprise clouds must offer versatile performance for traditional and next-generation enterprise applications, delivering value back to businesses through continuous innovation. Acropolis 4.6 includes more than 25 powerful software enhancements that increase system performance by up to 4x compared to earlier versions. Current customers can get these benefits through a simple software upgrade at no additional expense. These enhancements increase performance across the full portfolio of Nutanix appliances, including the recently updated NX-9000 all-flash model. Customers benefit from:

  • Better performance across a wide range of enterprise application workloads, e.g., powering up to 30,000 Microsoft Exchange mailboxes in just 8U of rack space, as validated through the Microsoft Exchange Solution Reviewed Program (ESRP)
  • Delivering the industry’s fastest storage I/O performance across hyperconverged all flash solutions with over 1 million storage IOPS in just 4U of datacenter space.
  • Up to 4x price/performance gains on existing investments to deliver as low as $0.35/IOPS, better than top-selling all-flash arrays which also suffer from complex management and additional networking requirements.

 

As with public clouds such as AWS, wherein cost reductions achieved due to innovation and scale are passed back to the customer on an ongoing basis, customers deploying enterprise clouds powered by Nutanix also benefit from ongoing price/performance improvements on their existing investments without additional costs.

Removing Hypervisor Lock-In To Enable Infrastructure Choice for Traditional and Next Generation Apps
Public cloud services provide a single runtime environment, which while suited to some applications is a poor fit for others. In the new era of enterprise clouds, flexibility and choice are fundamental tenets, allowing businesses to run traditional enterprise applications such as databases and VDI as well as next-generation big data and DevOps applications uniformly and consistently on the best runtime environment for each application. This release extends the ambitious Acropolis App Mobility Fabric (AMF) with critical software updates that give IT teams the freedom to pick the right virtualization environment for their applications, and the flexibility to switch easily in order to reduce costs or simplify operations. New features include:

  • 1-click Hypervisor Conversion – Switch the hypervisor running on a Nutanix system from VMware vSphere to the built-in Acropolis Hypervisor (AHV) in a completely automatic operation that can be completed in minutes with minimal disruption and risk.
  • Cross-hypervisor DR and Backup – Rapidly recover from a site failure by failing over VMs from one site to another location running a completely different hypervisor. Perform automatic backups of VM-level data from one Nutanix system to another running a different hypervisor. IT professionals can choose the best hypervisor for each environment to minimize virtualization license costs.

 

Making Datacenter Operations Invisible With Built-in Machine Intelligence
Enterprise clouds require machine intelligence and automation to simplify complex operations from many clicks to a single click, and eventually from a single click to zero-touch management. New in this release is Prism Pro, a datacenter automation solution with a unique search-first interface and customizable dashboards that bring unmatched simplicity to a diverse set of IT operations.

Prism Pro features the new X-Fit™ technology with foundational machine intelligence built into the platform, delivering streamlined operations for every workload. With X-Fit™, the platform now includes self-learning capabilities that continuously improve prediction accuracy and the quality of automated decisions over time. Prism Pro leverages X-Fit to power automation and intelligence across a variety of operations, such as smart capacity management. This technology pits multiple predictive algorithms against one another, picking the best fit and making actionable recommendations to eliminate over-provisioning without increasing risk to application performance.

A link to the press release can be found here.

Oracle Buys Ravello Systems

Big news to anyone following Ravello Systems. Revello has agreed to be acquired by Oracle.

 

from https://www.ravellosystems.com/blog/oracle-buys-ravello-systems/

I am thrilled to share that Ravello Systems has entered into an agreement to be acquired by Oracle. The proposed transaction is subject to customary closing conditions. Upon closing of the transaction, our team will join the Oracle Public Cloud (OPC) organization and our products will become part of Oracle Cloud. We believe this agreement will accelerate our ability to reach more customers, deliver more value, and enhance our technology at an accelerated pace in order to better serve you.

Thank you for your continued support. I want to emphasize that our top priority is ensuring an uninterrupted service and seamless experience for you and all of our customers and partners. Rest assured, Ravello’s service will continue “as is.” In the coming months, we will be working to continue enhancing our value to you and we are looking forward to developing new products and services enabled by this combination.

Oracle Cloud offers best-in-class services across a full suite of products in software as a service (SaaS), platform as a service (PaaS), and infrastructure as a service (IaaS). Ravello will join in Oracle’s IaaS mission to allow customers to run any type of workload in the cloud, accelerating Oracle’s ability to help customers quickly and simply move complex applications to the cloud without costly and time-consuming application rewrites.

Please do not hesitate to reach out to me or anyone at Ravello if you have any specific questions and corporate information can be found at http://www.oracle.com/ravellosystems.

Thank you,

Rami Tamir
CEO
Ravello Systems

Huge news indeed. I hope the entire team at Ravello the best of luck at Oracle

No news on how this will impact Revello’s support of VMware products on it’s cloud offering.

 

 

Roger Lund

vCenterServer FQDN does not match DNS when upgrading vCenter Appliance from 5.5 to 6.0

Thanks to the vExpert program I have some new licenses for my lab systems.  Since I only have vCenter 6 Standard licenses and my current vCenter Appliance is running 5.5, I need to upgrade to 6.0.  I found a great walkthrough article on the VMware site that I followed.  During step 4 of the appliance deployment, the wizard goes out to confirm communication to the existing 5.5 appliance.  I ran across the following error and could not proceed:

vCenterServer FQDN Source_vCenter_Server_Appliance_FQDN does not match DNS servers “localhost.localdom,localhost” and IP addresses “Source_vCenter_Server_Appliance_IP_Address” from VC Certificate

As usual I did some research and found KB Article 2110772 which explained how to fix this issue.  I have included the steps from this article to fix the issue:

To resolve this issue, toggle the certificate settings on the source vCenter Server Appliance to regenerate new certificates with the appropriate hostname and IP address.
To toggle the certificate settings:
  1. Log in to the source vCenter Server Appliance Web interface athttps://Source_vCenter_Server_Appliance_FQDN:5480/.
  2. Click the Admin tab.
  3. Regenerate certificates:
    • vCenter Server 5.1: Select Toggle certificate setting so that the Certificate regeneration enabled displays Yes.
    • vCenter Server 5.5: Select Yes under Certificate regeneration enabled.
  4. Click Submit.
  5. Reboot the vCenter Server Appliance.
  6. After the vCenter Server Appliance reboots, ensure that the Certificate regeneration enabled option is set to disabled and disable if it is enabled.

After completing, attempt to upgrade the vCenter Server Appliance 5.x to vSphere 6.0.

After performing these steps I was able to successfully upgrade my appliance from 5.5. to 6.0.

Install VMware tools on Centos 7

I was standing up some Centos 7 boxes in VMware vSphere. And I figured I would blog on the steps to install VMware Tools.

 

The below Steps are taken from http://partnerweb.vmware.com/GOSIG/CentOS_7.html

 

 “CentOS 7 documentation covers information on how to install the operating system in a virtual machine. For additional information about the operating system, refer to the instructions included in the installation media.

CentOS 7 documentation includes the following topics:

Installation Instructions

To install CentOS 7 in a virtual machine you can use either the standard CentOS distribution CD or the boot floppy/network method. The following installation instructions are for standard distribution CD.

Prerequisites

Before you begin, verify that the following tasks are complete:

Installation Steps

  1. Insert the CentOS 7 CD-ROM in the CD-ROM drive.
  2. Power on the virtual machine to start installing CentOS 7.
  3. Follow the prompts to complete the installation.
  4. Set the storage location for installation. In the INSTALLATION SUMMARY screen, in the STORAGE session area, select INSTALLATION DESTINATION.
  5. Change the Base Environment and select Add-Ons to install. In the INSTALLATION SUMMARY screen, in the SOFTWARE session area, click SOFTWARE SELECTION.CentOS 7 includes Open VMware Tools. The default Base Environment is Minimal install, which only has basic functionality.
    • For Minimal install and Virtualization Host environments, Open VMware Tools is not available during installation.
      After CentOS 7 installation, to install Open VMware Tools, using root privileges, run the command:
      # yum install open-vm-tools
    • For other types of Base Environments, to install Open VMware Tools, select the Guest Agents Add-On.
    • If this Add-On is not listed, the Base Environment already includes Open VMware Tools and installs it by default.
  6. Click Done.
  7. Click Begin Installation to continue.
  8. Set root password and create new users, as needed, in the CONFIGURATION screen.

VMware Tools in an CentOS 7 Guest

Use the guest OS provided Open VM Tools or install VMware Tools, as needed.

Open VM Tools

Open VM Tools is the open source implementation of VMware Tools and consist of a suite of virtualization utilities that improves the functionality, administration, and management of virtual machines on VMware hypervisors. VMware recommends using the Open VM Tools redistributed by the operating system vendors. To use Open VM Tools:

  1. Add the vmhgfs Driver
    If you use the file sharing feature by using Shared Folders in VMware Workstation and Fusion, install the vmhgfs driver in the virtual machine. This driver is not included inbox in the operating system. Installing the additional vmhgfs driver does not disturb the other inbox VMware drivers or Open VMware Tools. To install this driver:

    1. Install Open VMware Tools.
    2. Install the traditional TAR Format VMware Tools that is bundled with VMware Workstation or Fusion products.
  2. Add the deployPkg Tools Plug-in
    If you are using the virtual machine as a template or if it will be protected by SRM (Site Recovery Manager), then install the deployPkg Tools plug-in. To install this plug-in:

    1. Create a file, /etc/yum.repos.d/vmware-tools.repo, with the following content:
      [fusion_builder_container hundred_percent="yes" overflow="visible"][fusion_builder_row][fusion_builder_column type="1_1" background_position="left top" background_color="" border_size="" border_color="" border_style="solid" spacing="yes" background_image="" background_repeat="no-repeat" padding="" margin_top="0px" margin_bottom="0px" class="" id="" animation_type="" animation_speed="0.3" animation_direction="left" hide_on_mobile="no" center_content="no" min_height="none"][vmware-tools]
      name = VMware Tools
      baseurl = http://packages.vmware.com/packages/rhel7/x86_64/
      enabled = 1
      gpgcheck = 1
    2. Install the package:
      $ sudo yum install open-vm-tools-deploypkg
      See knowledge base article 2075048, Installing the deployPkg plug-in in a Linux virtual machine, at http://kb.vmware.com/kb/2075048.

For additional information, see:

VMware Tools

For additional information on VMware Tools, see knowledge base article 1014294, General VMware Tools installation instructions, at http://kb.vmware.com/kb/1014294.

Knowledge Base Articles for CentOS 7

The following link refers to knowledge base articles on operating system specific issues. See VMware Knowledge Base for a list of known issues about the operating system.

VMware Compatibility Guide

The VMware Compatibility Guide Web site lists supported guest and host operating systems and provides related support information.”

 

 

Here we go.

 

  1. Login to the linux guest via putty.
  2. Login as root:
  3. [email protected]’s password. I entered the password.
  4. # yum install open-vm-tools -y

Then I wanted to update Centos as well.

 

  1. yum update -y
  2. shutdown -r -t now

 

Now lets look at the VM in the vSphere client.

 

 

 

 

centos7_vmware_tools_vm_selection centos7_vmware_tools_install

Now we have Running VMware Tools!

 

 

Roger L[/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]

Updating DNS, NTP, and Domain via PowerCLI

To start off with, I did not write this script but I have tested a modified version of it (removed NTP and Domain pieces) as I did not need to perform everything it does.

 


# PowerCLI Script to Configure DNS and NTP on ESXi Hosts
# PowerCLI Session must be connected to vCenter Server using Connect-VIServer

# Prompt for Primary and Alternate DNS Servers
$dnspri = read-host “Enter Primary DNS”
$dnsalt = read-host “Enter Alternate DNS”

# Prompt for Domain
$domainname = read-host “Enter Domain Name”

#Prompt for NTP Servers
$ntpone = read-host “Enter NTP Server One”
$ntptwo = read-host “Enter NTP Server Two”

$esxHosts = get-VMHost

foreach ($esx in $esxHosts) {

Write-Host “Configuring DNS and Domain Name on $esx” -ForegroundColor Green
Get-VMHostNetwork -VMHost $esx | Set-VMHostNetwork -DomainName $domainname -DNSAddress $dnspri , $dnsalt -Confirm:$false

Write-Host “Configuring NTP Servers on $esx” -ForegroundColor Green
Add-VMHostNTPServer -NtpServer $ntpone , $ntptwo -VMHost $esx -Confirm:$false

Write-Host “Configuring NTP Client Policy on $esx” -ForegroundColor Green
Get-VMHostService -VMHost $esx | where{$_.Key -eq “ntpd”} | Set-VMHostService -policy “on” -Confirm:$false

Write-Host “Restarting NTP Client on $esx” -ForegroundColor Green
Get-VMHostService -VMHost $esx | where{$_.Key -eq “ntpd”} | Restart-VMHostService -Confirm:$false

}
Write-Host “Done!” -ForegroundColor Green

Credit for this script goes to vHersey
Full article fond HERE