Category Archives: VMware

Getting Started With Ansible And VMware

For a little while now I’ve been playing around with Ansible and exploring its VMware modules.  While using Ansible with the VMware modules is not overly complex.  I quickly realised there were very little examples out on the web for the VMware administrator.   So I thought I would put together a very simple crash course on getting starting with Ansible and VMware.

The intention here is not to explain how Ansible works.  There’s a lot of information out on the web around that, plus I’m still learn too.  Instead I just wanted to put together something relatively simple.  Show how to quick and dirty get Ansible installed on a Linux box with the required VMware SDK.  Then create an Ansible playbook to build a basic environment in vCenter.  This will involve a new Datacenter, a Cluster, and a Resource Pool.

So let’s get started.

Installing Ansible

Firstly let’s install Ansible.  Ubuntu and CentOS are common distros so I cover them both below.  With Ubuntu I also add the Ansible repository.  While I don’t believe it’s really required it seems to be what most people do.

Ubuntu

sudo apt-add-repository ppa:ansible/ansible

sudo apt-get install ansible

CentOS

sudo yum install ansible

Once installed we can run a simple verification check to see if the install was successful.

ansible -m ping localhost

localhost | SUCCESS => {
"changed": false,
"failed": false,
"ping": "pong"
}

Installing pyVmomi

Now we install pyVmomi.  This is VMware’s Python SDK for managing vCenter and ESXi and is required to use the VMware modules that come with Ansible.

sudo pip install pyvmomi

And that’s all that we really need to install to build our first playbook and run it against vCenter.  To run our playbook we’re going to need to create a few folders and files.  The structure will look something similar to below.

├── ansible-vmware
│   ├── group_vars
│   │   └── all.yml
│   └── vmware_create_infra.yml

Let’s create a folder called ansible-vmware and a varibles folder called group_vars below that

mkdir ansible-vmware
mkdir ansible-vmware/group_vars

Now even though this is a crash course to running our first VMware playbook I want to at least do things half right and not have any plaintext passwords.  So before I go too far into creating the yaml files I want to create an encrypted string of our vCenter’s administrator SSO password.  I do that with the following line.

ansible-vault encrypt_string {admin_sso_password} --ask-vault-pass

You’ll be asked for an Ansible vault password and then receive back an encrypted string.  The vault password will be used when we run our play (don’t forget it).  Copy and paste the output and put it aside for a minute.  We’re going to pasta it in our group_vars file that we’re about to now create.

Let’s now create that variables file inside the group_vars folder and call it all.yml

touch ansible-vmware/group_vars/all.yml

Using vi or nano or whatever you prefer to edit the file.  Let’s edit the all.yml file and add in all the variables we will use in our playbook.  Again, crash course, so don’t worry too much about what each one does right this minute.  Just know that we have to reference these values multiple times in our playbook and having a variables yaml file really helps with that.

For the vcenter_password variable use the encrypted string we created in the step above and paste it in so it looks similar to below.  Obviously feel free to change any of the values, datacenter, cluster, etc.

---
datacenter: ansible_dc1
cluster: ansible_cluster1
resource_pool: ansible_resource1
datastore: datastore01
vcenter_ip: 192.168.0.100
vcenter_username: administrator
vcenter_password: !vault |
          $ANSIBLE_VAULT;1.1;AES256
          24242245545455516332373965613662616531653266326362643533613932356530663263326663
          65363339653337333478977865425424245245824524824858666463373838323330666633363763
          65323436643563333334527873245674247868727672789689787867867878643130616261336262
          3462323161633933320a653030333478567825725727855427887878787886666624313862663462
          8775

Now we create our main playbook.  This is going to contain all our plays and reference all our variables we just created in global_vars/all.yml

touch ansible-vmware/vmware_create_infra.yml

Like we did with the variables file lets edit this file. Again, vi, nano, whatever.  Copy and past the information below.  Things to note.  Yaml files don’t like tabs.  So spaces only and position is very important.

