Category Archives: Virtualization

Everything about Virtualization

DISABLE THAT PASSWORD EXPIRATION SETTING!

In my lab I wanted to login to the vCenter Server however my root password didn’t let me in. Now I was logging into the administrator portal at port 5480.

vcenter-lockout

I looked around and turns out I left my “Administrator password reset” option enabled which caused my root password to be reset/disabled.

The fix was easy enough but needed a vCenter reboot. You can try to console into it and try to change it but it was buggy.

Here is the KB article to reset the password.

Hope this helps!

VMWARE CERTIFIED PROFESSIONAL – CLOUD PASSED!

Wanted to share some good news! Today I passed my VMware Certified Professional – Cloud certification!

Working on vCloud Director 5.5 for over 6 months now allowed me to take the exam with much ease!

vcp-cloud

COMPLETE VSHIELD EDGE DEPLOYMENT AND CONFIGURATION AUTOMATION

For my day job I worked on automating the deployment and configuration of the vShield Edge appliance.

To an untrained eye this can be quite complicated and has been fun to work on. I ran into a lot of documentation gaps and issues with the entire deployment and VMware SDK support has been notified about these gaps.

The Script allows you to deploy vShield Edge Appliance to a vCenter and also configures. The script configures the following for the edge appliance,

  1. Deployes it with three uplinks for External,internal and heartbeat networks
  2. Configures firewall rules
  3. Configures object-groups
  4. Configures static routes
  5. Configures LB rules

The script is missing HA configuration and LB service enable parts. I have these done but looks like VMware issue is preventing these to run properly. VMware is investigating so sit tight!

In my home lab I had deployed the edge appliance a whopping 200 times before I got the script right! This was mostly due to the gaps and issues in the API.

edge-deploy

 

The community script has been edited to protect my product information and I haven’t had a chance to test the formatted script but it should work just fine.

The read me for the file is here. You can get my script at my github repo!

Here is the script for quick reference, click Read more below for the script.

Read More …

vExpert 2014 AND DELIGHTED!

vexpert
I wanted to share some good, I meant, Great news.

I have been awarded the prestigious title of vExpert and am now a member of the club.

Thank you VMware for the recognition.

You can find the list of vExperts here – here.

My vExpert Profile is here.

QUICK COMMAND TO GET A SHARED DATASTORE

A new awesome script is coming here soon but until then – heres a quick powercli way to get a datastore which is shared by more than one host.

Below I am getting its MOID because for another purpose but you can easily replace it with Name or what ever that you’d like to grab.

Hope this helps!

1
$datastore_full_id = get-cluster $cluster_name | Get-Datastore | get-view | where {$_.Host.length -gt 1} | Select-Object -ExpandProperty MoRef | Out-String

HOW TO CLEAN UP VCD QRTZ TABLES AND WHY?

Why? – QRTZ tables hold the process states and file triggers in vcloud director. QRTZ tables live in the vcloud director database.  During issues of non-responsiveness from VCD cells or CPU spikes, QRTZ tables will need to be cleaned up in order to clear out the issue. This however is a rare event when this happens and if it indeed does, below is the procedure to clear out your QRTZ tables.

How? – Below are the steps to clear up QRTZ tables.

Note – Ensure the core devices for vcloud director cells are marked to proper support maintenance status to avoid alerts.

Note – This is a complete VCD down time event resulting in services being stopped. A maintenance window needs to be scheduled to halt the VCD services.

  1. Stop VCD services on both cells by following steps listed here. Process – Stopping and Rebooting a vCloud Director Instance
  2. Once services are halted login to the SQL Server which has the vCloud director Database.
  3. Backup the database.
    1. Right Click on the vCloud director database and hit on new query. Enter the below below script.

Delete from task;

update jobs set status = 3 where status = 1;

update last_jobs set status = 3 where status = 1;

delete from busy_object;

delete from QRTZ_SCHEDULER_STATE;

delete from QRTZ_FIRED_TRIGGERS;

delete from QRTZ_PAUSED_TRIGGER_GRPS;

delete from QRTZ_CALENDARS;

delete from QRTZ_TRIGGER_LISTENERS;

delete from QRTZ_BLOB_TRIGGERS;

delete from QRTZ_CRON_TRIGGERS;

