Showing posts with label VM. Show all posts
Showing posts with label VM. Show all posts

Tuesday, January 3, 2017

vRA and SCCM Timeout Issue

Hi,

OK here I am again. Been away for few months working on various projects including vRA, vROPS, SRM, VIN, vRB etc.etc. And one of them is MSB. Yes its a new term I've learned and worked on with one of the Federal client along with VMware NSBU. 

But here today I'm going to discuss about the timeout issue with vRA and SCCM deployment.

Now before we begin let me give you the overview of what we are dealing with.

In my recent project Im working with VMware on a vRA Distributed architecture with a little bit of vRB and also integrating the SCCM on which the client is heaving depending on for VM/s deployment. 

Mainly these are windows 2008 R2 Std and Windows 2012 R2 Std VMs. They are leveraging SCCM to do all major tasks such as putting patches, updates, updating AV signatures, putting legacy apps, some monitoring apps such as WhatsupGold and Logrhythm etc. etc.



So once the VM is built in vRA its been handed over to SCCM for further provisioning and there is a default time out setting in vRA which is only 15 minutes.



So as you can see the default setting for SCCM machine registration timeout is 5 minutes. So now
lets assume you are doing few tasks using SCCM e.g. Installing OS, putting patches, doing AV updates, putting legacy or custom applications or softwares etc. etc. then you need time to finish all those tasks in the background on SCCM side. With having 5 minutes timeout vRA wont know what is the status of the SCCM VM as the whole process may not be finished and the gugent might not be updating vRA with any status at all so you may see the process/task in vRA as its still running and not completed and eventually the task will fail as no signal received by vRA in time (which is 5 minutes). So to avoid that you need to increase that time out setting by enough time that you can finish the required tasks on SCCM side before hitting the timeout window of vRA. We had to keep it at 45 minutes (screen shot below) on a safer side which accounts few reboots of the OS along with other tasks listed above.




After doing the above change we were started receiving finished tasks in vRA successfully which were handled by SCCM then gugent updates vRA server with appropriate status.

I will cover the SCCM and vRA in one of my upcoming blogs very soon.

Hope this will help integrating SCCM and vRA.

Please share and care.

Thanks for your time.


Sunday, August 16, 2015

REST while using CURL for vRA

DevOps needs REST :-)

In DevOps world users are mostly using the command line and APIs to do almost all of their work. So for the following example you’re going to need curl as the usage was done keeping in mind the universal tool and just not focusing other available large number of REST client or such, and as this is inside a Lab encryption is not needed bu you will need the version that supports SSL for end-to-end encryption !  

Use of jq, ( a new parsing tool for JSON) is used here, which does everything thro' command-line, and being portable (zero install) and open source, it runs on Windows and Linux both, so all of the developers out there can use it irrespective of the platform they’re using. I saved both utilities in C:\curl, and put my .bat file and .json files there too.  You can decide the best way to do that, Token is required.

So what is Token or a Bearer Token?  Putting it simply, its an authentication token.  First thing you’ll need is to get a bearer token and parse it.  You’ll need a .json file with your authentication details; the basic format is 

{“username”:”domain\\myusername“, “password”:”mypassword“, “tenant”:”vsphere.local”}.  

Fill in your username, password, and if you’re not using the default tenant, then save it to C:\curl\hellotoken.json and you’re good to go. 

Use the following curl command to submit your request:

curl –insecure -H “Accept: application/json” -H “Content-Type: 
application/json” –data @hellotoken.json https://vra-fqdn/identity/api/tokens > identity.json

Please note I used –insecure because my vRA environment is still using self-signed SSL certs.  If you have actual SSL certs that will validate, please drop the –insecure option.  This command will drop a .json file named identity.json in the current folder (c:\curl if you’ve been following along), the file looks a little like this:

{“expires”:”2015-07-08T18:47:58.963Z”,”id”:”long-token-goes-here“,”tenant”:”vsphere.local”}

So it has an expiry, an id, and a tenant. Bearer tokens are good for 24 hours, and what's not obvious is a user can only have one at a time; if you ask for a new bearer token, that invalidates all previous bearer token/s.  These two facts means, it’s very difficult to manually get and use a bearer token. What we want to do is extract that ID in such a way that we can automatically use it in subsequent curl calls.