- hosts: localhost
  connection: local
  tasks:
    - name: include vars
      include_vars:
        dir: group_vars

    - name: Create Datacenter in vCenter
      local_action:
        module: vmware_datacenter
        datacenter_name: "{{ datacenter }}"
        hostname: "{{ vcenter_ip}}"
        username: "{{ vcenter_username}}"
        password: "{{ vcenter_password}}"
        validate_certs: False
        state: present

    - name: Create Cluster in datacenter
      local_action:
        module: vmware_cluster
        hostname: "{{ vcenter_ip}}"
        username: "{{ vcenter_username}}"
        password: "{{ vcenter_password}}"
        validate_certs: False
        state: present
        datacenter_name: "{{ datacenter }}"
        cluster_name: "{{ cluster }}"
        enable_ha: yes
        enable_drs: yes

    - name: Create Resource pool in cluster
      vmware_resource_pool:
        hostname: "{{ vcenter_ip }}"
        username: "{{ vcenter_username}}"
        password: "{{ vcenter_password}}"
        validate_certs: False
        state: present
        datacenter: "{{ datacenter }}"
        cluster: "{{ cluster }}"
        resource_pool: "{{ resource_pool }}"

Assuming you created the files correctly and have the right password we are ready to run our first Ansible playbook against vCenter.

ansible-playbook ansible-vmware/vmware_create_infra.yml --ask-vault-pass

This should produce something similar to below

PLAY [localhost] ***************************************************************************************************************************

TASK [Gathering Facts] *********************************************************************************************************************
ok: [localhost]

TASK [include vars] ************************************************************************************************************************
ok: [localhost]

TASK [Create Datacenter in vCenter] ********************************************************************************************************
changed: [localhost -> localhost]

TASK [Create Cluster in datacenter] ********************************************************************************************************
changed: [localhost -> localhost]

TASK [Create Resource pool in cluster] *****************************************************************************************************
changed: [localhost]

PLAY RECAP *********************************************************************************************************************************
localhost : ok=5 changed=3 unreachable=0 failed=0

The resulting output in the vSphere Client should look similar to below.

The cool part is we can run the same command again and again and nothing will change as long as our environment is consistent with our defined yaml files.  They in essence become our working as-built doco.

So the goal from what we’ve just done above was not to actually build an environment but rather to show you how quick and simple we can get Ansible up and running and configuring a vSphere environment.  I’ve avoided a lot of the technical stuff so instead you can think about how this might help you in your environment.

In future posts I might go into more details on specific modules and how to use them but for now I think I might just focus on what’s possible with Ansible and VMware.

References

Ansible VMware Getting Started

pyVmomi GitHub Page

 

vForum Australia 2017 Recap

Another year and another vForum has come and gone.  This has really become a stand out event for me on the local calendar.  For the Australia region this is the closest we can get to VMworld without actually going to VMworld.  This year vForum had returned back to the Sydney Convention Centre which has recently been rebuilt.  Unlike previous years the event had moved from a two day event to one.

My frame of reference for vForum is fairly small as this was only my second vForum Australia (Actually there was a vForum Roadshow in Melbourne a few years back too).  Without a doubt the biggest improvement made was the location.  Bring vForum to the centre of Sydney on Darling Harbour was a big win.  Hotels are plentiful and the views are amazing.

I arrived in Sydney from Melbourne the day before vForum.  My manager from Brisbane was down in Sydney on unrelated work so this was a good opportunity to catch up in person for a few drinks on George St (I can’t believe construction on the light rail is still happening on George St which I also recall from last years vForum).

While I had every intention on going, unfortunately I didn’t make VMDownUnderground this year, an event organised and run by the Sydney VMUG crew the night before vForum.  Last year’s VMDownUnderground was a  great event but I had used the opportunity to have dinner with fellow work colleagues on Darling Harbour.  Being Melbourne based and having most of my team in Sydney I don’t get this opportunity often.

This year I was not only representing myself and my organisation but also VMUG as the Melbourne Leader.  With the help of VMUG HQ and the vForum event planners the local VMUG Australia chapters pooled our time and resources to run a booth.  There were ~40 vendors on the showroom floor this year.  VMware and the event planners did a great job with vendor layout with all locations being great.  We, VMUG, were lucky enough to secure a prime location across from VMware in the centre of the showroom right next to the VMware charity water challenge.

While my day started off at 7 AM helping to setup and prepare the VMUG booth.  The official start of vForum Australia was the keynote at 9 AM with VMware COO Sanjay Poonen opening.  The attendance for the keynote was huge.  The entire keynote hall was almost completely full, a real great buzz to it.  The keynote sessions ran till just after 11 AM.  At which point a large proportion of attendees to the keynote left the event (or possibly went to the side events).  Though that didn’t deter from the atmosphere during the remainder of vForum.