delete from QRTZ_SIMPLE_TRIGGERS;

delete from QRTZ_TRIGGERS;

delete from QRTZ_JOB_LISTENERS;

delete from QRTZ_JOB_DETAILS;

delete from compute_resource_inv;

delete from custom_field_manager_inv;

delete from cluster_compute_resource_inv;

delete from datacenter_inv;

delete from datacenter_network_inv;

delete from datastore_inv;

delete from dv_portgroup_inv;

delete from dv_switch_inv;

delete from folder_inv;

delete from managed_server_inv;

delete from managed_server_datastore_inv;

delete from managed_server_network_inv;

delete from network_inv;

delete from resource_pool_inv;

delete from storage_pod_inv;

delete from task_inv;

delete from vm_inv;

delete from property_map;

b. Execute the script.

c. Start the vCloud Director cells

Start the vCloud Director services:

# service vmware-vcd start

Starting vmware-vcd-watchdog:                              [  OK  ]

Starting vmware-vcd-cell:                                  [  OK  ]

d. vCloud director now should be accessible without issues

This should clean up your QRTZ tables and your VCD cell should now be responsive.

VSHIELD MANAGER REST API ENDPOINT CORRECTION

Heads up – vmware confirmed in their vSheild 5.5 api documentation – the API endpoint to change the admin credentials is undocumented and the one listed in the documentation is incorrect!

To change the admin credentials use the endpoint –

https://vshieldmanagerURL/2.0/services/usermgmt/password/admin

The above is NOT documented in the vshield manager 5.5 API documentation. VMware confirmed that they will add it in the next doc release.

Hopefully this helps!

AUTOMATE VCENTER SERVER APPLIANCE DEPLOYMENT

I wanted to automate vCenter server appliance – deploying the OVA and also configuring it. I searched online to look at some samples or some code snippets  but didn’t find anything. I pinged the communities and LucD said he doesn’t recall seeing any code either.

Here was my post – https://communities.vmware.com/thread/490649

So I took up the simple challenge and here is the script to automate vCenter server appliance.

The script also uses the latest PowerCli 5.8 Release 1 – the Get-ovfconfiguration is key to deploying your appliances and ensuring they come up ip’d.

The script comes with a config.xml where you input all the parameters and then execute the script. You can also extend this by programmatically generating the config.xml file and executing the script.

The read me for the file is here. You can get my script at my github repo!

Alternatively you have it below as well, but I highly recommend reading the entire info at my github.

Read More …

AUTOMATE VSHIELD APPLIANCE DEPLOYMENT

I have been working towards some automation and this is what I have got done for now.

This is a powershell script which uses powercli modules and also the vShield REST API to configure the appliance after its deployed.

The script also uses the latest PowerCli 5.8 Release 1 – the Get-ovfconfiguration is key to deploying your appliances and ensuring they come up ip’d.

The script comes with a config.xml where you input all the parameters and then execute the script. You can also extend this by programmatically generating the config.xml file and executing the script.

The read me for the file is here. You can get my script at my github repo!

Alternatively you have it below as well, but I highly recommend reading the entire info at my github.

Read More …

OUCH – DISABLING DRS IN VCENTER DESTROYS ALL RESOURCE POOLS LEAVING VCLOUD DIRECTOR INOPERABLE!

I haven’t tried this yet but turns out disabling DRS literally destroys all resource pools and leaves vCloud Director inoperable. Sounds nasty but thats what VMware is telling us.

Well so is there a fix? Well seems like there isn’t! You have to recreate the entire environment in vCloud Director which, can be, a lot of work. Not just you have to clone the vm’s in vCloud director as existing vms will all be deleted with the work around suggested by VMware.

Disabling DRS in vCenter Server destroys all resource pools and renders vCloud Director inoperable. It is recommended that you contact VMware technical support for assistance with recovering from this issue.

Here is the full KB article that also has the work around to the issue.

Bottom lab, do not disable DRS in vCenter. You will need it to allow vms to move around to satisfy their resource requirement. If you do not want a vm to move around, I recommend using the DRS rules to pin a virtual machine to a specific hypervisor.

You can alternatively deploy that virtual machine on a local disk for a hypervisor that will prevent it from moving around.