For this I will be using jq:

jq .id -r < identity.json > bearer.txtset /p btoken=
)

Let’s look into what it consists of:

jq .id -r parse out the id field from the json.  Print it to stdout in raw mode (i.e. no surrounding quotes or symbols)

< identity.json use the previously generated identity.json file as input to jq

> bearer.txt output the parsed id field to a file bearer.txt

use bearer.txt as the input file for the following command

set /p btoken= set the environment variable btoken to the input.  The /p normally means to prompt for the environment variable, but in this case since we provided a stdin pipe, the contents of bearer.txt will be used instead of prompting the user

) Close the section using bearer.txt as input. Yes I know it is required to do it here. 

To use the bearer token add the following HTTP Header to all future curl calls:

-H “Authorization: Bearer %btoken%”

Machine Request

Now you can request the catalog item you want from the vRA console and note the request ID. After the request has completed, you can use curl to look at the request with the following command:

curl –insecure -H “Accept: application/json” -H “Authorization: Bearer %btoken%” https://vra-fqdn/catalog-service/api/consumer/resources/?$filter=request/requestNumber+eq+myReqNumber > myreqOutput.json

This will create a file myreqOutput.json with details of your request.  The item you care most about is the catalog ID which you will be able to find at .content.0.catalogItem.id  Note that ID, then request the entitled catalog item with the following:

curl –insecure -H “Accept: application/json” -H “Authorization: Bearer %btoken%”https://vra-fqdn/catalog-service/api/consumer/entitledCatalogItems/?$filter=id+eq+&#8217;catalogItemId‘ > catalogItem.json

This time, note the provider binding at .content.0.catalogItem.providerBinding.bindingId.  Also note the tenant ID specified here.

Now you have the information you need to format the machineRequest.json file:

{
“@type”: “CatalogItemRequest”,
“catalogItemRef”: {
“id”: “catalogItemId”
},
“organization”: {
“tenantRef”: “vsphere.local”,
“subtenantRef”: “TenantId”
},
“requestedFor”: “myUserName@domain“,
“state”: “SUBMITTED”,
“requestNumber”: 0,
“requestData”: {
“entries”: [{
“key”: “provider-blueprintId”,
“value”: {
“type”: “string”,
“value”: “Provider-binding”
}
},
{
“key”: “provider-VirtualMachine.Network0.NetworkProfileName”,
“value”: {
“type”: “string”,
“value”: “Network Profile Name”
}
},
{
“key”: “provider-Variable1″,
“value”: {
“type”: “string”,
“value”: “value”
}
}]
}
}

Note the key: provider-name section above; this is how you specify any custom properties for the blueprint, I provided a couple samples above but what you put here will really depend on the blueprint configuration.  Basically just add provider- to the start of any custom property (or even VM property, see provider-VirtualMachine.Network0.NetworkProfileName above) to submit it with your request… so the next step is to…

Submit a Request

The curl command to submit a request is:

curl -X POST –insecure -H “Content-Type: application/json” -H “Authorization: Bearer %btoken%” https://vra-fqdn/catalog-service/api/consumer/requests –data @machineRequest.json

And now you can see under Infrastructure --> Recent Events or under Requests that new VM getting deployed in vRA. You can also verify under vSphere client session that the VM is getting cloned and deployed.

Hope you find this useful.

Please share and care.




Sunday, May 25, 2014

EMC VNXe 5100 and Checkpoint Folders on VMFS volumes

Hi,

Came across an interesting situation where the virtual machine stopped responding as the External Backup application tried to take the snapshot and the storage ran out of disk space

Infrastructure details

ESXi: 5.x

VM: Windows 2Kx OS

Storage: EMC VNXe 5100

4 HDDs are mounted on the VM which are coming from separate individual VMFS datastore.

All 4 VMDKs consumed the overall space of 4 TB in total.

The Datastore summary states the total size is 18.7 TB consumed out of 28.25 TB provisioned. This is the only VM using those 4 LUNs for each VMDK.

So the question is where is the additional space of 14TB lost apart from 4 TB used by the VM??

Here is the output of du -h for the VM and /vmfs/volumes