Foot traffic around and to the VMUG booth was nothing short of amazing this year.  Having a Claw Machine full of plush toys at our booth I’m sure didn’t hurt either.  This was a huge success in drawing attendees to our booth.  Not only attendees but vendors and VMware staff were lining up for a game.  One of our original goals, as VMUG Australia, was to promote the upcoming Sydney and Melbourne UserCons but we quickly switched to brand awareness for VMUG.  I was amazed to find out so many people still hadn’t heard of VMUG!

vForum Australia ended with the after party at Hard Rock Cafe right next to the convention centre.  A great opportunity to wind down with friends and finally grab some food and drinks.  Compared to last year’s vForum party with Rouge Traders playing (whom I’m a big fan of).  Hard Rock was a slightly more subdue affair.  It did lead to a more intimate setting where you could have more meaningful conversations with people, so in that regards a success.

I still had a little bit left in me after Hard Rock.  So before calling it a night I headed back to my hotel to drop off my swag and have a shower before heading out for a few drinks and cocktails with some vForum friends at Palmer and Co.  A small underground bar set in a 1920s speakeasy style.

While I would have like to see vForum as a two day event, particularly with the addition of Transform Security and Empower Digital Workspace events running at the same time.  Whatever the format VMware and vForum always put on a great event for attendees.  I’m already looking forward to next year with catching up and meeting new people in the community.

Recap: VCP-NV Certification (2V0-642)

Earlier this week I took and passed the VCP-NV (2V0-642) exam.  I do have to say it was a really good experience.  It’s one of the few exams I really did enjoy studying for and sitting.  So I thought I might use this as an opportunity to post a short recap of my experience and what I used to study and pass the exam.

Getting some of the technicalities out the way all of which can be found at VMware’s VCP-NV landing page.  The 2V0-642 exam is VMware’s updated version 2 of the original VCP-NV exam which officially came out back in 2015.  Back then it was a 120 questions and by all accounts much harder than this new revised version.  This revised exam, based on NSX 6.2, is 2 hours long and 77 questions with a standard 300 passing score out of 500.  If you currently hold a VCP the process to certification is fairly straight forward.  Take and pass the 2V0-642 exam and earn certification.  If you don’t hold a VCP you have a number of pre-requisites to meet.  Again, all of which can be found at the VCP-NV landing page.

So first how was the exam?  As I mentioned above, a really good experience.  Gone are the days of having to take a pre-exam survey.  Just acknowledge the Terms and Conditions and the exam begins immediately -Awesome.  The questions were well laid out, clear, and descriptive enough to understand.  Of course it wouldn’t be a real exam without one or two confusing questions and there were a few of them, but only a few.  The exam questions are all weighted so at the end of the day it is a level playing field for everyone.

So what was my process for studying for this exam?

I guess firstly I’ve attended many presentations and watched a number of high level videos on NSX but nothing really deep on the product, nothing really exam helpful.  A few months back (the week before VMWorld) I attended the 5-day Install, Configure, Manage course on NSX 6.2.  This was a great course and a good primer into learning to use NSX.  Very helpful grasping the fundamentals in being able to get started.  Well recommended for everyone getting started.

Next came actually using the product in a real lab environment.  I think this is a requirement!  Bare minimum you should be using VMware’s Hands on Labs but even better is to have your own environment.  I’m lucky enough to be preparing for a production deployment and had a test lab to deploy and play with.  Having your own environment constantly available is hard to beat.

vBrownBag YouTube videos!  There is a VCP-NV series available on YouTube.  The videos are based on the original VCP-NV exam and are a few years old but still very relevant.  Actually still extremely relevant.  There’s eight videos to hunt around for which cover the original objectives with the exception of Troubleshooting.  The Objectives match up very closely.  The 2V0-642 exam has one main new Objective which covers Cross-vCenter.

In terms of reading material i would highly recommend going through the official NSX online docs pages.  Lots of mindless reading but you will find that exam questions come straight out of that.  And truthfully you will learn a huge amount doing that.  Just remember to focus on version 6.2.  I’d also recommend the Cross-vCenter NSX Installation Guide PDF from VMware.  This is also in the online docs but I found the PDF easier to consume which I found to be hugely informative and the exam did test heavily on this for me.  So I was very thankful to have focused on this reading.

And that was basically it.  Practice hands on what you have learnt and read.  Troubleshoot in your lab as you are building it out.  A few solid study days on the weekend and you should be in a really good position to take and pass the exam.

 

Sydney vForum 2016

For those of us not lucky enough to attend VMworld (yep, me).  The smaller vForum has to be the next best thing, particular for those of us in the ANZ region of the world.  vForum is seen as almost a mini VMworld in OZ spread out over two days and getting somewhere around 3 to 4 thousand people throughout the event.  I must have been scanned about a 100 times walking into the main pavilion so hopefully that gets taken into account 🙂  Having barely recovered from an intense three days at PAX AUS the weekend before.  I was still psyched and ready to go.

Day 0 – VMDownUnderGround (Tuesday)

My Tuesday before vForum started with a Work From Home half day.  I was able to put in a solid morning of work before heading to Melbourne Airport.  One of the benefits of where I live is the short 15-minute drive to the airport.  Boarding my flight, I literally bumped into Chew from VMware while trying to fight my way to my seat (Sorry again Chew).

We landed in Sydney at 3:30 PM, disembarked, and I followed the signs to the domestic terminal train station.  I purchased an Opal card and boarded a train that took me to Central Station.  This was my first Sydney Airport to City train trip and I must say I was really impressed with what Sydney have done. I can’t believe Melbourne haven’t done the same yet!

I checked in at the Cambridge Hotel which was a short walk from Central.  I took a few minutes to rest the feet then made my way into the city.  I still had a few hours before VMDownUnderGround at 6 PM, so I took a little stroll up to Circular Quay.

VMDownUnderGround, organised by Sydney VMUG and sponsored by Veeam, was held at King Street Brewhouse.  A microbrew pub overlooking Darling Harbour.  The turnout was a little smaller than I expected but still a great turnout of people, from Queensland to Tassie to New Zealand.  I had the opportunity to meet a number of VMware staff from the Sydney office.  Finally met in person some Brisbane and Sydney VMUG guys.  There was Brett and Alistair representing vBrownBag plus many more.  I could have chatted all night with everyone but us final few called it a night around 10:30 PM in preparation for vForum the next day.

Day 1 – vForum Techday (Wednesday)

My day began with a call from the boss!  He had taken the train to central station and swung past my hotel so we could walk down together to The Royal Hall of Industries @ Moore Park.  On entry, I instantly regretted bring my backpack as VMware provided one to All Access Pass guests.  Being the Techday I spent much of the day focusing on going to sessions.  NSX, DevOps, Containers, just to name a few.  While there were many people I wanted to catch-up with, I decided to leave that till Thursday’s General Access day.  Between sessions I ran into a few fellow Optus co-workers where we decided to focus our efforts together on visiting vendors and of course collecting awesome swag.  Moving between vendor stalls I found myself constantly bumping into people I knew.

That evening I caught up with a few more fellow work colleagues for dinner.  I particularly wanted to catch up with a recently departed team mate.  We made our way into the CBD and found a nice little Thai restaurant just off George Street, where I succumbed to peer pressure and ordered way toooo spicy food.

Day 2 – vForum General Access (Thursday)

Once again my day started with meeting up with my boss outside my hotel and walking down to Moore Park.  This time even before walking into the hall I ran into many more Sydney co-workers.  Many whom I was meeting in person for the first time.

I only had two sessions that I really wanted to attend on Thursday.  The Keynote at 10 AM with Pat Gelsinger and the Technical Keynote at 1:30 PM with Kit Colbert.  Outside those two keynote sessions I spent the day visiting the remaining vendors I had not spoken to yet and catching up with fellow colleagues and friends.   As well as heading over and saying hello to the vBrownBag and the VMUG guys.

A fellow team mate introduced me to former work colleague and friend Frank Yoo now working at Rubrik.  While at the Rubrik stand, I entered their raffle draw.  Now if you know me, you know that I’m one of the unluckiest people when it comes to competitions.  So it was a complete surprise punch in the face, when I won the coffee maker prize.  Thanks heaps, Frank and Rubrik.  The Rubrik branding on the actually coffee maker was a nice touch!

20161113_102013