/vmfs/volumes/50cc5dd8-555143cbd-44d2-ac162d783818/SVRAP01 # du -h
332.6G  .
/vmfs/volumes/50cc5dd8-555143cbd-87d5-ac162d783818/SVRAP01 # du -h
3.7T    .

du -h
8.0K    ./.ckpt_group.vmware_21_sg_443.fs.13/lost+found
272.0K  ./.ckpt_group.vmware_21_sg_443.fs.13/.etc
3.7T    ./.ckpt_group.vmware_21_sg_443.fs.13/SVRAP01
8.0K    ./.ckpt_group.vmware_21_sg_443.fs.13/.vSphere-HA
3.7T    ./.ckpt_group.vmware_21_sg_443.fs.13
8.0K    ./.ckpt_group.vmware_21_sg_441.fs.13/lost+found
272.0K  ./.ckpt_group.vmware_21_sg_441.fs.13/.etc
3.7T    ./.ckpt_group.vmware_21_sg_441.fs.13/SVRAP01
8.0K    ./.ckpt_group.vmware_21_sg_441.fs.13/.vSphere-HA
3.7T    ./.ckpt_group.vmware_21_sg_441.fs.13
8.0K    ./.ckpt_root_rep_ckpt_51_832916_2/lost+found
272.0K  ./.ckpt_root_rep_ckpt_51_832916_2/.etc
3.7T    ./.ckpt_root_rep_ckpt_51_832916_2/SVRAP01
8.0K    ./.ckpt_root_rep_ckpt_51_832916_2/.vSphere-HA
3.7T    ./.ckpt_root_rep_ckpt_51_832916_2
8.0K    ./.ckpt_root_rep_ckpt_51_832916_1/lost+found
272.0K  ./.ckpt_root_rep_ckpt_51_832916_1/.etc
3.7T    ./.ckpt_root_rep_ckpt_51_832916_1/SVRAP01
8.0K    ./.ckpt_root_rep_ckpt_51_832916_1/.vSphere-HA
3.7T    ./.ckpt_root_rep_ckpt_51_832916_1
8.0K    ./lost+found
272.0K  ./.etc
3.7T    ./SVRAP01
8.0K    ./.vSphere-HA
18.7T   .


So as you can see the overall space used on the VM is approx 4 TB and at the datastore level is 18.7 TB.

After doing more research found that the these files are created during EMC SAN root replication to preserve a replication pair which had no prior replication relationship. So technically this includes all 4 LUNs used by the virtual machine.

Found few articles here (EMC community) and here (By Justin Paul) found the culprit as well for the Datastore space consumption and how to reclaim it.

As a work around we storage vMotioned smaller VMDK to another datastore and now the VM can be powered on and the users can work with it.

Plan recommended to contact EMC support for better guidance on how to reclaim that space properly without losing any data.

Hope this helps to find out the lost space on the VMFS datastore !

Share and care please !!




Saturday, November 9, 2013

VMware NSX Resources

Hello,

As NSX and VSAN are the future and now everyone is looking for the resources on both these products.