The day ended with the vForum After Party featuring the band Rouge Traders.  I’ve been a huge fan of them for years so I was pretty excited to have them here playing.  The band played in the main pavilion where the keynotes were held.  But before we were allowed in they herded us into the small foyer for 45 minute or so.  Presumably they needed more time to setup either the band or the food and drinks in the pavilion.  So while it was a little uncomfortably cramped to begin with, once the doors opened and we got inside all was forgiven.

20161110_183428

Before calling it a night and making the solo trip back to my hotel I had one last catch-up with Ryan McBride from the Sydney VMUG crew.  Ryan’s an awesomely funny guy who I’m looking forward to catching up with next week back in Melbourne.

Day 3 – The Day after vForum Summary

While many people flew out and went back to work for Friday.  I decided to mix it up a little and spend a day in Sydney.  I couldn’t come to Sydney and not spend at least a day doing all the touristy things.

20161111_111119

I had an awesome time during vForum.  VMware have as always put on an excellent event.  VMDownUnderGround was also a great opener to vForum.  While I would have preferred more deep-dive sessions.  I did manage to take away a little from each session I went to which I see as a success.  And yes, I’m constantly told not to focus on sessions but rather use the time building networking connections.  But I felt that there was room to achieve both during vForum which I think I achieved.

PowerCLI Core

When Microsoft and Jeffrey Snover released PowerShell on Linux a few months back we knew PowerCLI running on Linux wasn’t too far away.  Well, an awesome demo from Alan Renouf running PowerCLI in a Docker container was probably a giveaway 🙂

Well since then we’ve been patiently waiting, and hearing rumors of a Fling, for the release.  Earlier this week VMware finally released that Fling.  And that haven’t disappointed.  VMware have provided a number of different methods to run PowerCLI Core --OS X, Linux, and Docker.  Skimming through the Instructions PDF on the Flings site by far the easiest method has to be the Docker image from Docker Hub (assuming you already have docker installed).

I decided to try out this docker image and was pleasantly surprised at how easy it was.  Boy, I miss the old days of Linux where I had to compile and install everything, then troubleshoot, and repeat.  Using an Ubuntu 14.04 build it’s as simple as running two commands.

First pull down the docker image from Docker Hub.

docker pull vmware/powerclicore

Then run the container!

docker run --rm -it --entrypoint=’/usr/bin/powershell’ vmware/powerclicore

And that’s really it, kind of.  There is one more command you’ll have to run to actually connect to a vCenter or ESXi host.  Without it you’ll receive an Invalid Certificate error which will prevent you from connecting.

Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false

After that you should be able to connect as normal to a vCenter.

ubuntu01-vmware-workstation-000303

As the doco states not all the modules are available yet.  Currently just the Core and VDS cmdlets.  A quick check shows we have 315 available to us.  Which, to be honest, is a huge amount.

PS /powershell> (get-command -Module powercli*).count
315

I haven’t done too much with it yet.  Though I have already noticed a few odd issues and errors.  It’s hard to say if it’s PowerCLI Core related or PowerShell.  One notable issue is when pipping a PowerCLI cmdlet multiple times on the command line it would intermittently fail.

The important thing to note here is this is a Fling, which as I’ve mentioned before, is unsupported and comes with no guarantees.  Not only that but it’s build upon an Alpha build of PowerShell 6.  Put it together and sure you’ll probably get unexpected results sometimes.

Never the less this is another get testament to VMware’s commitment to PowerCLI and PowerShell.  I’m excited to see PowerShell and PowerCLI continue to further develop and mature on Linux and open the door to a whole new slew of developers.

References

PowerCLI Core Fling
VMware PowerCLI Blog Announcement

VCP 6, My Last VCP

VMW-LGO-CERT-PRO-6-DATA-CTR-VIRT

Ok, so I say this every time but this time I mean it… well, at least I think I do.  This is my last VCP exam.  I took the VCP 5.5 Delta a few years back now.  Before that were a few VCP 5s.  There might have even been a VCP 4 thrown in there somewhere.  I’ve taken this exam more times than I want to think about.

Last week I took the VCP6-DCV Delta.  I could have held off a few more months before my VCP 5 expired but i had some spare capacity to study so I committed to retake the exam.  Work was kind enough to give me two dedicated study days to prepare.  I used them as well as I could have.  I had also hoped to get in some solid study in the weeks leading up to the exam but unforeseen personal issues got in the way which wrote that off.  So I really wasn’t feeling confident going into this exam.  To my surprise, though, I actually passed with a decent mark.

The VCP is a real solid exam for its type, it always has been.  Personally I think one of the harder ones out there too.  Of course exams like the VCAP are on a different level but as for the standard multiple choice exam it’s right up there.  VCP exams really require that you have solid experience with the technology, especially the VCP-DCV focusing on vCenter, along with vSphere Replication, a little vCloud Air thrown in, vSAN features, and the new PSC.  it has really become quite broad.

The Delta I took was comprised of 65 questions over 75 minutes, 20 questions less then the full VCP exam thankfully.  As a guide I usually work out how many questions 70% is and treat that as what’s required to pass.  It’s usually treated me well as a format for passing.  So when I scribbled down 15 questions I was uncertain with at the end of the exam I felt it could have gone either way.  I was quite worried.  So seeing that I passed in the high 400’s out of a possible 500 was quite pleasing.

I think the community has finally gotten over and accepted this 2 year expiration with VMware certifications.  I’ve never really had an issue with it.  I’ve known this is where the industry has been heading with certifications for a while now.  It doesn’t mean it’s not frustrating though.  Which is why I’m hoping I won’t have to do another one again.  Now it’s not to say that I won’t do another VMware cert.  I just have to be a little smarter and play the game a little better by upgrading to the new VCIX cert.

In any case, it’s done, it’s out the way.  I get to use the new little logo.  And, well, that’s about it 😛

Being a vExpert is a great motivation booster!

Returning from a month long Euro Trip a few weeks back I had been struggling to get back into work mode.  So it was a huge motivation boost to receive an email earlier this week welcoming me to the VMware vExpert Program as a 2015 vExpert.  I’m thrilled to have been recognised along with a lot of other amazing people.

My history with VMware products goes back to the Virtual Infrastructure and ESX Server 3 days.  I still remember my scepticism when my manager said we’re going to migrate to this virtualisation stuff.  Over the last few years VMware and Virtualisation have become a crucial part of my role in the Cloud & Managed Services department of Optus Business in Australia.

I’m really looking forward to engaging ever more with the virtualisation community throughout the remainder of the year and into next.

The 2015 second half intake of vExperts can be found here.

and the full list here.

vExpert-2015-Badge

Enable SSH on vCenter Server Appliance 6 (VCSA)

If you’re running the Appliance version of vCenter 6 at some stage you may want console access via SSH.  When you install VCSA 6 for the first time you have the option during installation to enable SSH.  Depending on your security stance you may have left SSH off and now you want it on.

There are a few different methods for enabling SSH on VCSA.  The below two methods both use the web client.

Method 1.
Directly enabling SSH in the Web Client.

This method is probably the easiest and quickest way.  The settings just happen to be in a non-intuitive location.

On the Home screen of the Web Client select Administration -> System Configuration

enable_ssh-000182

Select Nodes and right click on your vCenter server.

enable_ssh-000179

Select Edit Settings

enable_ssh-000181

Select the Checkbox Enable SSH login

enable_ssh-000180

Click OK.

You should now be able to SSH to the vCenter name or IP.

 

Method 2.
Enabling SSH via the Remote Console.

Navigate to your vCenter Appliance VM.  Click on Launch Remote Console.

enable_ssh-000184

Press ALT + F1 to get a login TTY session and login as root

enable_ssh-000183

Run the below commands to enable SSH.  ssh.get shows the current status.  ssh.set allows you to change the state of SSH.  Use ‘false’ instead of true to disable SSH.

Command> ssh.get
Enabled: False
Command> ssh.set --enabled true
Command> ssh.get
Enabled: True
Command>

The above methods takes effect immediately, no need to reboot.  When disabling SSH, current sessions stay active and don’t end.  So if someone has an open SSH session they won’t be kicked out until they logoff or their session times out.

References

VMware vCenter 6 Documentation
Edit Access Settings to the vCenter Server Appliance

 

No vmkcore disk partition is available

Sometimes I really do feel the computer gremlins are out to get me.  As long as I can remember I’ve had a flawlessly running Test Lab at work.  The day of my scheduled ESXi host upgrades I come across numerous hosts with the below error.