Duncan Epping has listed all the resources of VSAN on his website which gave me an idea to do the same for NSX (VMware's Network Virtualization).


Learning / WhitePapers :

VMware NSX Walkthrough 

VMware NSX Resources Page

VMware NSX Network Virtualization Design Guide

VMware Network Virtualization Fundamentals
(3 hours Self-paced Course)

Customer Use Case by NTT

VMware NSX Network Virtualization Platform

VMware NSX on Cisco Nexus 7K and UCS Design Guide 

Combining VMware NSX with Palo Alto Networks

NSX Multi Hypervisor Network Virtualization Design Guide Ver 4.2

Getting Started Guide for NSX vSphere 

Securing NSX vSphere Ver. 1.0

Getting Started with Micro-Segmentation with NSX vSphere


SDDC operations and solutions

EMC Smarts, RiverBed, Brocade, Tufin, Gigamon

Official Documentation :
http://pubs.vmware.com/NSX-6/index.jsp


Labs :

HOL-SDC-1303 VMware NSX Network Virtualization Platform
HOL-SDC-1319 Tech Preview : VMware NSX for Multi-Hypervisor Environments



Videos/Podcast :

By Hany Michael


Deploying the NSX Virtual Appliance

Deploying the NSX Controllers
Preparing Hosts and Configuring Unicast VXLAN
Configuring a Logical Switch


By VMware NSX TV on Youtube

VMware NSX - Operational Visibility Across Virtual and Physical Domains
Network Automation with NSX
Service Composer
Activity Monitoring
Verify EPIC Access
Block Finance to EPIC
User Access to Apps
VM Activity
VM Level Activity

Videos by NSX Partners

NSX Demo Video

Youtube NSX channel

At VMworld 2013


Under the Hood Network Virtualization with OpenStack
Session NET5847 Introducing to NSX
Network Virtualization : Moving Beyond  the Obvious
Interview with Bruce Davie at VMworld about NSX
Nicira for Open, Flexible and Virtualized Networking
Interview with Martin Casado
General Session Annoucement at VMworld Barcelona


VMworld 2012

NET 5520 - VMware NSX Integration with OpenStack

By Brad Hedlund

Video Interview at VMworld about NSX
Virtualization Security Round Table : VMware NSX
VMware's approach to SDN from Brad Hedlund

By IpSpace (Ivan Pepelnjak)
NSX Architecture Videos

VMUG NSX series


VMworld 2014 Session for NSX and SDDC

http://blogs.vmware.com/networkvirtualization/2014/08/vmworld-2014-networking-security-session-guide.html

VMworld Session for NSX

NSX Training Video by Jason Nash on Pluralsight


Certifications :

VMware Certification Road Map on VCA-NV, VCP-NV, VCIx-NV and VCDX-NV (Sign up if Interested in VCIX-NV)

Linkedin Group for VMware NV Certifications

VCP-NV Certfication

NSX Fast Track for Internetworking Experts - VCIX-NV (Now Available)

VCDX-NV Certification

NSX: Design & Deploy (sign up Available)

NSX Troubleshooting Workshop (sign up Available)


Diagrams :


By Hany Michael :

VMware NSX for vSphere - Systems Architecture


VMware NSX with vCloud Director - External Portal Access
VMware NSX with vCloud Director - Remote VPN Access

By Greg Ferro

NSX - Before and After Traffic Diagrams

By Anthony Burke :

VMware NSX for vSphere Architecture v0.2

By Ivan Pepelnjak :

NSX Architecture



Other blogs and Presentations :

By VMware : 

VMware NSX

NSX Availability 

VMware Communities for NSX

Google + community for NSX

By Brad Hedlund :

NSX Convergence and Reforming operational visibility for the SDDC
Seven Reasons VMware NSX, Cisco UCS adn Nexus are more awesome together
NSX Distributed Firewall

By Scott Lowe :

Handling the NVP to NSX Transition

By Anthony Burke :
VMware NSX is here and Now

By Erik Scholten :
Introduction to VMware NSX
VMware NSX Distributed Services

By Techtarget

By CRN

By Network Computing

By Forbes

By Moor Insights & Strategy

By Virtualized Geek

By Greg Ferro

By SDN Central

By Virtualization Practice

By The Register-co-uk

By Network Computing

By Packetpushers : Real World SDN

By Ivan Pepelnjak: NSX Architecture

VMware NSX Defining the Problem

Why is Network Virtualization so Hard?



Sales:
Contact



Support :


By Nicira : Support Page


NSX Training
http://mylearn.vmware.com/mgrReg/plan.cfm?plan=48389&ui=www_edu

NSX ICM 6.0 course for 5 Days

Social Groups / Community

Linked Group created by yours Truly

Google Plus Community by Angelo Luciani


I will try to keep this page updated as and when receives any feedback or RSS Feeds but you can always leaves the Feedback and I will try to update the post at the earliest.

Share and care as NSX is the Future of Virtualized Networking.

Thanks

Wednesday, January 30, 2013

Quiz on vSphere

Hi Folks,

This post is just to have the input on the issue I was discussing with my colleague.

And it is just to know how the VMware Technologies can be used to suggest a solution to a particular issue.

To answer the question or provide the suggestions, leave the comment and after one week from today the "Winner" will be announced here on this post only.

So here you go........read the question carefully before you come up with answer as you can  use any supported method with different technologies of vSphere.


How can I present 16 vNICs inside a Virtual Machine on vSphere 5.1?



Your time starts now. :-)

Thanks and share!!