No vmkcore disk partition is available and no network coredump server has been configured.  Host core dumps cannot be saved.

no_vmkcore01

I tried to ignore the error but VMware Update Manager would have no bar of it and prevented me from performing an ESXi version upgrade.

The error is referring to the location ESXi will dump its core during a Purple Screen of Death (PSOD).  Usually you’ll see this warning with a statless configured ESXi host.  In this situation a host will be running in memory with no disk.  You will usually configure the vSphere Network Dump Collector service.  This wasn’t the case in my situation.

Logging into the Shell I ran the follow

~ # esxcli system coredump partition list

no configured dump partition found; skipping

Next I attempted to set the coredump

~ # esxcli system coredump partition set --enable true --smart

Unable to smart activate a dump partition.  Error was: Not a known device: naa.6000097000024659483748380304235.

Not really sure what was going on here.  I just hope no one was messing with LUN mappings.

So next I use the set -u to unconfigure any current core dump follow by set --enable true --smart which allows ESXi to automatically determine the best location to set.

~ # esxcli system coredump partition set -u

~ # esxcli system coredump partition set --enable true --smart

~ # esxcli system coredump partition get

Active: naa.600601600fc04857394578c4d945e311:7

Configured: naa.600601600fc04857394578c4d945e311:7

This resolved the error immediately without any reboots and allowed me to continue with ESXi host upgrades.

I don’t know the root cause to this issue but as I’m upgrading ESXi versions I think it’s okay to sometimes let things go.

Note;  --enable true --smart contains double dashes.

Modifying vCenter Server Appliance 6 (VCSA) NTP settings

For some unknown reason that I’m yet to learn.  The VAMI in vCenter Server Appliance 6 has been removed.  VAMI is the management interface that you usually connect to on port 5480 for most VMware appliances.  Prior to vCenter 6 you could connect to your VCSA appliance on port 5480.  In the VAMI you could check that status of the appliance services, change its network settings, perform updates, and change NTP settings.

vcsa_ntp0

It’s this last  setting that quickly alerted me to this change shortly after deploying my first VCSA 6.  During the initial deployment of my vCenter Appliance I would specify my NTP servers when prompted.  During my first two attempts the deployment would error out and fail because my NTP time sources specified were timing out.  So on the third attempt I decided to skip the NTP servers and configure them post install.

Here in lies the new way of modifying NTP settings on a vCenter 6 Appliance.

Firstly we need to log into the appliance via SSH or via the console using the root account.

vcsa_ntp01

We will be presented with a VMware shell with instructions on how to enable BASH.  For this task and many other vCenter tasks the current shell is good enough.  From here we can run our NTP commands.  If we type ntp followed by the ‘TAB’ key we get a list of ntp commands we can run.

vcsa_ntp02

Typing ntp.get lists the current status of NTP and what NTP servers are configured.  In this case the status is Down and no servers have been configured.

Command> ntp.get
Config:
Status: Down
Servers:
Command>

As we have no NTP servers listed we can use the ntp.server.set command.  This will override any current servers that may also be listed.

Command> ntp.server.set --servers 0.au.pool.ntp.org
Command> ntp.get
Config:
Status: Down
Servers: 0.au.pool.ntp.org
Command>

We now have one NTP time source set.  If we wish to make modifications to the list of servers without overriding them we can use the ntp.server.add command.

Command> ntp.server.add --servers 1.au.pool.ntp.org
Command> ntp.get
Config:
Status: Down
Servers: 0.au.pool.ntp.org 1.au.pool.ntp.org
Command>

With our NTP time sources set we now enable and start NTP using the command timesync

Command> timesync.set --mode NTP
Command> timesync.get
Config:
Mode: NTP

Command> ntp.get
Config:
Status: Up
Servers: 0.au.pool.ntp.org 1.au.pool.ntp.org

And that’s really all that is required.  Relatively straight forward to perform.  From my point of view it’s certainly not as convenient as using the VAMI web portal from previous versions.  As mentioned above.  I don’t know why it was removed.  Perhaps time constraints meant that it will be introduced in a future update.  Or perhaps it’s just hidden on a different port I’m not aware of.  In any case it would be nice to officially know.

Note; ‘--servers’ above is a double dash.

References

Add or Replace NTP Servers in the vCenter Server Appliance Configuration