tag:blogger.com,1999:blog-32246095771454823502024-03-14T07:03:17.769+05:30My vCloud NotesSharing the Solutions!
Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.comBlogger106125tag:blogger.com,1999:blog-3224609577145482350.post-37319991189980535892023-03-13T22:11:00.005+05:302023-03-13T22:30:19.096+05:30How to redeploy edge transport node in NSX-T(KB#00106)<p><span style="font-family: inherit;"> Hello Guys,</span></p><p><span style="font-family: inherit;">We all know that "How to redeploy the edge gateway in NSX-V" or "How to change the form factor of NSX-V edge from small to medium or large" but how many of you knows how to do it in NSX-T?</span></p><p><span style="font-family: inherit;">I am sure, till now few are in assumption that it is not relevant to NSX-T (at least first part) 😊</span></p><p><span style="font-family: inherit;">It is well relevant and we do redeploy edge nodes in NSX-T too. In this post I am giving you the method to not only redeploy it but also to change the form factor very easily. I gone through web before I did it by myself and could see very complicated process to replace the exiting node with the newly deployed node.</span></p><p><span style="font-family: inherit;">That might be relevant in some other scenario but my initial issue or goal was to change the existing edge node form factor from Medium to xLarge. So, I used API and it worked just perfect!.</span></p><p><span style="font-family: inherit;">Here you go.</span></p><p><span style="font-family: inherit;">Step1 - Connect the NSX-T using API. #If you don't know how then use comment box.</span></p><p><span style="font-family: inherit;">Step 2 - Use the API call </span></p><p><span style="font-family: inherit;"><b>GET</b> https://10.112.152.10/policy/api/v1/transport-nodes #It will give you the detail of all edge nodes</span></p><p><span style="font-family: inherit;">Step 3 - Pick the ID of target edge node from the output of step 2 and run the command as below<br /><br /><b>GET</b> https://10.112.152.10/policy/api/v1/transport-nodes/7b60f554-a36f-4c71-9d6c-fddf7826da8a</span></p><p><span style="font-family: inherit;">You will get output something like below<br /><br /></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhTIZyJ9OmKA8x6sT3wcSwptcJz6PJ6CGzoyc5Fg9OKiMLguhtedXV0dGWOcDx4fQvngYQa1GYSleI8yG4YmMo_FVU6eUxzBogPsMG8_SI46SP9B1MiJSP3E0YAxVxEiRkab8dsAntaairqI7V5CWUntG8Wx3TqA-5CX30nzZnXoMgqxBpDW6TGUx1/s1084/12.png" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: inherit;"><img border="0" data-original-height="847" data-original-width="1084" height="500" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhTIZyJ9OmKA8x6sT3wcSwptcJz6PJ6CGzoyc5Fg9OKiMLguhtedXV0dGWOcDx4fQvngYQa1GYSleI8yG4YmMo_FVU6eUxzBogPsMG8_SI46SP9B1MiJSP3E0YAxVxEiRkab8dsAntaairqI7V5CWUntG8Wx3TqA-5CX30nzZnXoMgqxBpDW6TGUx1/w640-h500/12.png" width="640" /></span></a></div><span style="font-family: inherit;"><br /></span><p></p><p><span style="background-color: white; color: #212121; white-space: pre-wrap;"><span style="font-family: inherit;"><br /></span></span></p><p><span style="font-family: inherit;"><span style="background-color: white; color: #212121; white-space: pre-wrap;">Step 4 </span><span style="background-color: white; color: #212121; white-space: pre-wrap;">- Find the form factor parameter in </span><span style="background-color: white; color: #212121; white-space: pre-wrap;">output of step3. You will see like below-</span></span></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbUR4GPKIhJc8eynNS0EWk-orCQBquxZxGZFYNU_ydyObEjxC_rr8ei1whJ6dwkKWZmaP6_lKqW_qLN2bfvyYboOFZCZ5ZsO6JvhAtJW9nThkjKXSd5Lxi-VLNEuQLaULnYAjnm_VxrFXpzKk4V6gGYNuNV1LYu5N9lowNAviKy01dHjW0TOVq4Cvo/s375/13.png" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: inherit;"><img border="0" data-original-height="122" data-original-width="375" height="208" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbUR4GPKIhJc8eynNS0EWk-orCQBquxZxGZFYNU_ydyObEjxC_rr8ei1whJ6dwkKWZmaP6_lKqW_qLN2bfvyYboOFZCZ5ZsO6JvhAtJW9nThkjKXSd5Lxi-VLNEuQLaULnYAjnm_VxrFXpzKk4V6gGYNuNV1LYu5N9lowNAviKy01dHjW0TOVq4Cvo/w640-h208/13.png" width="640" /></span></a></div><span style="font-family: inherit;"><br /><span style="background-color: white; color: #212121; white-space: pre-wrap;"><br /></span></span><p></p><p><span style="color: #212121; font-family: inherit;"><span style="background-color: white; white-space: pre-wrap;">If you have something else configured here then you will find like MEDIUM or SMALL or LARGE. You can change it as per your requirement and copy the entire output what you got in step 3 and paste in the API tool's body in Raw and JSON format.</span></span></p><p><span style="color: #212121; font-family: inherit;"></span></p><div class="separator" style="clear: both; text-align: center;"><span style="color: #212121; font-family: inherit;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJKCL7AaYEPGljRGbsHgMFzTTPZBb055PtjqUOXMcVQYP3RMiQ21qjqQ-jt1TjThtkDVPVWnwkpZ2HqjJm4MJoidT-UQL2diVMNCpLDZ7Vk57_9cjbzMn4U-P26mio4_XTydBANtpttAHwNXaqg_up9svT30BZFEYhiCZm6w_Ldw0jfByfPR9lOFvE/s986/14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="368" data-original-width="986" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJKCL7AaYEPGljRGbsHgMFzTTPZBb055PtjqUOXMcVQYP3RMiQ21qjqQ-jt1TjThtkDVPVWnwkpZ2HqjJm4MJoidT-UQL2diVMNCpLDZ7Vk57_9cjbzMn4U-P26mio4_XTydBANtpttAHwNXaqg_up9svT30BZFEYhiCZm6w_Ldw0jfByfPR9lOFvE/w640-h238/14.png" width="640" /></a></span></div><span style="color: #212121; font-family: inherit;"><br /><span style="background-color: white; white-space: pre-wrap;"><br /></span></span><p></p><p><span style="color: #212121; font-family: inherit;"><span style="background-color: white; white-space: pre-wrap;">Step 5 - Now, use below API call to change the form factor</span></span></p><p><span style="color: #212121; font-family: inherit;"><span style="background-color: white; white-space: pre-wrap;"><b>POST </b></span><span style="white-space: pre-wrap;">https://10.166.171.198/policy/api/v1/transport-nodes/7b60f554-a36f-4c71-9d6c-fddf7826da8a?action=redeploy</span></span></p><p><span style="color: #212121; font-family: inherit;"><span style="white-space: pre-wrap;">it will start the redeployment and will take around 5-15 minutes or more depending upon your infrastructure.</span></span></p><p><span style="color: #212121; font-family: inherit;"><span style="white-space: pre-wrap;">Background process behind all the task is-</span></span></p><p><span style="color: #212121; font-family: inherit;"><span style="white-space: pre-wrap;">1. It put the target node in maintenance mode</span></span></p><p><span style="color: #212121; font-family: inherit;"><span style="white-space: pre-wrap;">2. Power off and remove the node</span></span></p><p><span style="color: #212121; font-family: inherit;"><span style="white-space: pre-wrap;">3. Deploy the new node with modified form factor or any other modified parameter and power it on</span></span></p><p><span style="color: #212121; font-family: inherit;"><span style="white-space: pre-wrap;">4. Register the node in NSX-T database</span></span></p><p><span style="color: #212121; font-family: inherit;"><span style="white-space: pre-wrap;">5. Configure everything as it was before</span></span></p><p><span style="color: #212121; font-family: inherit;"><span style="white-space: pre-wrap;">6. Exit the maintenance mode from new deployed node</span></span></p><p><span style="color: #212121; font-family: inherit;"><span style="white-space: pre-wrap;"><br /></span></span></p><p><span style="color: #212121; font-family: inherit;"><span style="white-space: pre-wrap;">Hopefully you could understand the whole process but if any doubt, please use the comment section. I will try my best to reply.</span></span></p><p><span style="color: #212121; font-family: inherit;"><span style="white-space: pre-wrap;"><br /></span></span></p><p><span style="color: #212121; font-family: inherit;"><span style="white-space: pre-wrap;">Thank you.</span></span></p>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com0tag:blogger.com,1999:blog-3224609577145482350.post-65561315026123554212021-12-24T16:20:00.001+05:302021-12-27T20:21:25.028+05:30Get list of edge gateways connected to Internet (KB#00105)<p>Hello Guys,</p><p>I used to get such requests from customers so I thought to share this one to web. Many of you might know this but I am sure that many will have benefit from this post.</p><p>My colleagues too requested to share this trick to get the edge gateway name which are connected to internet. </p><p>This sounds tricky but very simple. Try your thought before scroll down and comment :)</p><p>If not getting any idea then continue reading it. So, any edge gateway connected to internet through external network, right? and it has a name :) let's say in our case that name is InternetPG. I am assuming that you know the basic VCD stuff like what is the external network and how can we connect an edge gateway to the internet. If not then its time to start the study for the sake of new year. LOL!</p><p>Logic is, get the edge gateway name where connected external network name like InternetPG. Now, use this logic in powercli</p><p><br />Connect-CIServer mylabs.vcnotes.in #just to connect VCD<br />Get-EdgeGateway | Where {$_.ExtensionData.Configuration.GatewayInterfaces.GatewayInterface.name -clike "InternetPG"} | Select Name, orgvdc | out-gridview</p><p>I like to take output in gridview, if you want, you can remove out-gridview in above command. You will have output like below one.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAYgJa7fk5Wv4Zh3a6hRNxhRmKYyMA1fyJpPVrmposmlcSynjy8lJS2WPrCWYTuItMJ_7zkus9V3AbuzvRxYzFdwTmgUBgInApnGo07bxbKuzK9v9_urMnp9VYDa41TikJbpjkoGfY9nw/" style="margin-left: 1em; margin-right: 1em;"><img data-original-height="290" data-original-width="506" height="366" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAYgJa7fk5Wv4Zh3a6hRNxhRmKYyMA1fyJpPVrmposmlcSynjy8lJS2WPrCWYTuItMJ_7zkus9V3AbuzvRxYzFdwTmgUBgInApnGo07bxbKuzK9v9_urMnp9VYDa41TikJbpjkoGfY9nw/w640-h366/image.png" width="640" /></a></div><br /><br /><p></p><p>Enjoy the year end guys!</p><p><br /></p>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com2tag:blogger.com,1999:blog-3224609577145482350.post-65564112002500922922021-11-05T16:19:00.005+05:302021-11-05T20:03:50.620+05:30Unable to modify Edge gateway in vCloud Director (KB#00104)
<p><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Hello Guys,</span></p>
<p><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">This is not a
general issue everyone faces but I have this issue in my platform and customer
used to report it after every few days. To help myself and team, I am creating
this blog but I will be glad if it help anyone out there.</span></p>
<p><b><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Issue - </span></b><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Edge gateway
modification action failing repeatedly with below like error -<br />
<br />
</span><span face=""Calibri",sans-serif" style="background: silver none repeat scroll 0% 0%; font-size: 10pt; mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-highlight: silver;">[
e0fe75fa-4eff-48d5-9d9a-73f0020a29d5 ] Cannot update edge gateway
"Edge-Gateway" - Cannot update edge gateway "Edge-Gateway"
- Could not execute JDBC batch update - Batch entry 0 /* Method: unknown */ /*
Method: unknown */ /* delete
com.vmware.vcloud.common.model.net.AllocatedIpAddressModel */ delete from
allocated_ip_address where id='5a6ee85c-f052-4ba5-b77f-b7932302b4df'::uuid was
aborted: ERROR: update or delete on table "allocated_ip_address"
violates foreign key constraint "fk_alloc_ip_gw_assigned_ip" on table
"gateway_assigned_ip" Detail: Key
(id)=(5a6ee85c-f052-4ba5-b77f-b7932302b4df) is still referenced from table
"gateway_assigned_ip". Call getNextException to see other errors in
the batch. - ERROR: update or delete on table "allocated_ip_address"
violates foreign key constraint "fk_alloc_ip_gw_assigned_ip" on table
"gateway_assigned_ip" Detail: Key
(id)=(5a6ee85c-f052-4ba5-b77f-b7932302b4df) is still referenced from table
"gateway_assigned_ip".</span><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;"></span></p>
<p><b><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Observation -
</span></b><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Even
if you try to update the description, it fails with similar error. No update is
possible until and unless you resolve above mystery.</span></p>
<p><b><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Resolution - </span></b><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">It will be
fixed from VCD DB but if you are not that good in DB then I would suggest to
open a case with VMware. They will help you out for sure. They always keep on
saying that don't change anything in the DB by your own and we will fix it for
you. Leverage the support! :) But sometime, you have to fix the issue right now.
In that situation, this can help you. I am little good now in DB and know what
I am doing so I used to a lot operations in the VCD DB. It is up to you. </span></p>
<p><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">So, if you
read the error then you will come to know that the DB table
"allocated_ip_address" is having some issues with id "5a6ee85c-f052-4ba5-b77f-b7932302b4df".
Let's see what is this ID.</span></p>
<p><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">1. Login
primary vcd cell and then DB with below command</span></p>
<p><b><span face=""Calibri",sans-serif" lang="FR" style="mso-ansi-language: FR; mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">root@vcdcell01#</span></b><span face=""Calibri",sans-serif" lang="FR" style="mso-ansi-language: FR; mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;"> sudo -u
postgres psql vcloud</span></p>
<p><b><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">1. vcloud=# </span></b><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">select * from
allocated_ip_address where id='5a6ee85c-f052-4ba5-b77f-b7932302b4df';</span></p>
<p><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">You will have
output like below</span></p>
<p style="margin: 0cm;"><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">-[ RECORD 1
]-+-------------------------------------</span></p>
<p style="margin: 0cm;"><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">id
| 5a6ee85c-f052-4ba5-b77f-b7932302b4df</span></p>
<p style="margin: 0cm;"><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">scope_id
| 72ead83f-7216-436b-a94f-43cd01aa534e</span></p>
<p style="margin: 0cm;"><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">address
| 57.191.5.195</span></p>
<p style="margin: 0cm;"><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">addr1
| 968820163</span></p>
<p style="margin: 0cm;"><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">timeout
| 9999-12-31 23:59:59.997</span></p>
<p style="margin: 0cm;"><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">last_modified
| 2020-03-06 15:54:51.327</span></p>
<p style="margin: 0cm;"><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">state
| 1</span></p>
<p><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Now run next
command in the DB only</span></p>
<p><b><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">2. vcloud=#</span></b><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;"> select *
from logical_network where scope_id = '72ead83f-7216-436b-a94f-43cd01aa534e';</span></p>
<p><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">You will get
possibly below output </span></p>
<p><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">-[ RECORD 0
]-+-------------------------------------</span></p>
<p><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;"> Now you
need to find out that where this address 57.191.5.195 is configured. Simplest
way, as this error on a edge gateway so, go to edge gateway in GUI, browse to the
network and subnet and try to find this IP address which must be assigned to
one of the external network. Once you find it then run below command</span></p>
<p><b><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">3. vcloud=#</span></b><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;"> select *
from logical_network where name = 'problematic_network_name';</span></p>
<p><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Note that
problematic network is the name of the network which has the IP address
57.191.5.195. From above command you will have the ip_scope_id value. Note that
please.</span></p>
<p><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Now to fix
the issue, please run below command.</span></p>
<p><b><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">4.</span></b><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;"> <b>vcloud=#</b>
update allocated_ip_address set scope_id = 'ip_scope_id value, noted from
command 3' where id = '5a6ee85c-f052-4ba5-b77f-b7932302b4df';</span></p>
<p><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Now once
updated, you will see that there is no more error on the edge gateway while
updating it.</span></p>
<p><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Also, this is
one of the use case where you can have this issue. I myself know few more use
cases which are tough to explain in post.</span></p>
<p><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">If you have
such issue at your workplace and if VMware too struggle a lot about this, you
may try this or reach me out. I will try my best to help you in this situation.</span></p>
<p><span face=""Calibri",sans-serif" style="mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;">Cheers! </span></p>
<p class="MsoNormal"><span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"> </span></p>
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-IN</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="false"
DefSemiHidden="false" DefQFormat="false" DefPriority="99"
LatentStyleCount="376">
<w:LsdException Locked="false" Priority="0" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 9"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 9"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footnote text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="header"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footer"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index heading"/>
<w:LsdException Locked="false" Priority="35" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="table of figures"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="envelope address"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="envelope return"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footnote reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="line number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="page number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="endnote reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="endnote text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="table of authorities"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="macro"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="toa heading"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 5"/>
<w:LsdException Locked="false" Priority="10" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Closing"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Signature"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="true"
UnhideWhenUsed="true" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Message Header"/>
<w:LsdException Locked="false" Priority="11" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Salutation"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Date"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text First Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text First Indent 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Note Heading"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Block Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Hyperlink"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="FollowedHyperlink"/>
<w:LsdException Locked="false" Priority="22" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Document Map"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Plain Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="E-mail Signature"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Top of Form"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Bottom of Form"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal (Web)"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Acronym"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Address"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Cite"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Code"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Definition"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Keyboard"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Preformatted"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Sample"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Typewriter"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Variable"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal Table"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation subject"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="No List"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Contemporary"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Elegant"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Professional"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Subtle 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Subtle 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Balloon Text"/>
<w:LsdException Locked="false" Priority="39" Name="Table Grid"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Theme"/>
<w:LsdException Locked="false" SemiHidden="true" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" SemiHidden="true" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" QFormat="true"
Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" QFormat="true"
Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" QFormat="true"
Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" QFormat="true"
Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" QFormat="true"
Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" QFormat="true"
Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" SemiHidden="true"
UnhideWhenUsed="true" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="TOC Heading"/>
<w:LsdException Locked="false" Priority="41" Name="Plain Table 1"/>
<w:LsdException Locked="false" Priority="42" Name="Plain Table 2"/>
<w:LsdException Locked="false" Priority="43" Name="Plain Table 3"/>
<w:LsdException Locked="false" Priority="44" Name="Plain Table 4"/>
<w:LsdException Locked="false" Priority="45" Name="Plain Table 5"/>
<w:LsdException Locked="false" Priority="40" Name="Grid Table Light"/>
<w:LsdException Locked="false" Priority="46" Name="Grid Table 1 Light"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark"/>
<w:LsdException Locked="false" Priority="51" Name="Grid Table 6 Colorful"/>
<w:LsdException Locked="false" Priority="52" Name="Grid Table 7 Colorful"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 1"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 1"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 1"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 1"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 1"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 2"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 2"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 2"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 2"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 2"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 3"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 3"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 3"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 3"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 3"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 4"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 4"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 4"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 4"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 4"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 5"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 5"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 5"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 5"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 5"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 6"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 6"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 6"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 6"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 6"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="46" Name="List Table 1 Light"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark"/>
<w:LsdException Locked="false" Priority="51" Name="List Table 6 Colorful"/>
<w:LsdException Locked="false" Priority="52" Name="List Table 7 Colorful"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 1"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 1"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 1"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 1"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 1"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 2"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 2"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 2"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 2"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 2"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 3"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 3"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 3"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 3"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 3"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 4"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 4"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 4"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 4"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 4"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 5"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 5"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 5"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 5"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 5"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 6"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 6"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 6"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 6"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 6"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Mention"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Smart Hyperlink"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Hashtag"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Unresolved Mention"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Smart Link"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;
mso-fareast-language:EN-US;}
</style>
<![endif]-->Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com2tag:blogger.com,1999:blog-3224609577145482350.post-59036777929172752022021-10-20T18:23:00.003+05:302021-10-20T18:48:19.878+05:30Good to Know about VMware Cloud Director (KB#00103)<p>Hello Folks,</p><p>I got feedback from few fellows that I write up about incidents, issues, automation, short and efficient ways to do any task but all these stuff is for those who already works on VCD or on any platform being it NSX, vCenter or powershell. </p><p>Till the date, I haven't published anything like basics of something because I feel that Internet is already full of such stuff. But still, because I received this feedback so I thought to write up for the guys who are fresher in virtualization but in my own way ;)</p><p>I have planned to mention "Good to know" things about any product I work on being it VCD, NSX, VRLI, VROPS, vCenter, Usage Meter, vRNI or powershell.</p><p>Today, I picked VCD. This is for those who just started learning VCD or want to start learning VCD but I believe few points will help those too who are working with VCD ;)<br /></p><p>See, in current circumstances, I think, not only me is short of time but also all the readers too. I believe the information which is being shared should be crisp and to the point. I don't know whether the slide I made to describe the basics of VCD is good enough or not but you can tell me if you think that I should elaborate any other component. I am leaving this to see if it raise any question and helpful anyone out there ;)</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjdZVZ6T33trby1qcwmtbZhJ7fAQJC7smFg7FwNves9mnZWoPy5um3qLTQNvuI1XP_BF5eOeqhsLjz46FAMiQ2OXvMScQBTIgGlm4sF-klljFaAuTDG22DebnOD0dzgK2VwMeWiYdP4efSrWj46fX0yxHDO_7i7BLyOUhzS6s888W7Zo7vgYu1sxSPj=s1174" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="660" data-original-width="1174" src="https://blogger.googleusercontent.com/img/a/AVvXsEjdZVZ6T33trby1qcwmtbZhJ7fAQJC7smFg7FwNves9mnZWoPy5um3qLTQNvuI1XP_BF5eOeqhsLjz46FAMiQ2OXvMScQBTIgGlm4sF-klljFaAuTDG22DebnOD0dzgK2VwMeWiYdP4efSrWj46fX0yxHDO_7i7BLyOUhzS6s888W7Zo7vgYu1sxSPj=s16000" /></a></div><p></p><p>You may fill the comment box with your thoughts and questions :)<br /></p><p><br /></p>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com0tag:blogger.com,1999:blog-3224609577145482350.post-7761260248412577422021-09-28T15:29:00.009+05:302021-09-28T15:51:32.674+05:30Move multiple disks from one vm to another vm (KB#00102)<p>Hello Folks,</p><p>Adding another solution for one unique challenge I got from my customer. </p><p>Challenge - Customer used to move multiple vmdk files from one vm to another vm in vcenter server. Actual challenge is the time in hand for this operation and number of vmdks to remove are always around 15, 18 or 20 per vm. This activity used to have multiple VMs. This become more challenging at the time of roll back once we have moved all disks from source to target vm. That much of vmdks to move and in short period of time can lead to confusion and human error too.</p><p>Solution - I created below powercli script which drastically decrease the time require in such activity and roll back too become very easy with it. Chance of human error is 99% lesser now.</p><p>Below is the code -</p><p>
</p><p class="MsoNormal" style="background: white none repeat scroll 0% 0%; mso-layout-grid-align: none; text-autospace: none;"><span style="color: darkblue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Function</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> move-vmdk</span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">{<br />clear<br />$time</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: dimgrey; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">=</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Get-Date</span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><span style="font-family: "Lucida Console"; font-size: 9pt;"><br /><span style="color: #38761d;">#It will record the timestamp before starting this activity</span></span><br />Write-Host</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: darkred; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">"Current time
is </span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">$time</span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">"<br />$sourcevm</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: dimgrey; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">=</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Read-Host</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">"Enter
the source VM Name "<br />Write-Host</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: darkred; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">"Total number
of disk on source vm is"</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> (</span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Get-HardDisk</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: navy; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">-VM</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">$sourcevm</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">)</span><span style="color: dimgrey; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">.</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">count </span><span style="color: navy; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">-ForegroundColor</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">yellow<br />$fd</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: dimgrey; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">=</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Get-HardDisk</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: navy; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">-VM</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">$sourcevm<br />$TargetVM</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: dimgrey; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">=</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Read-Host</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">"Enter
the target VM Name "<br />Write-Host</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: darkred; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">"Total number
of disk on target vm is"</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> (</span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Get-HardDisk</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: navy; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">-VM</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">$TargetVM</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">)</span><span style="color: dimgrey; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">.</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">count </span><span style="color: navy; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">-ForegroundColor</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Green<br />Write-Host</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: darkred; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">"This script
works with file name of disk to move so please mention the filename of each
disk to move in notepad and save it in C:\temp with disklock.txt name"</span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><br /><span style="color: #38761d;">#save the disk’s location for all
the targeted disks to path C:\Temp in notepad file named diskloc.txt</span><br />$diskfile</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: dimgrey; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">=</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Get-Content</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: navy; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">-Path</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">C:\Temp\diskloc.txt<br />$confirm</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: dimgrey; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">=</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Read-Host</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: navy; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">-Prompt</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: darkblue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">"Are
you sure you want to process for this disk migration (Y/N) "<br />If</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> (</span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">$confirm</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: dimgrey; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">-eq</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: darkred; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">"y"</span><span style="color: darkblue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">) {<br />Foreach</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> (</span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">$loc</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: darkblue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">in</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">$diskfile</span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">){<br />$trgVM</span><span style="color: dimgrey; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">=</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Get-VM</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: navy; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">-Name</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">$TargetVM<br />$disk</span><span style="color: dimgrey; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">=</span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">get-vm</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: navy; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">-name</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">$SourceVM</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: dimgrey; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">|</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Get-HardDisk</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: dimgrey; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">|</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Where-Object</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> {(</span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">$_</span><span style="color: dimgrey; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">.</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Filename </span><span style="color: dimgrey; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">-eq</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">$loc</span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">)}<br />Remove-HardDisk</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">$disk</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: navy; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">-Confirm:</span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">$false<br />New-HardDisk</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: navy; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">-VM</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">$trgVM</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: navy; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">-DiskPath</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">$loc<br />Write-host</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> (</span><span style="color: darkred; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">" "</span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">)<br />}<br />}<br />$time</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: dimgrey; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">=</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Get-Date<br /><span style="color: #38761d;"><span style="font-family: "Lucida Console"; font-size: 9pt;">#It will record the timestamp after completion of this activity</span></span><br />Write-host</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">"Operation has
been completed succesfully"<br />Write-Host</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: darkred; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">"Current time
is </span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">$time</span><span style="color: darkred; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">"</span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"><br />Write-Host</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: darkred; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">"Total number
of disk on target vm is"</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> (</span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Get-HardDisk</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: navy; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">-VM</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">$TargetVM</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">)</span><span style="color: dimgrey; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">.</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">count </span><span style="color: navy; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">-ForegroundColor</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Green<br />Write-Host</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: darkred; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">"Total number
of disk on source vm is"</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> (</span><span style="color: blue; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">Get-HardDisk</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: navy; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">-VM</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: #a82d00; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">$sourcevm</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">)</span><span style="color: dimgrey; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">.</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">count </span><span style="color: navy; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">-ForegroundColor</span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;">yellow<br />}<br /><span style="font-family: helvetica;"></span><span style="font-size: small;"><span style="font-family: inherit;"><br />Below is the sample output</span></span> <br /></span></p><p class="MsoNormal" style="background: white none repeat scroll 0% 0%; mso-layout-grid-align: none; text-autospace: none;"><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdCRiN3MBOrgl3FNlmXhk7yHVlbdhtuSeSWpAqNHOF_FPqUbFJgCApBB0NFtXCu9QJLAAhWvfe2XriTgZuIeM1N2K86OmAg-8zBDxR8H14HLhbQvcvTEWNotVSWsw_o6IgXuiLN3DsXFQ/s1448/out.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="583" data-original-width="1448" height="258" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdCRiN3MBOrgl3FNlmXhk7yHVlbdhtuSeSWpAqNHOF_FPqUbFJgCApBB0NFtXCu9QJLAAhWvfe2XriTgZuIeM1N2K86OmAg-8zBDxR8H14HLhbQvcvTEWNotVSWsw_o6IgXuiLN3DsXFQ/w640-h258/out.PNG" width="640" /></a></div><p></p><p>Note that time taken is just 32 seconds to move four VMDK files. Just to add, size of vmdk doesn't change the time for this migration. <br /></p><p>Hope you will find it useful if you too have such requirement! Any doubt or thought, plesae feel free to comment.<br /><br />Cheers!<br /></p><p class="MsoNormal" style="background: white none repeat scroll 0% 0%; mso-layout-grid-align: none; text-autospace: none;"><span style="color: black; font-family: "Lucida Console"; font-size: 9pt; mso-bidi-font-family: "Lucida Console"; mso-color-alt: windowtext; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-IN;"> </span></p>
<p><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-IN</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="false"
DefSemiHidden="false" DefQFormat="false" DefPriority="99"
LatentStyleCount="376">
<w:LsdException Locked="false" Priority="0" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 9"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 9"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footnote text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="header"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footer"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index heading"/>
<w:LsdException Locked="false" Priority="35" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="table of figures"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="envelope address"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="envelope return"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footnote reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="line number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="page number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="endnote reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="endnote text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="table of authorities"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="macro"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="toa heading"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 5"/>
<w:LsdException Locked="false" Priority="10" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Closing"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Signature"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="true"
UnhideWhenUsed="true" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Message Header"/>
<w:LsdException Locked="false" Priority="11" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Salutation"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Date"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text First Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text First Indent 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Note Heading"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Block Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Hyperlink"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="FollowedHyperlink"/>
<w:LsdException Locked="false" Priority="22" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Document Map"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Plain Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="E-mail Signature"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Top of Form"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Bottom of Form"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal (Web)"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Acronym"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Address"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Cite"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Code"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Definition"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Keyboard"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Preformatted"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Sample"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Typewriter"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Variable"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal Table"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation subject"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="No List"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Contemporary"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Elegant"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Professional"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Subtle 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Subtle 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Balloon Text"/>
<w:LsdException Locked="false" Priority="39" Name="Table Grid"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Theme"/>
<w:LsdException Locked="false" SemiHidden="true" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" SemiHidden="true" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" QFormat="true"
Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" QFormat="true"
Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" QFormat="true"
Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" QFormat="true"
Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" QFormat="true"
Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" QFormat="true"
Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" SemiHidden="true"
UnhideWhenUsed="true" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="TOC Heading"/>
<w:LsdException Locked="false" Priority="41" Name="Plain Table 1"/>
<w:LsdException Locked="false" Priority="42" Name="Plain Table 2"/>
<w:LsdException Locked="false" Priority="43" Name="Plain Table 3"/>
<w:LsdException Locked="false" Priority="44" Name="Plain Table 4"/>
<w:LsdException Locked="false" Priority="45" Name="Plain Table 5"/>
<w:LsdException Locked="false" Priority="40" Name="Grid Table Light"/>
<w:LsdException Locked="false" Priority="46" Name="Grid Table 1 Light"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark"/>
<w:LsdException Locked="false" Priority="51" Name="Grid Table 6 Colorful"/>
<w:LsdException Locked="false" Priority="52" Name="Grid Table 7 Colorful"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 1"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 1"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 1"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 1"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 1"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 2"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 2"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 2"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 2"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 2"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 3"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 3"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 3"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 3"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 3"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 4"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 4"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 4"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 4"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 4"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 5"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 5"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 5"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 5"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 5"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 6"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 6"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 6"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 6"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 6"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="46" Name="List Table 1 Light"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark"/>
<w:LsdException Locked="false" Priority="51" Name="List Table 6 Colorful"/>
<w:LsdException Locked="false" Priority="52" Name="List Table 7 Colorful"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 1"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 1"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 1"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 1"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 1"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 2"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 2"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 2"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 2"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 2"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 3"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 3"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 3"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 3"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 3"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 4"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 4"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 4"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 4"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 4"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 5"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 5"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 5"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 5"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 5"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 6"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 6"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 6"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 6"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 6"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Mention"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Smart Hyperlink"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Hashtag"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Unresolved Mention"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Smart Link"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman",serif;}
</style>
<![endif]--></p>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com3tag:blogger.com,1999:blog-3224609577145482350.post-13383361514648124062021-09-09T12:44:00.004+05:302021-09-09T12:46:05.631+05:30Delete an object in VMware Usage Meter (KB#00101)<p>Hello Guys,</p><p>If you ever got stuck with any issue with VMware Usage Meter then you might know that there are not enough troubleshooting KBs from VMware or enough troubleshooting articles on it. I too got stuck in one issue and couldn't find any article which could help me. I raised a SR too but it was pending since weeks without any support from VMware Support team. </p><p>I continued to work on it and finally could resolve it by my own hence thought to create a KB here on vcnotes.in.</p><p><b>Issue :</b> Duplicate entry found of same vcenter server through two different vROPS instances. Now need to delete vROPS server from usage meter from product page (Usage Meter Version 4.4). In my case, I didn't want three vROPS entry here and want to delete one which is bringing in the duplicate vcenter entry. This KB will help you to understand how to delete any product from product list in usage meter.<br /></p><p><b>Roadblock : </b>There is no option to delete the vROPS product in version 4.4's GUI. Please note that this version comes with HTML5 interface. In flex interface you could do it but in HTML5, there is no such option for vROPS. Reason is, Usage meter pick vROPS from vCenter MOB extension. I was having below kind of state. I had to change the snippet with vcenter name.</p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgJfeVk7mKl_YEIvJfAuTBz5h3W1-0OJYUguZEt-yj-mSG4q4909_dbsAGwujF5Oiy2BJ-247DVoRkRuoTltX-xbFisgX84av80JSrVMDXtaDXBoyHSZ0llZUvd910c6UzE3a3qW4nBD-aH1CDag8qJsnrBigukpx1LuDNju3vVm0zFdVaOaN2wUstU=s1788" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="367" data-original-width="1788" height="132" src="https://blogger.googleusercontent.com/img/a/AVvXsEgJfeVk7mKl_YEIvJfAuTBz5h3W1-0OJYUguZEt-yj-mSG4q4909_dbsAGwujF5Oiy2BJ-247DVoRkRuoTltX-xbFisgX84av80JSrVMDXtaDXBoyHSZ0llZUvd910c6UzE3a3qW4nBD-aH1CDag8qJsnrBigukpx1LuDNju3vVm0zFdVaOaN2wUstU=w640-h132" width="640" /></a></div><br /><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjt-6z4pCBYxZWmXVLGNcFTELd7T0noYRZhaHEXBclER5RY7JLmz1XnuHpkgsgWxT1z4oFT5jGctECqGV_us1_salR_mmaV0K1td4oa1gnz9pr6sncOVk2dX39pDQB72I0BeOoRGcb5zgt4q8-pG-ced11wIg5atotPIY6DTFkrM9DwJ80AhHMlzpye=s1788" style="margin-left: 1em; margin-right: 1em;"></a></div><p>You can see that in vRealize operation page there is a vcenter named vcenter2.vcnotes.in is showing against two different vrops nodes that are 172.17.1.238 and 172.17.1.239. </p><p>This is a mess and we need to clean this up. I want to delete the entry against 172.17.1.239 but there is no option to delete. </p><p><b>Solution : </b>Solution is to use API.</p><p>1. Connect Usage Meter in API tool as explained below</p><p><b>Query -<br /><br /></b><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpVfzLqBNY_1oylmuhW7RrhTJRNSJ9REInsvFsdp_y7VtXvKog1YDJtIXYFU4h6bttZ1pGFgyu81nK89oLs6lJUG6qjH20hLy9gM6M9yrxLzym_NHVaqtXIF8fICZEGB2Qr8vYnank0v4/s1274/1.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="67" data-original-width="1274" height="34" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpVfzLqBNY_1oylmuhW7RrhTJRNSJ9REInsvFsdp_y7VtXvKog1YDJtIXYFU4h6bttZ1pGFgyu81nK89oLs6lJUG6qjH20hLy9gM6M9yrxLzym_NHVaqtXIF8fICZEGB2Qr8vYnank0v4/w640-h34/1.PNG" width="640" /></a></p><b>Header - <br /></b><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_z9IhCj8SZi2lygObxMx3Xk0EyGR8gZU28-GrQR59V6J0Xwlz_CfECba47pJlpipjyvfNOezLg6D2MmlzB55J6lmAlc6u3JhqezAHNd5n5wvqi9bIeN2dMbHtpmZqkrVt9_r6t18jvk8/s689/2.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="54" data-original-width="689" height="50" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_z9IhCj8SZi2lygObxMx3Xk0EyGR8gZU28-GrQR59V6J0Xwlz_CfECba47pJlpipjyvfNOezLg6D2MmlzB55J6lmAlc6u3JhqezAHNd5n5wvqi9bIeN2dMbHtpmZqkrVt9_r6t18jvk8/w640-h50/2.PNG" width="640" /></a></div><p><b>Credentials -</b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja2SGXqxJMLGvC3_A3vBSeuzgIUC1IAYrWFBgkDkGFQqY9GsaG7d0ORV7qD9KjXx-WJ0M4qrv2I0DP92LAIBTKL50oouxn_QG_Uc6WOVvMKgacqC7FJIg1h9CRj2AH5V9EQneCDn2Nc3Q/s885/3.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="190" data-original-width="885" height="138" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja2SGXqxJMLGvC3_A3vBSeuzgIUC1IAYrWFBgkDkGFQqY9GsaG7d0ORV7qD9KjXx-WJ0M4qrv2I0DP92LAIBTKL50oouxn_QG_Uc6WOVvMKgacqC7FJIg1h9CRj2AH5V9EQneCDn2Nc3Q/w640-h138/3.PNG" width="640" /></a></div><br /><p>Once you entered the filed as above, hit the send button, it will give you output like below</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm5y17c_r8NSXQ0VxB5NfEmfEWf0woPnziktzrLh5M82bQf5fGsE6tfyNbvxdk2HZCyvCbxIG-V1GunqcOHjIX2emxEflcb1DPE9DQGUUrnGvZavHYp6x-OYffF6zyz3sQISD99afGKCg/s1433/5.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="567" data-original-width="1433" height="254" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm5y17c_r8NSXQ0VxB5NfEmfEWf0woPnziktzrLh5M82bQf5fGsE6tfyNbvxdk2HZCyvCbxIG-V1GunqcOHjIX2emxEflcb1DPE9DQGUUrnGvZavHYp6x-OYffF6zyz3sQISD99afGKCg/w640-h254/5.PNG" width="640" /></a></div>Note that in above snippet you have message "202 Accepted", means you are logged in now. Also, you have <b>sessionid </b>in Body. It will be used as a header for further work. Let's check further.<br /><p></p><p>Now, the requirement is to delete the product. Use below delete query-</p><p>DELETE https://172.25.2.198/api/v1/product?id=8&productType=VROPS&forget=true</p><p><b>Where </b></p><p>api call is - https://172.25.2.198/api/v1/product</p><p>id - this is the prdouct ID, well visible in the HTML5 web page when you login in usage meter</p><p>product tye - it is to mention that the product you are trying to delete is vcenter, vcd, vrops or something else</p><p>forget - it is to delete the history and for full cleanup. You should always use it.</p><p><b>Headers will be - </b> <br /></p><p>Accept : Application/json (used earlier)<br />session id : extracted after login in above steps</p><p>Once you have given all the required parameters, hit the send button and targeted product will be delete from VMware Usage meter UI page.</p><p>Now when you read above stuff, you should be able to understand this VMware <a href="https://code.vmware.com/apis/1165/vcloud-usage-meter" target="_blank">documentation </a>for more information on API operations with VMware usage Meter. <br /></p><p>Thank you.<br /></p>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com0tag:blogger.com,1999:blog-3224609577145482350.post-6494367736229828102021-07-14T22:46:00.003+05:302021-07-14T22:50:16.806+05:30unlock NSX local accounts for API Operations (KB#00100)<p>Hello Guys,</p><p>This issue is mysterious issue where NSX's local account gets locked out not for login into NSX GUI but for API operations. Creating this blog because I couldn't find the solution on web. VMware article was there explaining root cause but solution was not there too.<br /></p><p><b>Symptoms</b></p><p>1) Any application or product which works with or uses NSX for network services, will not be able to use NSX to create, remove, update or deletion operations. However, running services will be running fine.<br />2) You will be able to login NSX portal but will not be able to use APIs. Not even through any other API tool like postman. You might get error like below<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKxYrkZgwFAQBNZ7O1x5g3gp5cRxpSCCwz1VwYuTgoNBU3i_iXlftO52bffjRs5T1fqJkB0sfxggdy0JYf4zCTyrPLSxBmC_jgBs0coH7IO8rmqr4gzE5vyugGtcVTUMs9fTWE_UjVuho/s906/2.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="413" data-original-width="906" height="292" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKxYrkZgwFAQBNZ7O1x5g3gp5cRxpSCCwz1VwYuTgoNBU3i_iXlftO52bffjRs5T1fqJkB0sfxggdy0JYf4zCTyrPLSxBmC_jgBs0coH7IO8rmqr4gzE5vyugGtcVTUMs9fTWE_UjVuho/w640-h292/2.PNG" width="640" /></a></div><p><br />3) I uses VMware Cloud Director which uses NSX for networking and security service. On VMware Cloud Director, I could see error like below when you open any Edge Gateway or do any configuration change. Below are the VCD debug logs-</p><p>2021-07-12 16:18:52,955 | DEBUG | task-service-activity-pool-128 | NetworkSecurityErrorHandler | Response error: <!doctype html><html lang="en"><head><title>HTTP Status 403 – Forbidden</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1><span style="background-color: #fcff01;">HTTP Status 403 – Forbidden</span></h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> <span style="background-color: #fcff01;">This IP address has been blocked temporarily.</span></p><p><b>Description</b> <span style="background-color: #fcff01;">The server understood the request but refuses to authorize it.</span></p><hr class="line" /></body></html> | requestId=18cbd3bc-2eaf-42af-b11e-4bce957bff9e,request=POST https://testvcd.com/api/admin/edgeGateway/509ed27c-724d-490b-b0c7-e25d19523017/action/redeploy,requestTime=1626106731682,remoteAddress=172.25.1.21:60592,userAgent=Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (...,accept=application/*+json;version 34.0 vcd=632554b9-0779-4ddc-8b62-be08d1c167f6,task=82c8a4fc-35ba-490a-a235-b4a65a25cace activity=(com.vmware.vcloud.backendbase.management.system.TaskActivity,urn:uuid:82c8a4fc-35ba-490a-a235-b4a65a25cace)<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibC3pVlv4m-K2WtLOqU9Tdub-AvthB2AL2JzLn-BPgwgGtK78wo1XykQDXsbBjaUssv2QNTTd5Ol1Kh8fpfsrfzEyBpHiBJciozyACsnm67o6Ilp9kES3yvumtJbdk-Dg9OyHbGgeNYKo/s1509/3.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="261" data-original-width="1509" height="110" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibC3pVlv4m-K2WtLOqU9Tdub-AvthB2AL2JzLn-BPgwgGtK78wo1XykQDXsbBjaUssv2QNTTd5Ol1Kh8fpfsrfzEyBpHiBJciozyACsnm67o6Ilp9kES3yvumtJbdk-Dg9OyHbGgeNYKo/w640-h110/3.PNG" width="640" /></a></div><p>4) I checked the NSX Manager logs and could see multiple events like below in /usr/appmgmt-webserver/logs/localhost_access_log.2021-07-13.txt. </p><p>Where localhost_access_log.2021-07-13.txt. This filename will change as per current date in logs.<br /></p><p><span style="background-color: #fcff01;">172.25.1.239</span> - - [13/Jul/2021:23:21:38 +0200] "GET /api/2.0/services/ipset/ipset-29 HTTP/1.1" "https-jsse-nio-443-exec-2292" <span style="background-color: red;">403</span> 649 2234<br /><span style="background-color: #fcff01;">172.25.1.239</span> - - [13/Jul/2021:23:21:38 +0200] "GET /api/2.0/services/ipset/ipset-106 HTTP/1.1" "https-jsse-nio-443-exec-2334" <span style="background-color: red;">403</span> 649 2241<br /><span style="background-color: #fcff01;">172.25.1.239</span> - - [13/Jul/2021:23:21:38 +0200] "GET /api/versions HTTP/1.1" "https-jsse-nio-443-exec-2366" <span style="background-color: red;">403</span> 649 2243<br /><span style="background-color: #fcff01;">172.25.1.239</span> - - [13/Jul/2021:23:21:38 +0200] "GET /api/versions HTTP/1.1" "https-jsse-nio-443-exec-2325" <span style="background-color: red;">403</span> 649 2224<br /></p><p><span style="background-color: #fcff01;">Yellow -</span> This is IP address which is trying to make a connection with NSX Manager which is failing</p><p><span style="background-color: red;">Red -</span> This is error code 403 which means access forbidden</p><p>Above logs means, IP address (<span style="background-color: #fcff01;">172.25.1.239</span>) is trying connect with NSX Manager but NSX Manager is not allowing access to connect. <br /></p><p><b>Root Cause<br /></b></p><p>When any application (Monitoring or non-monitoring) is configured with incorrect username and password to connect with NSX Manager then as a security feature NSX Manager blacklist that username after certain invalid authentication attempts (by default it is 10 but can be modified). Any user too can do this because someone might be trying to guess the password! be aware of that too ;)<br /></p><p><b>Solution</b></p><p>Before correcting it, you must identify which application or user is doing this. Because if post correction, if still invalid attempts are coming then it will again block the user account. How will you identify that's your headache but you can reach me out :)<br /></p><p>Once identified then follow below steps</p><p>1. Login NSX Manager CLI with admin</p><p>2. enter into enable mode with commad</p><p>#enable</p><p>3. Enter into engineering mode with command↓</p><p>#st en</p><p>Press Y when asked and use password : IAmOnThePhoneWithTechSupport<br /></p><p><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-IN</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--></p><p>4. then edit /home/secureall/secureall/sem/WEB-INF/spring/vsmconfig.properties and look for values as below in this file</p><p>#Denotes whether blacklisting is enabled<br />blacklist.enabed=true</p><p>You will find it true. </p><p>5. To resolve this issue, first you need to make it false that is from </p><p>blacklist.enabed=true </p><p>↓<br /></p><p>blacklist.enabed=false</p><p>and then save the file</p><p>6. Reboot NSX Manager now with below command</p><p>#reboot</p><p>7. Once rebooted, you will find that NSX account which you used for integration with other application and which was locked out is now responding over API requests and will give you output as below now.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU5r9_g8754THAiXrR7kLCDVrrU1YHRfPCOWtgqZaQ8jS1HLkG0hSbaulSMPXZ2HdLiFtulYhhcOu__CD5a2vGEfeLk9SbeM7qM3FIszVs8AELlTTJNsbDi_HBw9ArUTzVADP54ivDE94/s904/4.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="347" data-original-width="904" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU5r9_g8754THAiXrR7kLCDVrrU1YHRfPCOWtgqZaQ8jS1HLkG0hSbaulSMPXZ2HdLiFtulYhhcOu__CD5a2vGEfeLk9SbeM7qM3FIszVs8AELlTTJNsbDi_HBw9ArUTzVADP54ivDE94/s16000/4.PNG" /></a></div><p></p><p>8. In step 5, you have changed the blacklisting configuration which can be a security vulnerability. As soon as this issue fix, then you need to revert it back to true so that future invalid attempts gets blocked.</p><p>9. Post making it true, reboot NSX Manager. Please note that everytime you change it, you have to reboot NSX manager to make it effective.</p><p>Don't forget to comment if it was useful for you. Cheers!<br /></p>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com0tag:blogger.com,1999:blog-3224609577145482350.post-13217835253631303662021-06-21T19:00:00.004+05:302021-06-21T19:07:35.328+05:30Kill the ongoing\stuck process in VMware Cloud Director(KB#00099)<p>Hello guys,</p><p>You will find today's post more interesting because resolution of this issue is only documented as vcloud service restart. There are many posts on the web which says that in order to clean the stuck job in VMware Cloud Director GUI, you need to restart vCD services.</p><p>Today, I faced the same issue but I decided to find some other solution. For single VM, it is never a good idea to restart entire vcloud director services. isn't it?</p><p><b>Issue :</b> Task is running since long in Cloud Director GUI and not timing out even after more than 6 hours <br /></p><p>First, let me show you what exactly a long running job or stuck job means. Below is the task detail. In vCloud Director GUI, you will also see that particular tasks is running since long. Hope it is clear<br /></p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgigKA71Q3D59jhWKyPRqTu2mVGX-0MRITv1VOBXzjINDJcBa6WFSJUIoehjDacKZmNPXy20ClGpbVYbElNv8JyHSGllTOh1mmNJ_hy-DDSflpLbjtzbpbs-07Eedryr2wgQenPP2vVEeo/s651/4.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="473" data-original-width="651" height="466" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgigKA71Q3D59jhWKyPRqTu2mVGX-0MRITv1VOBXzjINDJcBa6WFSJUIoehjDacKZmNPXy20ClGpbVYbElNv8JyHSGllTOh1mmNJ_hy-DDSflpLbjtzbpbs-07Eedryr2wgQenPP2vVEeo/w640-h466/4.PNG" width="640" /></a></div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfhBvwJ02OGem3iLNA3_e-35aR3roorJ6HD29EaLEgr4Ux_NpbXTo91k9umsikQmJzazEVaNhhKWPUgSS0B-yPioHx2Hsja8DjW8JPqwiWPLJ-ijZcGiN2eLoUOUmQEdhyZj_8MjHlphc/s658/4.PNG" style="margin-left: 1em; margin-right: 1em;"></a></div><p><br /><b>Observation : </b>Above job was running since last 6-7 hours. Earlier, I noticed that such job used to timed-out in around 4 hours which is default time out value for any vcd tasks but this one was stubborn job. Due to this, I couldn't perform any operation on VM other than power off and power on. From vCenter, there was no such issues so this was clearly a VMware Cloud Director issue</p><p><b>Solution :</b></p><p>1. Login primary cell with root account and then login DB (if embedded. In case of external DB then login directly DB server).</p><p>2. Run below command to see the stuck task</p><p><b>select * from organization where name = '<i>org_name';</i></b></p><p>It will give you org_id. note that down.</p><p>3. Now run below command by using org_id you got in 2nd command.<br /></p><p><b><i>select * from task where org_id = 'org_id';</i></b></p><p>It will show you the task name, job id (as in above snippet), which will confirm that this is the right task to cancel. Generally you will see this stuck task only but if you see many then search with job id rather than org_id. If you don't understood this line then, comment box is yours.</p><p><b><i>4. </i></b>Now execute below command to delete this task from DB. <span style="color: red;">Take backup first please!</span></p><p><b><span style="color: red;"><span style="color: black;">Delete from task where org_id = '<i>org_id</i>';</span></span></b></p><p>Stuck task has been deleted from DB now. Doing all above operations doesn't require any downtime so go ahead without any fear!<br /></p><p><span style="color: red;"><span style="color: black;">Cheers!</span> </span> <br /></p>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com0tag:blogger.com,1999:blog-3224609577145482350.post-64280115038619426762021-06-12T19:01:00.006+05:302021-06-14T19:53:54.585+05:30Fix null ip_scope_id of vcd network (KB#00098)<p>Hi guys,</p><p>Since the beginning of HTML5 interface of VMware Cloud Director there are some major issues with portal and the DB. Today I am going to give you fix for one of those issues for which many people over the globe are finding the solution. Few people are not getting solution from even VMware as per my discussion in VMware community. Knowing the fact that I got this fix from VMware but still I found many people struggling due to this. So, I thought that I should create a web record of this issue.<br /></p><p><b>Symptoms\Observation : </b></p><p>1. When you click on external network page in cloud director /provider page and browse all pages one by one, one of the page will keep on trying to browse but will fail with timeout</p><p>2. When you apply filter and search that external network tool, your search will end with timeout with no result</p><p>3. When you try to add problematic network into your vapp then it will always fail to add and will give you weired errors.</p><p>4. This network can be external network or org network or vapp network</p><p>5. Edges where problematic network is attached will intermittently loss the network packet or total loss also can be there.</p><p>Basically, you will feel that network is broken and you can't see or edit that problematic or broken network in vCD GUI at all.</p><p><b>Reason :</b></p><p>This is happening because ip_scope_id value in the cloud director DB for that particular network has become null.</p><p><b>Resolution :</b></p><p><b>1. </b>If you too facing similar symptoms with your network then run below command to confirm that your network is having same issue. This command needs to run in Cloud director DB which can be postgres or SQL. Command is same in both the DB flavor-</p><p><b>select * from logical_network where name = '<i>problematic_network_name';</i></b></p><p>Below is the example output</p><p><b></b></p><div class="separator" style="clear: both; text-align: center;"><b><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2_xHg1CO5CKPtbadM6qw1axJWQAMjnWEd012co9FqaWFEZ5duPmRkR6D1dWhrvt3gGfa_6mFWpTptNGMqR3KsvthQ0KLO2CRscukuCruSdRV2A2sqlVbtuHW2CVY6GTg50w3Ax5LTGCY/s1549/1.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="564" data-original-width="1549" height="234" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2_xHg1CO5CKPtbadM6qw1axJWQAMjnWEd012co9FqaWFEZ5duPmRkR6D1dWhrvt3gGfa_6mFWpTptNGMqR3KsvthQ0KLO2CRscukuCruSdRV2A2sqlVbtuHW2CVY6GTg50w3Ax5LTGCY/w640-h234/1.PNG" width="640" /></a></b></div><b><br /><i> </i></b>In above snippet, I depicted clearly that where is the issue. Now, if you too see that ip_scope_id is null for your network too then run next command.<p></p><p><b>2. </b>To solve this, we need to know ip_scope_id value and then insert in above table. to get the value run below command. Only thing to notice here in below command is, you need to change the logical_network_id value. This value you will get from first command. Copy that value and put that in below command and run it. There will be no impact of doing this as this is just get command.<b> <br /></b></p><p><b>select * from ip_scope where id in (select scope_id from allocated_ip_address where id in (select allocated_ip_address_id from gateway_assigned_ip where gateway_interface_id in (select id from gateway_interface where logical_network_id = '<span style="background-color: #fcff01;">db62f356-2f24-48b4-a841-87512e720f65</span>'))); </b><br /></p><p>You will have below sample output-</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvPcrRdHRSR7fxi1KY3wxCqMgdqJ92DklpqMh1gh2QS13ZZXwNWlrCOJHOQrG1MQ5U9YJkDQ2aeOB23ggFm5XEGoNUnZhi8f3B-V9pHhk2Be0moA2b2JhhWXVZtT9zYqumlj46wG5Md3c/s1638/2.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="185" data-original-width="1638" height="72" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvPcrRdHRSR7fxi1KY3wxCqMgdqJ92DklpqMh1gh2QS13ZZXwNWlrCOJHOQrG1MQ5U9YJkDQ2aeOB23ggFm5XEGoNUnZhi8f3B-V9pHhk2Be0moA2b2JhhWXVZtT9zYqumlj46wG5Md3c/w640-h72/2.PNG" width="640" /></a></div><p><br />ID, in above snippet is your ip_scope_id. Now when you have this let's insert it in logical_network table.</p><p>Before doing this, take the backup of your DB. If you have embedded DB then use the command</p><p>#/opt/vmware/appliance/bin/create-db-backup</p><p>Once backup is done then let's insert it by running next command</p><p><b>3. </b>From 1st and 2nd command you have the logical_network_id and ip_scope_id respectively. Replace both ids in below command and then run it.<b><br /></b></p><p><b>insert into logical_network_ip_scope(scope_id,logical_network_id) values('eb578ab9-2f4b-49c6-8fa6-4cd25472a1bf','5149b5ef-fc53-453d-a59d-a6f349624307'); </b></p><p><b><br /> </b></p><p><b><span style="color: red;">Warning : If you are not well versed or if you are not understanding what is happening here then take help of VMware to understand or you can comment here I will help you out for sure.</span></b></p><p><span style="color: red;"><span style="color: black;">Once above command is done, you will see that the network is now visible in the VCD GUI, you can find the network in the portal. Edge or vapp which are connected to this network are behaving good now.</span></span></p><p><span style="color: red;"><span style="color: black;"><b>4.</b> Now, again run the first command and see if you have the ip_scope_id value now. This should be in-place but there are 1% chance that it is still not showing there but issue is resolved. To fix it, run below command-</span></span></p><p><span style="color: red;"><span style="color: black;"><b>update logical_network set ip_scope_id = 'd0953b40-3426-44af-a719-349b1245b3de' where id = '7353056c-2ba9-4ee0-9f75-631b3f0be77f';<br /><br /></b></span></span></p><div class="separator" style="clear: both; text-align: center;"><span style="color: black;"><b><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrtJaSV4IYccNU611YRI5Um2ksHGyFfb8ZQZ__JrMBpnCO6wEMNsTcZuJfoq3GuE7L5dP6fN91aH1jRx-KjuTJHT8dzKgUQImdFbaHtB-KXg9eFfZMBABpZa8LsqG4_vBxbFLPeEyqNS8/s1654/3.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="216" data-original-width="1654" height="84" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrtJaSV4IYccNU611YRI5Um2ksHGyFfb8ZQZ__JrMBpnCO6wEMNsTcZuJfoq3GuE7L5dP6fN91aH1jRx-KjuTJHT8dzKgUQImdFbaHtB-KXg9eFfZMBABpZa8LsqG4_vBxbFLPeEyqNS8/w640-h84/3.PNG" width="640" /></a></b></span></div><p></p><p><span style="color: red;"><span style="color: black;">Now, I think I can hope that you know what to change in above line before running it. If any doubt then I am not far from your guys. Feel free to comment.</span></span></p><p><span style="color: red;"><span style="color: black;"><b>Your issue is fixed! Enjoy 😊 </b> </span></span><b><span style="color: red;"></span> </b><br /></p><p><br /></p>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com0tag:blogger.com,1999:blog-3224609577145482350.post-62218558836302915072021-04-19T18:03:00.005+05:302021-04-19T18:04:16.787+05:30Get Cloud Director VM Inventory with Storage Info (KB#00097)<p> Hello Guys,<br /></p><p>Keep fighting with Corona and keep your spirit up. It will help 😊<br /><br />I got this challenge in form of a request from my customer. He requested all VM's info including cpu, mem and disk size. Initially I thought what's a big deal in it but then when I actually started writing code, I had the feeling like "What the heck" LOL!<br /><br />Guys who already dealt with it, might know my pain. I started browsing google and found that many people are asking same question and I found vmware community <a href="https://communities.vmware.com/t5/vCloud-Director-PowerCLI/How-to-find-the-storage-of-a-VM-in-Cloud-director/td-p/1694228" target="_blank">thread </a>too was unanswered. After a extensive search and hard work, I could do it. Below is the code guys:<br /><br /><br />==========<br />Function Get-CIVMInventory {<br />$ppp = Read-host "enter the vm name"<br />$vms = Get-CIVM -Name $ppp<br />Foreach ($vm in $vms){<br />$ee = $vm.ExtensionData.GetVirtualHardwareSection().item | Where {$_.Description -like “Hard Disk”}<br />$ff = $ee.VirtualQuantity.value<br />foreach ($f in $ff){<br />Get-CIVM -Name $vm | Select @{N="Name";E={@($vm.Name)}}, CPUCount, MemoryGB, @{N="DiskSize(GB)";E={@($f/1024/1024/1024)}}<br />}<br />}<br />Get-CIVMInventory<br />}<br />=========<br /><br />Above is for single VM, you might be having requests like you want to fetch for all VMs in your cloud director environment then please use below code: <br /><br />========<br />$vms = Get-CIVM<br />$output = Foreach ($vm in $vms){<br />$ee = $vm.ExtensionData.GetVirtualHardwareSection().item | Where {$_.Description -like “Hard Disk”}<br />$ff = $ee.VirtualQuantity.value<br />foreach ($f in $ff){<br />Get-CIVM -Name $vm | Select @{N="Name";E={@($vm.Name)}}, CPUCount, MemoryGB, @{N="DiskSize(GB)";E={@($f/1024/1024/1024)}}<br />}<br />}<br />$output | Import-Csv C:\Temp\fra_vcd_vm_invent.csv<br />=========<br /><br />It is tested and working for me. Give it a try and let me know if it doesn't work for you😊 I answered the VMware thread too.<br /></p>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com0tag:blogger.com,1999:blog-3224609577145482350.post-74811304552612348192021-03-23T11:07:00.008+05:302021-03-23T13:44:49.022+05:30Create/Update Metadata of Cloud Director Objects (KB#00096)<p><b>Overview</b></p><p>You can easily create/modify metadata for any Cloud Director object using GUI but it is a challenge if there is no option to modify or create metadata from GUI and according to your requirement. This is the issue with VMware Cloud Director 10.1.2. This version not only doesn't have this option from GUI but also existing metadata entries are not editable from GUI. This is the reason, I had to find some other way out. <br /></p><p>As a solution, either you need to do it from APIs or from PowerShell. I will demonstrate both ways here. You may choose which sounds easy for you. Same method will be followed in future versions as well if VMware haven't plan to change the Metadata Format as they did for older versions of vCD. This is the reason that most of the articles on web don't give you exact information as those are outdated now.<br /></p><p><b>Solution 1: From PowerCLI<br /></b></p><p>=======<br />$vcd = Read-Host "Enter fqdn/IP here"<br />Connect-CIServer $vcd<br /><span style="color: #38761d;">#In below line, you need to specifiy the object whether it is VM, vAPP, Org or OrgvDC. Command will change accordingly. For example, for VM, you will use Get-CIVM. For Org, you will use Get-Org and so on...</span><br />$vapp = <span style="background-color: #fcff01;">Get-CIVApp -Name testconsole</span> <br />$metadata = $vapp.extensiondata.GetMetadata()<br />$metadata.MetadataEntry = New-Object VMware.VimAutomation.Cloud.Views.MetadataEntry<br />$metadata.MetadataEntry[0].Key = <span style="background-color: #fcff01;">"vCnotes"</span> <br />$metadata.MetadataEntry[0].TypedValue = New-Object VMware.VimAutomation.Cloud.Views.MetadataStringValue<br />$metadata.MetadataEntry[0].TypedValue.Value = <span style="background-color: #fcff01;">"test"</span> <br />$metadata.MetadataEntry[0].Domain = New-Object VMware.VimAutomation.Cloud.Views.MetadataDomainTag<br />$metadata.MetadataEntry[0].Domain.Visibility = <span style="background-color: #fcff01;">"readonly"</span> <span style="color: #38761d;"></span><br />$metadata.MetadataEntry[0].Domain.Value = "SYSTEM" $vapp.ExtensionData.CreateMetadata($metadata)<br />=======</p><p>Copy the above lines and change it according to your environment and run it. You need to modify the yellow highlighted value according to your environment.<br /></p><p><b>Note that : </b></p><p>1. To update existing entry, you can run above command by keeping key name same. It will update the existing keys. <br />2. If you are Tenant Administrator then you won't be able to see the private visible keys but still can modify using this commands.<br /><br /></p><p><b>Solution 2: From any API Tool </b>: It is lengthy and complex one.</p><p>I will take sometime to update this post. Meanwhile, enjoy using Solution 1 ;)</p><p>For any doubt/error in powercli, feel free to comment.<br /><b></b></p>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com0tag:blogger.com,1999:blog-3224609577145482350.post-54445875846642539562021-03-21T12:45:00.001+05:302021-03-23T18:48:27.422+05:30Reset root account password without restarting esxi host (KB#00095)<p><b>Overiew</b></p><p>Generally, if you forgot root account password then you reboot the appliance and then enter grub menu by pressing key 'e' during the boot and then you put the keywords rw init=/bin/bash in the last of first line then you press F10 to save and continue for temp login with root account.</p><p>But what if you can't reboot esxi host and have to reset the root password as well. In other words, what if you want to reset root account password without rebooting it anytime.<br /></p><p>Sounds interesting, isn't it?</p><p><b>Solution</b></p><p>I will update this post by next weekend. Stay tuned guys!!</p><p><b> </b><br /></p><p><b> </b><br /></p><p>Thank you<br /></p>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com0tag:blogger.com,1999:blog-3224609577145482350.post-978931764117595512021-03-21T12:11:00.008+05:302021-03-21T12:33:59.216+05:30Check Free IP addresses in Network Pool in Cloud Director (KB#00094)<p><b>Overview</b></p><p></p><p>This is actually not a big deal when you can check this in cloud director GUI and you would see number of articles to explain this from GUI. But, if there is no option to check the IP address allocation from GUI then it would be far difficult for you if you only work with GUI. My customer reported me that he can't see the assigned or allocated IP addresses and had to ping each and every IP address to check whether its allocated or not. It is actually a headache.</p><p></p><p><b>Issue</b></p><p>Two issues were there<br /><br />1. Checking IP allocation for external network is restricted to System Administrator. My customer was tenant administrator and wanted to check this which is not possible due to product design.<br />2. If you are System Administrator, you might not get any option to extract the list of IP addresses to store with you or use in excel for quick filter and highlight of free IP addresses etc..<br />3. Checked on VMware Cloud Director versin 10.1.2<br /></p><p><b>Solution </b></p><p>Credit goes to powershell here. I could create below script which easily could give you the results. Just copy below output and then paste it into powershell screen from where you can access your cloud director environment.<br /></p><p>#<br /><br />$vcd = Read-Host "Enter vCD url to connect" <br /><br />Connect-CIServer $vcd <br /><br />$network = Read-Host "Enter the name of network here" <br /><br />$ExtNet = Get-ExternalNetwork -Name $network <br /><br />$ExtNet.ExtensionData.Configuration.IpScopes.IpScope.allocatedipaddresses.IpAddress | Out-GridView <br /><br />#</p><p>Below is sample out-</p><p></p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJIWjRS4ca3N0IJHrXVddBH_tYX8uuMZWfilZq3AdQmCfnjB7vQfwyd0ScGeGzs_-Q_HL661HOz501LhMYotWzJO7AqB-710lncm5hPZ4VQw0VPSGZnyVdvx7mHSW0LUxypPdbZQFs53Y/s1029/1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="375" data-original-width="1029" height="234" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJIWjRS4ca3N0IJHrXVddBH_tYX8uuMZWfilZq3AdQmCfnjB7vQfwyd0ScGeGzs_-Q_HL661HOz501LhMYotWzJO7AqB-710lncm5hPZ4VQw0VPSGZnyVdvx7mHSW0LUxypPdbZQFs53Y/w640-h234/1.PNG" width="640" /></a></div><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwh8N9_ZCTj5_I8SpWrRLxxlepy4E8e3lIEKfmQd6lw2KwNFwMeG2GsxLTk0M6i8-WFrRnYQmjb73KXFw71c3NZWYLcS_v11pHoOvQXZ66Hn9tpYLeepUO_Epwx6EW_cf3bpLMy29NK_I/s1032/1.PNG" style="margin-left: 1em; margin-right: 1em;"></a></div><p></p><p>let's verify the sample output from GUI-</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj51LFe8YNq7aGfEVzfaH8TMpZnHC7nHecJxRM3FAaEui46EwbYuMRVTRQrh9Hfn3Z3oxFyQTe5XQ-N3jZmsfqGkvUexMkGDKtzY3c8OZc2jZ95PS7YnGtmJyjDc9TrjmM4hceBDNnWRPA/s1548/2.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="379" data-original-width="1548" height="156" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj51LFe8YNq7aGfEVzfaH8TMpZnHC7nHecJxRM3FAaEui46EwbYuMRVTRQrh9Hfn3Z3oxFyQTe5XQ-N3jZmsfqGkvUexMkGDKtzY3c8OZc2jZ95PS7YnGtmJyjDc9TrjmM4hceBDNnWRPA/w640-h156/2.PNG" width="640" /></a></div><br /><p></p><p>Let me know if you have any thought around it. </p><p>Thank you.<br /></p><p> </p>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com0tag:blogger.com,1999:blog-3224609577145482350.post-21229149437706909172021-02-10T16:55:00.004+05:302021-02-10T16:58:09.109+05:30Check and Modify Security Protocols in VMware Appliances(KB#00093)<h2 style="text-align: left;"><b>Overview</b></h2><p>It is just to centralize the configuration method of security protocols like TLS or SSL in all VMware appliances. VMware did a good job in documenting this process and I am just putting all in one view. I will add the product in the list if I feel that it needs to be here.</p><h2 style="text-align: left;"><b>For vCenter Server -</b></h2><p><i>To check :</i></p><p>1. Connect with vCenter server appliance with SSH with its management IP address<br />2. Run below command#</p><p>#cd /usr/lib/vmware-vSphereTlsReconfigurator/VcTlsReconfigurator/<br />#./reconfigureVC scan</p><p>Below is the sample output : TLS Version is TLSv1.2. It means that TLSv1.2 is enabled and any other version is disabled. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQHK-h4MEt3_WLrBENDzULZ9DxN7MCXzEtQ_G_LYD7WYg_c0aCAjE-C7R2q5SbNOgtTVl7rwjyl_BphZGzLxqYnuIdFes6PBjDJvB-n0fBY6sgQHtZTO9A1z8IR8DR-mvqttVITYOXPEw/s1295/1.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="662" data-original-width="1295" height="328" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQHK-h4MEt3_WLrBENDzULZ9DxN7MCXzEtQ_G_LYD7WYg_c0aCAjE-C7R2q5SbNOgtTVl7rwjyl_BphZGzLxqYnuIdFes6PBjDJvB-n0fBY6sgQHtZTO9A1z8IR8DR-mvqttVITYOXPEw/w640-h328/1.PNG" width="640" /></a></div><br /><p><i>To update in vCenter version 6.5 and 6.7:</i></p><p><a href="https://kb.vmware.com/s/article/2147469">Managing TLS protocol configuration for vSphere 6.5/6.7 (2147469) (vmware.com)</a></p><p>To update in vCenter version 7.x</p><p><a href="https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.security.doc/GUID-145A078D-2F33-4B39-987C-0F2C91BB23CB.html">Enable or Disable TLS Versions on vCenter Server Systems (vmware.com)</a></p><p><b><br /></b></p><h3 style="text-align: left;"><b>For vCD or VMware Cloud Director</b></h3><p></p><p><i>To check :</i></p><p>1. Login vCD or cloud director appliance<br />2. Run below command#</p><p>#cd /opt/vmware/vcloud-director/bin<br />#./cell-management-tool ssl -protocols -l</p><p>Below is the sample output :</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7aEQJu9pyzz84V9C7TSIlpfZboYS-fmh1p1PlJaheHJoSLre00Vke10jEPGwzucX0NzRiQSi9dkiPCcdd7eetzlbHpFXINl3i_CWpn8hAbAUtZDqgkloZKcCAJ2o5H_Jg81mPMtV3Zfw/s1290/2.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="177" data-original-width="1290" height="88" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7aEQJu9pyzz84V9C7TSIlpfZboYS-fmh1p1PlJaheHJoSLre00Vke10jEPGwzucX0NzRiQSi9dkiPCcdd7eetzlbHpFXINl3i_CWpn8hAbAUtZDqgkloZKcCAJ2o5H_Jg81mPMtV3Zfw/w640-h88/2.PNG" width="640" /></a></div><br /><p><i>To update:</i></p><p><b>Note : It need downtime and need to update on each cell individually. So please shutdown the vCD services first before doing this. Follow this article for this </b><a href="https://www.vcnotes.in/2020/10/vcd-upgrade-from-version-95-to-1012-test.html#In-place%20upgrade">vCD | Upgrade from version 9.5 to 10.1.2 ~ My vCloud Notes (vcnotes.in)</a></p><p>#./cell-management-tool ssl-protocols -d SSLv3,SSLv2Hello</p><p>Follow this VMware <a href="https://docs.vmware.com/en/VMware-Cloud-Director/9.7/com.vmware.vcloud.admin.doc/GUID-B63373E4-9470-4923-B93D-692972A7D419.html" target="_blank">article </a>to update </p><p><br /></p><h3 style="text-align: left;">For vRealize Automation </h3><p>To check and update, just follow this <a href="https://docs.vmware.com/en/vRealize-Automation/7.6/com.vmware.vra.install.upgrade.doc/GUID-67B8D027-8074-48BE-8890-2F3BA982A94A.html" target="_blank">article</a></p><h3 style="text-align: left;">For vRealize Log Insight</h3><div>Good <a href="https://kb.vmware.com/s/article/2146305" target="_blank">article </a>by vendor.</div><div><br /></div><h3 style="text-align: left;">For NSX for vSphere (NSX-V)</h3><div>Please see this <a href="https://docs.vmware.com/en/VMware-NSX-Data-Center-for-vSphere/6.4/com.vmware.nsx.admin.doc/GUID-913AC06D-8698-4E47-B9BA-456D0D0BBC87.html" target="_blank">documentation</a>.</div><div><br /></div><h3 style="text-align: left;">For ESXI Host</h3><div>Worth to check this page <a href="https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.security.doc/GUID-BDCE47DD-8AD2-4C98-94FF-7769D0BEE1C2.html" target="_blank">here</a>.</div><div><br /><h3 style="text-align: left;">For vROPS</h3></div><div>Please click <a href="https://kb.vmware.com/s/article/67108" target="_blank">here </a>to check this.</div>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com0tag:blogger.com,1999:blog-3224609577145482350.post-56134486309886364792020-12-27T12:54:00.003+05:302021-02-10T17:00:27.849+05:30Kubernetes | Command Cheat Sheet(KB#00092)<p><b>Overview</b></p><p>Well yes, you are thinking right that I am learning Kubernetes so wanted to share some useful insights and will continue to share stuff on this. Below are some commands for daily operations while working with Kubernetes. I will keep on adding stuff here.
<p> </p>
<style>
table {width:100%}
table,th,td {border: 1px solid black;}
th,td{text-align:center;}
</style><table>
<tbody><tr>
<th> Command to </th>
<th> Command </th>
</tr>
<tr>
<td>Check Minikube version</td>
<td>$minikube version</td>
</tr>
<tr>
<td>Start Minikube cluster</td>
<td>$minikube start</td>
</tr>
<tr>
<td>Check if Kubectl is installed</td>
<td>$kubectl version</td>
</tr>
<tr>
<td>Check kubectl cluster info</td>
<td>$kubectl cluster-info</td>
</tr>
<tr>
<td>Check kubectl node info</td>
<td>$kubectl get node</td>
</tr>
</table>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com0tag:blogger.com,1999:blog-3224609577145482350.post-45821070008869950342020-12-23T12:22:00.008+05:302021-02-02T13:16:54.108+05:30PS | How to get HA restarted VM's Org and OrgvDC info with VM Name<p><b>Overview</b></p><p>You will see many blogs giving solution for fetching the VM names which are restarted by HA in event of esxi host failures using Get-VIEvent powercli command. But the extracted VM Name too is not in well format to use as it is. You have to use excel and text to column and then extract the VM Name etc. For me, I have vCD also so at the time of ESXi host failures and HA events, I not only need to fetch the VM Name but also Org and OrgvDC info to share it with my customer. It becomes more lengthy for me and I need to make it quick. So it is extended solution for such kind of scenario. Hope you will find it useful.</p><p>Let's see how I could do it using powershell.</p><p><b>Script<br /><br />#Start here</b></p><p>Write-Host "This script will help you out to have VM name restarted by HA due to esxi host failuers" -ForegroundColor Yellow</p><p>Function Get-HAVM{<br />$Date=Get-Date<br />$HAVMrestartold=1<br />$raw = Get-VIEvent -maxsamples 10000000 -Start ($Date).AddDays(-$HAVMrestartold) -type warning | Where {$_.FullFormattedMessage -match "restarted"} |select CreatedTime,FullFormattedMessage |sort CreatedTime -Descending<br />$raw.vm.name<br />Remove-Item -Path C:\Temp\vmlist.csv <br />$raw.vm.name | Out-File C:\Temp\vmlist.csv<br />}<br />Get-HAVM<br />$allvms = Get-Content -Path C:\Temp\vmlist.csv<br />$vms = Get-VM -Name $allvms<br />$myView = @()<br />foreach ($vm in $vms){ <br />$Report = [PSCustomObject] @{<br /> VM_Name = $vm.Name<br /> Org_Name = $vm.Folder.Parent.Parent.Name<br /> OrgvDC_Name = $vm.Folder.Parent.Name<br />}<br />$MyView += $Report<br />}<br />$myView | Out-GridView<br /><br /><b>#End here</b></p><p>Any doubt? Comment box is yours :)</p><p><b>Let's give it more power</b></p><p>If you have smtp configured in your environment then simply you can mail it from the same script using Send-MailMessage command but for that you might have to do some tweak in above script. </p><p>Hint is, You have to save final report. Change in the last line of above script like</p><p>$myView | Out-File C:\Temp\vmsrestartedbyHA.csv</p><p>then use below command</p><p>Send-MailMessage -From 'gautam.johar@vcnotes.in' -To 'my.reader@home.com', 'myreader2@home.com' -Subject 'HA Event is triggered and VM list is attached' -Body "Please find the attachment" -Attachments C:\Temp\vmsrestartedbyHA.csv -Priority High -DeliveryNotificationOption OnSuccess, OnFailure -SmtpServer 'smtp.vcnotes.in'</p><p>Change wherever applicable.</p><p>If you are good enough in PowerShell then you can have many ways to enhance the ideas. For me this is basic script which is working fine for me.</p><p><b>Side Note</b></p><p>I created this script to run perfectly in PowerShell ISE so run in that please or if you have any error in running it in simple powershell cli terminal then you might need to fix the visible errors.</p><p>Good Luck!</p><p><b><br /></b></p><p><b><br /></b></p><p><b><br /></b></p><p><b><br /></b></p><p><b><br /></b></p><p><b><br /></b></p><p></p><p><br /></p><p><br /></p>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com0tag:blogger.com,1999:blog-3224609577145482350.post-77704966135956458322020-12-21T18:30:00.001+05:302020-12-21T19:20:44.231+05:30vRA | How to manually assign the unassigned shards<p><b> Overview</b></p><p>In one of the vRA upgrade from 7.4 to 7.6, I faced this issue post upgrade. All went well except below error on VAMI page of both vRA appliances (as I had two nodes). If you have more and if you stuck with this error then you will see this error on all the nodes. </p><p>================</p><p><i>Elasticsearch validation failed:</i></p><p>status: red<br />number_of_nodes: 2<br />unassigned_shards: 4<br />number_of_pending_tasks: 0<br />number_of_in_flight_fetch: 0<br />timed_out: False<br />active_primary_shards: 113<br />cluster_name: horizon<br />relocating_shards: 0<br />active_shards: 226<br />initializing_shards: 0<br />number_of_data_nodes: 2<br />delayed_unassigned_shards: 0</p><div>=================</div><p>If you read above error then you will understand that there are 4 unassigned shards which were not automatically assigned to any of the available vra node. </p><p><b>Cause</b> </p><p>It happens if and when DB sync between primary and slave vra nodes are not good. When primary node was not having updated data but slave nodes were running with some additional data. Total break between Master and Replica DB replication. In my case also before upgrading there were many issues with DB.</p><p>If you recover the cluster state even then these shards might not assign automatically and give above alert. Now you have to assign the unassigned shards manually. Let's see the process.</p><p><b>Resolution</b></p><p>1. Check the state from Master node CLI with below command</p><p>#curl http://localhost:9200/_cluster/health?pretty=true</p><p>You will have this error in output</p><p>{<br /> "cluster_name" : "horizon",<br /> "status" : "red",<br /> "timed_out" : false,<br /> "number_of_nodes" : 2,<br /> "number_of_data_nodes" : 2,<br /> "active_primary_shards" : 113,<br /> "active_shards" : 226,<br /> "relocating_shards" : 0,<br /> "initializing_shards" : 0,<br /> "unassigned_shards" : 4,<br /> "delayed_unassigned_shards" : 0,<br /> "number_of_pending_tasks" : 0,<br /> "number_of_in_flight_fetch" : 0<br /> }</p><p>2. Check the cluster information with below command</p><p>#curl -s -XGET http://localhost:9200/_cat/nodes</p><p>You will have similar output</p><p>master.mylab.local 172.25.3.199 8 d * Dreadknight<br /> replica.mylab.local 172.25.3.200 8 d m Masque</p><p>3. Search for unassigned shards</p><p>#curl -XGET 'http://localhost:9200/_cat/shards' | grep UNAS</p><p>You will see similar output as below</p><p> % Total % Received % Xferd Average Speed Time Time Time Current<br /> Dload Upload Total Spent Left Speed<br /> 100 15870 100 15870 0 0 484k 0 --:--:-- --:--:-- --:--:-- 484k<br /> v3_2020-10-02 4 p UNASSIGNED<br /> v3_2020-10-02 4 r UNASSIGNED<br /> v3_2020-10-02 2 p UNASSIGNED<br /> v3_2020-10-02 2 r UNASSIGNED</p><p>4. Re-assigned these using the following command, where index =
v3_2020-10-02, and shards to be re-assigned are '2' and '4', while
running on the master node - 'Dreadknight. Change your command according to your environment. for example, value after index will be changed, value after shard, after node will be changed. Other infos will be same.</p><p><br /> curl -XPOST 'localhost:9200/_cluster/reroute' -d
'{"commands":[{"allocate":{"index":"v3_2020-10-02","shard":2,"node":"Dreadknight","allow_primary":"true"}}]}'</p><p>and</p><p>curl -XPOST 'localhost:9200/_cluster/reroute' -d
'{"commands":[{"allocate":{"index":"v3_2020-10-02","shard":4,"node":"Dreadknight","allow_primary":"true"}}]}'</p><p>That's it. Now shards have been assigned or allocated automatically manually.</p><p>Log out all the nodes VAMI and log in back. You will not see any such error.</p><p><br /></p>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com2tag:blogger.com,1999:blog-3224609577145482350.post-41382556419308298762020-12-14T19:20:00.022+05:302021-10-15T16:42:26.912+05:30Miscellaneous NotesThis is dynamic post and I will keep on adding points in here. I generally add small but useful things here which is not worthy to create long post.
<p> </p>
<style>
table {width:100%}
table,th,td {border: 1px solid black;}
th,td{text-align:center;}
</style><br />
<table>
<tbody><tr>
<th> How to</th>
<th> Explanation</th>
</tr>
<tr>
<td> transfer the tech-support bundle to FTP on Arista Router</td>
<td>copy flash:/EOS-4.18.2F.swi ftp:/user:password@192.168.10.15/EOS-4.18.2F.swi<br />
user = username of ftp server account<br /> password = password of ftp server account<br /> 192.168.10.15 = IP address of ftp server<br />EOS-4.18.2F.swi = tech-support bundle file name </td>
</tr>
<tr>
<td>Encrypt a PowerShell script</td>
<td>https://drive.google.com/open?id=19Bvik1FcSTC57eJ0CZPE4D-8hnQfyCi-</td>
</tr>
<tr>
<td>Reboot Windows with PowerShell command</td>
<td>powershell.exe -encodedCommand cwBoAHUAdABkAG8AdwBuACAALQByACAALwB0ACAAMAAxACAA</td>
</tr>
<tr>
<td>To create a digital clock</td>
<td>Download and run these PS script to create the clock on your PC.<br />
<a href="https://drive.google.com/open?id=1brxNydXejSaG3eOnWsbzrFgkUJk5dISE" target="_blank">EST Clock</a> |
<a href="https://drive.google.com/open?id=1yoIsUzCoQauOdNSUX53UqRxea9qI6SIL" target="_blank">CST Clock</a> |
<a href="https://drive.google.com/open?id=1PyRozTf19uVqoDft5BiB3tS31amVfu7P" target="_blank">IST Clock</a> </td>
</tr><tr>
<td>Do few things in Linux</td>
<td>1. Check Kernal Version in Linux - Rpm -qa | grep -I kernel<br />2. Change IP on an interface - ifconfig eth1 192.168.2.2 netmask 255.255.255.0<br />3. To set or change DG of any VM - route add default gw 192.168.2.1<br />4. File location to change the IP - vi /etc/sysconfig/network-scripts/ifcfg-eth0<br />5. To Search specific text in linux server - <br>grep -rnw '/path/to/somewhere/' -e 'pattern'</td>
</tr><tr>
<td>How to ping with the MTU value</td>
<td>ping www.yahoo.com -f -l 1492 </td>
</tr>
<tr>
<td> Add Network Components in vRNI</td>
<td> <a href="https://docs.vmware.com/en/VMware-vRealize-Network-Insight-Cloud/services/com.vmware.vrni.using.doc/GUID-AB342101-8A47-4F24-9EC3-4273E1E4EAFB.html%20" target="_blank">Check this article</a></td>
</tr>
<tr>
<td> How to encode and decode Base64 script</td>
<td><a href="https://community.idera.com/database-tools/powershell/powertips/b/tips/posts/encode-and-decode-text-as-base64" target="_blank">Check this here</a> </td>
</tr>
<tr>
<td>Ping an entire subnet in Windows</td>
<td><a href="https://www.vcnotes.in/2020/05/ps-ping-entire-subnet.html" target="_blank">I have documented it here</a></td>
</tr>
<tr>
<td>Some Useful ESXi Commands</td>
<td>Check speed and other info of HBA card - esxcli storage san fc list </td>
</tr>
<tr>
<td>vCloud API Guide for NSX</td>
<td><a href="https://vdc-download.vmware.com/vmwb-repository/dcr-public/5b09a756-302e-4cbc-98b8-3fbab0ef7e76/9ef1cf00-331a-4af5-98a6-2f5636797920/vcloud_nsx_api_guide_31_0.pdf" target="_blank">Here is the vendor page for pdf</a></td>
</tr><tr>
<td>To create static routes in multiple esxi hosts</td>
<td>$esx = Get-VMHost -Name esxihost_Name<br />
$esxcli = Get-EsxCli -VMHost $esx -V2<br />
$parms = @{<br />
network = '192.168.102.0/24'<br />
gateway = '192.168.3.1'<br />
}<br />
$esxcli.network.ip.route.ipv4.add.Invoke($parms)<br />
$esxcli.network.ip.route.ipv4.list.Invoke()<br />
</td>
</tr><tr>
<td>Send mail to any mail account using PS</td>
<td>Download the powershell script from Google Drive. Click <a href="https://drive.google.com/file/d/1_UgQ5nQvSjDHTxURH8LXPVrDCozOd_p0/view?usp=sharing" target="_blank">here</a></td>
</tr><tr>
<td>How to delete any iso file in all datastores which is older than 15 days</td>
<td>foreach($ds in Get-datastore){<br />
New-PSDrive -Name GJ -PSProvider VimDatastore -Root '/' -Datastore $ds > $null<br />
Get-Childitem -Path GJ:\ -Recurse -Include *.iso | Remove-Item -Confirm:$true | Where ((Get-date).AddDays(-15))<br />
#This will search each and every folder in your datastore and show you the file to delete it.<br />
Remove-PSDrive -Name GJ -Confirm:$false} <br />Replace false to true in command (Remove-Item -Confirm:$false to Remove-Item -Confirm:$true)if you want to check and delete each file one by one <br /></td>
<tr>
<td>How to edit Login Banner in Vmware Cloud Director Appliance</td>
<td>1. Create or edit a file in /etc/login.warn and put your message in here.<br>2. Edit /etc/sshd/sshd_config file and change the line from #Banner none to #Banner /etc/login.warn</td>
</tr>
<tr>
<td>How to search largest files in Linux</td>
<td>sudo du -a /dir/ | sort -n -r | head -n 20 <br> This command will search top 20 largest files in any directory</td>
</tr>
<td>How to search particular word or string in file in Linux</td>
<td>tr ‘[:space]’ ‘[/n*] < /var/log/apache2/access.log | grep -I -c 172.18.101.16 <br> 172.18.101.16 is to search in access.log file</td>
</tr>
</tr></tbody></table>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com0tag:blogger.com,1999:blog-3224609577145482350.post-5329875948551669722020-12-14T19:15:00.005+05:302020-12-16T11:34:46.728+05:30PS | To extract DRS rules with VM names<p><span style="background-color: white; font-family: "Libre Baskerville";">Hi Guys,</span></p><p><span style="background-color: white; font-family: "Libre Baskerville";">This is not a big thing but still I wanted to document it for my own reference. I got a request like which VMs are in which DRS rules so I got below script.</span></p><p><span style="background-color: white; font-family: "Libre Baskerville";">#Start here</span></p><p><span style="background-color: white; font-family: "Libre Baskerville";">$VC = Read-host "Enter the FQDN\IP of vCenter Server"</span></p><p><span style="background-color: white; font-family: "Libre Baskerville";">Connect-VIServer </span><span style="background: none 0% 0% repeat scroll yellow; font-family: "Libre Baskerville";">$VC</span><br style="background-color: white; font-family: "Libre Baskerville";" /><span style="background-color: white; font-family: "Libre Baskerville";">$DRSRules = Get-Cluster | Get-DrsRule</span><br style="background-color: white; font-family: "Libre Baskerville";" /><span style="background-color: white; font-family: "Libre Baskerville";">$Results = ForEach ($DRSRule in $DRSRules)</span><br style="background-color: white; font-family: "Libre Baskerville";" /><span style="background-color: white; font-family: "Libre Baskerville";"> {</span><br style="background-color: white; font-family: "Libre Baskerville";" /><span style="background-color: white; font-family: "Libre Baskerville";"> "" | Select-Object -Property @{N="Cluster";E={(Get-View- Id $DRSRule.Cluster.Id).Name}},</span><br style="background-color: white; font-family: "Libre Baskerville";" /><span style="background-color: white; font-family: "Libre Baskerville";"> @{N="Name";E={$DRSRule.Name}},</span><br style="background-color: white; font-family: "Libre Baskerville";" /><span style="background-color: white; font-family: "Libre Baskerville";"> @{N="Enabled";E={$DRSRule.Enabled}},</span><br style="background-color: white; font-family: "Libre Baskerville";" /><span style="background-color: white; font-family: "Libre Baskerville";"> @{N="DRS Type";E={$DRSRule.KeepTogether}},</span><br style="background-color: white; font-family: "Libre Baskerville";" /><span style="background-color: white; font-family: "Libre Baskerville";"> @{N="VMs";E={$VMIds=$DRSRule.VMIds -split ","</span><br style="background-color: white; font-family: "Libre Baskerville";" /><span style="background-color: white; font-family: "Libre Baskerville";"> $VMs = ForEach ($VMId in $VMIds)</span><br style="background-color: white; font-family: "Libre Baskerville";" /><span style="background-color: white; font-family: "Libre Baskerville";"> {</span><br style="background-color: white; font-family: "Libre Baskerville";" /><span style="background-color: white; font-family: "Libre Baskerville";"> (Get-View -Id $VMId).Name</span><br style="background-color: white; font-family: "Libre Baskerville";" /><span style="background-color: white; font-family: "Libre Baskerville";"> }</span><br style="background-color: white; font-family: "Libre Baskerville";" /><span style="background-color: white; font-family: "Libre Baskerville";"> $VMs -join ","}}</span><br style="background-color: white; font-family: "Libre Baskerville";" /><span style="background-color: white; font-family: "Libre Baskerville";"> }</span><br style="background-color: white; font-family: "Libre Baskerville";" /><span style="background-color: white; font-family: "Libre Baskerville";">$Results | out-gridview</span></p><p><span style="background-color: white; font-family: "Libre Baskerville";">#End here</span></p><p><span style="background-color: white; font-family: "Libre Baskerville";">Another window will open and copy entire output into excel if you want.</span></p><p><span style="background-color: white; font-family: "Libre Baskerville";">Cheers!</span></p><p><br /></p>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com0tag:blogger.com,1999:blog-3224609577145482350.post-7694051470541025662020-11-17T10:27:00.002+05:302020-11-17T10:31:09.810+05:30vCD | How to disable auto-discovery for particular OrgvDC <p><a href="#overview">Overview</a><br />
<a href="#How to connect">How to connect</a><br />
<a href="#How to check existing setting">How to check existing setting</a><br />
<a href="#How to update existing setting">How to update existing setting</a></p>
<div id="overview"><h2>Overview</h2></div><div id="overview">I am creating a post on the subject because there is no clear cut article on this on web or might be I couldn't find straightforward process to do this. Basically, in vCD GUI there is option to disable or enable the auto-discovery for entire vCD system. On org level you cannot disable or enable auto-discovery but you can override this setting on OrgvDC level but with the help of Admin APIs. Hope you know about APIs but what is Admin APIs. This will automatically be answered in this post. Read this post carefully and I hope you will understand this. To know more about auto-discovery, you can check out <a href="https://fojta.wordpress.com/2017/02/23/vcloud-director-8-20-vm-auto-import/" target="_blank">this post</a> by Tom Fojta.
</div>
<div id="How to connect"><h2>How to connect</h2></div><div id="How to connect">You cannot even check the auto-discovery status for OrgvDC from GUI. You need to use the API. I have already covered this in my previous posts to connect vCD in API tool. Have a look <a href="https://www.vcnotes.in/2020/10/vcd-how-to-select-esp-as-protocol-in.html#How%20to%20connect" target="_blank">here</a></div>
<div id="How to check existing setting"><h2>How to check existing setting</h2></div><div id="How to check existing setting">Once you are connected then Use below api query to extract your Org detail<br /><br /><i>
1. GET https://vcloud_ip_or_fqdn/api/org </i></div><div id="How to check existing setting"><i><br /></i></div><div id="How to check existing setting">Now, copy entire output and paste into notepad++ or any other text editor you want. Search for Org name where your orgvDC was created. Search in the notepad++ file only. You will get href link from there. Copy that link and paste it in API tool and send GET command. Example is shown below</div><div id="How to check existing setting"><br /></div><div id="How to check existing setting"><i>2. GET https://vcloud_ip_or_fqdn/api/org/a038859f-bf22-4d64-b6dc-e1cb8fdf2fbc"</i></div><div id="How to check existing setting"><br /></div><div id="How to check existing setting">Now, you will get OrgvDCs list in this org. Copy entire output again and paste it into notepad++ again. Search target OrgvDC name and copy the href for that OrgvDC. Below is the example-</div><div id="How to check existing setting"><br /></div><div id="How to check existing setting"><i>https://vcloud_ip_or_fqdn/api/vdc/a038859f-bf22-4d64-b6dc-e1cb8fdf2fbc"</i></div><div id="How to check existing setting"><i><br /></i></div><div id="How to check existing setting">In order to check the value you need to modify the above href value little bit. Check below</div><div id="How to check existing setting"><br /></div><div id="How to check existing setting"><i>https://vcloud_ip_or_fqdn/api/admin/vdc/a038859f-bf22-4d64-b6dc-e1cb8fdf2fbc"</i></div><div id="How to check existing setting"><i><br /></i></div><div id="How to check existing setting">Hope you could notice the difference in above lines. Now create and send GET command as below</div><div id="How to check existing setting"><br /></div><div id="How to check existing setting"><i>3. GET</i> <i>https://vcloud_ip_or_fqdn/api/admin/vdc/a038859f-bf22-4d64-b6dc-e1cb8fdf2fbc"</i></div><div id="How to check existing setting"><i><br /></i></div><div id="How to check existing setting">Note that if you run the GET command with adding "admin" then only you will get the auto-discovery option in output. Below is the example command and output with "admin" keyword-</div><div id="How to check existing setting"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEienBzvSbQfHbl6vWOZEpTl4eBg7YuB6JhArIfabiWKEGeF8W9ciXWylHJjjpELWycArIbIB8Iep-vOZXn__rbEmRTW_rc2sUwXCO9KavnpFSykSa83ar8knVKeXZ_EA5orqS1DA1-eKh8/s1268/2.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="98" data-original-width="1268" height="50" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEienBzvSbQfHbl6vWOZEpTl4eBg7YuB6JhArIfabiWKEGeF8W9ciXWylHJjjpELWycArIbIB8Iep-vOZXn__rbEmRTW_rc2sUwXCO9KavnpFSykSa83ar8knVKeXZ_EA5orqS1DA1-eKh8/w640-h50/2.PNG" width="640" /></a></div><br /><div id="How to check existing setting"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiRQ9WU1_UlRxMnGEz2IyrX7qj2_kKDXDb65lmLNrmZMJlZx2MRagQ8XP9neC3h2lNHW1jelNMcmGsdZj8Eib5uWqoxOJ_x49ILe_dOTuhdqAcEb1lfjVMfznOhYdhKLKdGizhye9oFPk/s906/1.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="246" data-original-width="906" height="174" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiRQ9WU1_UlRxMnGEz2IyrX7qj2_kKDXDb65lmLNrmZMJlZx2MRagQ8XP9neC3h2lNHW1jelNMcmGsdZj8Eib5uWqoxOJ_x49ILe_dOTuhdqAcEb1lfjVMfznOhYdhKLKdGizhye9oFPk/w640-h174/1.PNG" width="640" /></a></div><br /><div id="How to check existing setting">Note that, if any OrgvDC output is not having this line that's mean it is following the vDC global level setting and to override this value by adding this line here. I will explain how.</div><div id="How to check existing setting"><br /></div><div id="How to check existing setting">Flase means VM auto-discovery is disabled and true means it is enabled. I explained you the process to get the value to Vm Auto Discovery status for OrgvDC. Now let's how to change this value.</div><div id="How to check existing setting"><br /></div><div id="How to check existing setting"><i><br /></i></div>
<div id="How to update existing setting"><h2>How to update existing setting</h2></div><div id="How to update existing setting"> To update this value from false to true or true to false or even enter the whole line here, you need to follow below steps</div><div id="How to update existing setting"><br /></div><div id="How to update existing setting">1. From above steps 3, you got orgvDC href value where you send GET query to get the auto vm discovery states, now you replace GET command with PUT command<br /><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVUdRnwTEuda1hamJjFntMddqNAuOsBg9Fo0W4AEmhDG3Z0c4QS0P0rZAkQ9qEniKobKbprNFFvXf1eWolKGw5h9P6BDq09_jI8fyWlAZivvO9P6AtNoSfJhNq9MVoZLbkrtwwsv2JPsM/s1266/4.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="77" data-original-width="1266" height="38" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVUdRnwTEuda1hamJjFntMddqNAuOsBg9Fo0W4AEmhDG3Z0c4QS0P0rZAkQ9qEniKobKbprNFFvXf1eWolKGw5h9P6BDq09_jI8fyWlAZivvO9P6AtNoSfJhNq9MVoZLbkrtwwsv2JPsM/w640-h38/4.PNG" width="640" /></a></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">2. Now, in the output for OrgvDC which you copied into notepad++, If vmDiscoveryEnabled is false and you want to make it true then change the keyword from false to true and vice-versa. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">3. Copy entire output again after changing the value and paste it in the BODY, select RAW and select xml as shown in my previous <a href="https://www.vcnotes.in/2020/10/vcd-how-to-select-esp-as-protocol-in.html#API%20Query2" target="_blank">post</a>.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">4. You will not click on send button now, you need to add one more header here along with other placed headers. Header info is given <a href="https://code.vmware.com/apis/553/vmware-cloud-director/doc/doc/operations/PUT-Vdc.html" target="_blank">here</a> and practical use below. For this reason only, I had to create an entire post. This is not clearly mentioned on any article on web so now you have one.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq5K5qVrEnGqesWGZSO3JiF1hdtpO1ngIWTMsYlW_6booL81p0bCHslAbL8_Ji0IE7gO4UOnxzjfYGdp2vQ-CHwFRuypwOtfliigf6dtq5fWVEnLoBCk1PDVawRbNO2MmMf_aVL9Rs-sc/s1235/5.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="328" data-original-width="1235" height="170" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq5K5qVrEnGqesWGZSO3JiF1hdtpO1ngIWTMsYlW_6booL81p0bCHslAbL8_Ji0IE7gO4UOnxzjfYGdp2vQ-CHwFRuypwOtfliigf6dtq5fWVEnLoBCk1PDVawRbNO2MmMf_aVL9Rs-sc/w640-h170/5.PNG" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: left;">In case, you want to use JSON then you can use that too but make sure then JSON must be selected in body where you pasted the data from notepad++.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Once you put the content-type then make sure you have entered the right vDC href and selected operations in PUT and not GET. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Now hit the send button.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">You will get message "202 Accepted" if all went good.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><br /></div><br /><div id="How to update existing setting"><br /></div>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com1tag:blogger.com,1999:blog-3224609577145482350.post-74402001494246027752020-10-31T21:11:00.001+05:302020-10-31T21:12:28.374+05:30vCD | How to select ESP as Protocol in firewall rule of ESG<p><a href="#overview">Overview</a><br /><a href="#How to connect">How to connect</a><br /><a href="#API Query1">How to extract edge firewall rules config</a><br /><a href="#API Query2">How to update edge firewall rules config</a></p>
<div id="overview"><h2>Overview</h2></div><div id="overview">This post is to share the process to change the existing available protocols in NSX-v Edge firewall rule (Not DFW). Available protocols are TCP, UDP, ICMP and Any on vCD's Edge Service Gateway page. See below image. <div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0SKYeAEjYJNsbhZMeXWq_8mzw2aUP45dzlKIxH8QPH9_aKJgdua5gyxEXKaB1qjC-u7oZXG0sGZR0cr9NVTIrYyaBd7lciFdrIE84A_KDs-9SGZDlvyAiFqd8zjagOo7PrC0f2w1NTSQ/s1150/1.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="390" data-original-width="1150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0SKYeAEjYJNsbhZMeXWq_8mzw2aUP45dzlKIxH8QPH9_aKJgdua5gyxEXKaB1qjC-u7oZXG0sGZR0cr9NVTIrYyaBd7lciFdrIE84A_KDs-9SGZDlvyAiFqd8zjagOo7PrC0f2w1NTSQ/s600/1.png" width="600" /></a></div>My customer's demand was to set another protocol here which is <a href="https://blog.finjan.com/encapsulating-security-protocol/#:~:text=Encapsulating%20Security%20Payload%20%28ESP%29%20protocol,decrypting%20the%20data%20they%20exchange." target="_blank">ESP</a>. I checked on GUI and it was clear that it is not possible from here so I could change it successfully from API queries.<br /></div>
<div id="overview"><h2>How to connect</h2></div><div id="How to connect">Before updating this firewall rule field, we must know that how to connect vCloud Director in any API tool. You can use Postman, Insomnia, ARC (Advance Rest Client) as a tool to connect vCD. You might need to disable SSL check before executing any api call. Below snippet is from Postman API tool.<br /><div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1K9s4PDSeVgDzztxYDhMLIS_zckteRf1d8PahyphenhyphenBFIOuDt5GDgieyeQaJwKSC27bwaxxsuEh1FlD_HB7-CupG3xRUTfRvymNIgh8QQG3X9phwiIKgImHOEoUMyu4PrBbUroapweCnub-g/s1283/2.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="660" data-original-width="1283" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1K9s4PDSeVgDzztxYDhMLIS_zckteRf1d8PahyphenhyphenBFIOuDt5GDgieyeQaJwKSC27bwaxxsuEh1FlD_HB7-CupG3xRUTfRvymNIgh8QQG3X9phwiIKgImHOEoUMyu4PrBbUroapweCnub-g/s600/2.PNG" width="600" /></a></div><br />Once that SSL check is disabled then<br />1. Set Authorization as Basic Auth. See below image<br /><div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbq8nXGntwmD-Jucm-Wu4P0o57mehkufB2Po7AdOOXY4WC4ShDGR0lJqucwx1BHNFjmu2pGgS0ghjbOKfMZsWt2Kih_5dvLv7wHRGTTJcBjzFb-rjl9U7rxaUZfay-Tn8HryHPwDVNqQE/s1306/3.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="429" data-original-width="1306" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbq8nXGntwmD-Jucm-Wu4P0o57mehkufB2Po7AdOOXY4WC4ShDGR0lJqucwx1BHNFjmu2pGgS0ghjbOKfMZsWt2Kih_5dvLv7wHRGTTJcBjzFb-rjl9U7rxaUZfay-Tn8HryHPwDVNqQE/s600/3.PNG" width="600" /></a></div><br />2. Set header as mentioned below<br />Accept application/*;version=32.0<br /><br />Version can be according to your vCD version. </div><div id="How to connect"><br />3. Now create api query like https://vcloud_ip_or_fqdn/api/sessions and select POST in query type. It will be like <br />POST https://vcloud_ip_or_fqdn/api/sessions<br />This query is to get authorization and access token. Once you entered the URL and selected query type as POST then hit "Send" button to run this query.<br />Post run you will get "200 OK" and authorization and access token headers. See below images<br /><div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhafi2S8CFlCM-yZkgHCB7en7xOogLwHvoFEjKZM0LTvIlFXUUv3LVVxPK8yV2OpjQTrFwwyCzkzvQh-En1xrgbqQMvrYQb_xq3rzoDFcfhZuFm3ctX3TBo8DdcmjULKSqs9D4mnD1kICg/s1336/4.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="649" data-original-width="1336" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhafi2S8CFlCM-yZkgHCB7en7xOogLwHvoFEjKZM0LTvIlFXUUv3LVVxPK8yV2OpjQTrFwwyCzkzvQh-En1xrgbqQMvrYQb_xq3rzoDFcfhZuFm3ctX3TBo8DdcmjULKSqs9D4mnD1kICg/s600/4.PNG" width="600" /></a></div><br /><div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiLSQR4-aiT5AIGqUxG_NSn4PN3-ULQBcvLkXynHy9kx6CV-jfS382YqOaa3Bg3sQ3eVzywFFMudUwFWfx8b1jENxMPGbLuJIxhcoIO65Cu_ookx0fDssSIoX8Szyep-nHbaEesWDHAL8/s1366/5.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="343" data-original-width="1366" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiLSQR4-aiT5AIGqUxG_NSn4PN3-ULQBcvLkXynHy9kx6CV-jfS382YqOaa3Bg3sQ3eVzywFFMudUwFWfx8b1jENxMPGbLuJIxhcoIO65Cu_ookx0fDssSIoX8Szyep-nHbaEesWDHAL8/s600/5.PNG" width="600" /></a></div><br />Use above two headers as shown in below images<br /><div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGxCI94EnMOEpi_Nccd3Wqx5dncdTLg14DyHaFvcDKhnjze26MRy0LM0_Q_sNi2Kc1kgIz8Q1WNAYeVbVOOueY2WV86OeeE5lsCKtPW95tieXIutHMzyTHYeNCDnkhftJQKppFh4-dNXo/s1293/6.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="554" data-original-width="1293" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGxCI94EnMOEpi_Nccd3Wqx5dncdTLg14DyHaFvcDKhnjze26MRy0LM0_Q_sNi2Kc1kgIz8Q1WNAYeVbVOOueY2WV86OeeE5lsCKtPW95tieXIutHMzyTHYeNCDnkhftJQKppFh4-dNXo/s600/6.PNG" width="600" /></a></div><br />Now, you are ready to do any operations in vCD using this API tool</div>
<div id="API Query1"><h2>How to extract edge firewall rules config</h2></div><div id="How to extract edge firewall rules config">
<br />Use below api query to extract your Org detail<br /><br /><i><b>1. </b>GET https://vcloud_ip_or_fqdn/api/org</i><br /><br />Copy the output and paste in Notepad++. Search for target OrgvDC name where your edge is residing. Then create another query and run it<br /><br /><i><b>2.</b> GET https://vcloud_ip_or_fqdn/api/vdc/a038859f-bf22-4d64-b6dc-e1cb8fdf2fbc"<br /></i><br />You will see similar output in your Notepad++ data. Just copy vdc href from notepad++ file not from here and paste in Postman and then hit send<br /><br />Here, you will have another output from OrgvDC. Search here the edge name. You will get line like below. Copy that line similar below and run another query <br /><i>https://iaas-sin.aticloud.aero/network/vdc/a038859f-bf22-4d64-b6dc-e1cb8fdf2fbc/edges<br /></i>Now, create a API call like<br /><br /><i><b>3.</b> GET https://vcloud_ip_or_fqdn/network/vdc/a038859f-bf22-4d64-b6dc-e1cb8fdf2fbc/edges</i><br /><br />It will give you output like below. Only single line.<br /><br />https://vcloud_ip_or_fqdn/network/edges/1343b683-bdca-4b80-9e19-8d668f98d8bc<br /><br />Now, again create a query to fetch edge firewall services. It will be like <br /><br /><i><b>4. </b>GET https://vcloud_ip_or_fqdn/network/edges/1343b683-bdca-4b80-9e19-8d668f98d8bc/firewall/config. </i></div><div id="How to extract edge firewall rules config"><br />It will give you all configuration of this edge. </div>
<div id="API Query2"><h2>How to update edge firewall rules config</h2></div><div id="API Query2">It is a simple process. Copy the output of point 4 in text editor like notepad++ and search for entries like below-</div><div id="API Query2"><div id="API Query2"><application></div><div id="API Query2"> <service></div><div id="API Query2"> <protocol>tcp</protocol></div><div id="API Query2"> <port>any</port></div><div id="API Query2"> <sourcePort>any</sourcePort></div><div><br />Here in protocol we need to replace it from tcp to esp. In notepad++ itself change the field to esp. It will be like below</div><div><div><application></div><div> <service></div><div> <protocol>esp</protocol></div><div> <port>any</port></div><div> <sourcePort>any</sourcePort></div></div><div>Now, copy entire output from notepad++. Full output not these 5 lines. and paste in postman. where? See below-<br /><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbqo1sPjAcVe4eFgWYyFIxFDKU4IwL_3gQmbTFjIgoZLY-sxBkYgTknHIr2lragjUm0Zp19fOsZFDptYkuv8hsUENx7bkh2bMUAhg-QGSzdE7SvUa16yBRl6YGk-gWZ5kToJpjLwF1wHE/s1251/1.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="405" data-original-width="1251" height="208" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbqo1sPjAcVe4eFgWYyFIxFDKU4IwL_3gQmbTFjIgoZLY-sxBkYgTknHIr2lragjUm0Zp19fOsZFDptYkuv8hsUENx7bkh2bMUAhg-QGSzdE7SvUa16yBRl6YGk-gWZ5kToJpjLwF1wHE/w640-h208/1.PNG" width="640" /></a></div><br />Once done, create below query<br /><div><br /></div><div><i>PUT https://vcloud_ip_or_fqdn/network/edges/1343b683-bdca-4b80-9e19-8d668f98d8bc/firewall/config</i></div><div><i><br /></i></div><div>and hit send button. That's it. To cross check it either you can check in GUI or again follow "How to extract edge firewall rules config"</div></div>
Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com1tag:blogger.com,1999:blog-3224609577145482350.post-36426969852016111382020-10-22T22:05:00.309+05:302021-02-10T19:03:50.108+05:30vCD | Upgrade from version 9.5 to 10.1.2<p> </p>
<nav>
<a href="#overview">Overview</a><br />
<a href="#Planning">Planning</a><br />
<a href="#In-place upgrade">In-place upgrade from vCD versin 9.5 to version 9.7</a><br />
<a href="#Best Practices">Best Practices for migration</a><br />
<a href="#migration">Migrate from vcd version 9.7(linux hosted) to vCD 9.7 appliance</a><br />
<a href="#Known Issues">Known Errors during above deployment and migration</a><br />
<a href="#upgrade to 10.1.2">Upgrade from version 9.7 appliance to Cloud Director 10.1 appliance</a><br />
<a href="#VMware References">Vendor Articles and References</a><br />
</nav>
<section>
<div id="overview"><h2>Overview</h2></div><div id="overview">It is three step process from version 9.5 to version 10.1.2. I would suggest to complete pre-requisites properly and it will be flawless process. You should check inter-operability first so that your other components can function with vCD versions you will be upgrading to. My experience says that during migration, first deploy the primary node → Transfer the DB → Replace custom certificates with self-signed certificates → Make sure your primary node up → Now add more nodes if you want to deploy multi-cell architecture → Change certificate.ks in standby nodes.</div><div id="overview"><br /></div><div id="overview">When we talk about Primary and standby nodes then it is only for Postgre DB which is active only on Primary node and will be Standby in standby nodes. VMware-vcd service will always be active-active in all three nodes (If you deploy minimum three nodes in multi-cell architecture). See below image.<br /><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiIyeyceqONN0IrbxreBxQkSamqZgQY6S4UVrrLndeE4GVitk5PVhmmlQpRymf8EYkmIru5nQNx9rI01v7nojBVkRMQ3udrclNMVfvLscJqH0js_j6-tR3bfqiKvgCycw6RLL7pFc4YYk/s966/vCD+Architecture.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="464" data-original-width="966" height="308" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiIyeyceqONN0IrbxreBxQkSamqZgQY6S4UVrrLndeE4GVitk5PVhmmlQpRymf8EYkmIru5nQNx9rI01v7nojBVkRMQ3udrclNMVfvLscJqH0js_j6-tR3bfqiKvgCycw6RLL7pFc4YYk/w640-h308/vCD+Architecture.PNG" width="640" /></a></div><br /><div id="overview"><br /><u><b>Upgrade path will be-</b></u><br /></div><div id="overview">Current 9.5 in-linux → In-place upgrade to 9.7 in-linux → Migrate to 9.7 appliance → Upgrade to version 10.1.2 appliance. You can check <a href="https://docs.vmware.com/en/VMware-Cloud-Director/10.1/VMware-Cloud-Director-Install-Configure-Upgrade-Guide/GUID-BC45668F-83B4-4FC9-9E2D-025AA82B61DF.html" target="_blank">vendor doc</a> for this upgrade path. Now when you know the workflow then let's proceed for planning phase.</div>
<div id="Planning"><h2>Planning</h2>First of anything, you should check the interoperability of your product versions. Click here for <a href="https://www.vmware.com/resources/compatibility/sim/interop_matrix.php" target="_blank">VMware InterOperability guide</a>
You need to plan your upgrade as per this guide. This phase is most important phase, I must say. If you plan with perfection then very less chances of failure are there. Let's see what all you need to plan-<br />In-place upgrade is quite simple. There is no such complexity. All planning need is for Migration from in-linux to appliance<br /><b>1. IP Addresses </b><br />There are two choices we have. You need to decide whether you want to change the existing IPs of existing vCD cells or you want to use new IPs on your new vCD cells. Why? Because you are going to deploy new cells for migration to appliance. I will describe in next steps. I used the existing IPs of existing cells. In case, you are using same IP addresses then </div><div id="Planning">1. at the time of 9.7 appliance deployment you need to change the old cell's IP address to any temp but reachable IP address. This IP address should be reachable to your new cell as well as your existing external DB server. why? Because </div><div id="Planning">1.1. This old cell IP address we will assign to new vCD cell's eth0 NIC</div><div id="Planning">1.2. We still need old vcd cell (anyone) for DB migration that's why it must be reachable to new cell and your external DB server</div><div id="Planning">2. You need to free IPs from all of your old three cells so that we can assign same three IPs to all three new 9.7 appliance node's eth0 nics.</div><div id="Planning">3. You need to change DNS entries for you old cells with new temp IPs and then create DNS (Host and PTR records) for new cells with old IP addresses. Any confusion? comment pls.</div><div id="Planning">4. You need to create different VLAN for IPs of eth1 of all three new vcd cells, if you already don't have it.<br /><br /></div><div id="Planning"><b>2. Network Route </b><br /> It is quite crucial part of this migration. In old vCD cells there used to be three different NICs holding different traffics like HTTPS, VMRC, NFS etc. but in vCD 9.7 appliance, each cell will be having two NICs only holding these services. You need to ensure that both these NICs must be on different VLANs\subnets. Now, you need to ensure that your new vCD cells's eth1 can reach your NFS server and for that if require you need to configure static routes as per your network flow.<br /><b>3. Single cell or Multi cell Architecture</b><br />You need to decide and plan your upgrade according to this point. Additional points to be taken care are</div><div id="Planning"><br /></div><div id="Planning">- Check out Load-balancer configuration. It might needs to modify post vcd 9.7 deployment.</div><div id="Planning">- Do you have more than one LBs that balanced different traffics. For example, Internet and Intranet<br />- You need to deploy additional nodes at very last stage that is after certificate replacement and making first node fully up</div></section><div id="Planning"><br /></div><div id="Planning"><b>4. NFS</b></div><div id="Planning">NFS is another critical part of this migration. Some guys might have NFS on Linux Machine, some might have on Windows and some might have it on direct storage box. </div><div id="Planning"><br /></div><div id="Planning">You need to make sure that while deploying first Primary node in version 9.7 appliance, NFS mount point must be empty otherwise 9.7 deployment will fail. You need to ensure that you NFS server must be reachable from the eth1 NIC of all vcd nodes in 9.7 appliance deployment.</div><div id="Planning"><br /></div><div id="Planning">I guess, I have given enough clues to help you plan this migration. Now, let's see all steps one by one.</div>
<div id="In-place upgrade"><h2>In-place upgrade from 9.5 to 9.7</h2><b><u>Pre-requisites</u></b><br />- Make sure that upgrade.bin file is uploaded in any directory in vCD cell(s) and user has enough permission on it. </div><div id="In-place upgrade">- Do a md5sum check. Command is
# md5sum installation-file.bin
<br /><u style="font-weight: bold;">Main activity</u><br />You need to run all below command on all vcd cells one-by-one</div><div id="In-place upgrade"><b>Step 1 :</b> Stop vCD services on all cells using ./cell-management-tool </div><div id="In-place upgrade"><b>To see the current status</b><br /> ./cell-management-tool -u administrator -p 'password' cell --status<br /><b>To stop coming more tasks on it</b><br />./cell-management-tool -u administrator -p 'password' cell --quiesce true<br /><b>To put it in maintenance mode</b></div><div id="In-place upgrade">./cell-management-tool -u administrator -p 'password' cell --maintenance true </div><div id="In-place upgrade"><b>Finally to shutdown vCD services</b></div><div id="In-place upgrade">./cell-management-tool -u administrator -p 'password' cell -s <br /><br /><b>Step 2 :</b> Take snapshot of all vCD cells </div><div id="In-place upgrade"><b>Step 3 :</b> Take full backup of external MS SQL database<br /><b>
Step 4 :</b> Take ownership on downloaded .bin file. Command is<br />
#chmod u+x installation-file.bin<br /><b>
Step 4 :</b> Install the upgrade file now<br />
#./installation-file.bin<br />
If you have placed .bin file in /tmp folder then change the location in CLI and then run the command<br />It is a simple one. No such complexity.</div>
<div id="Best Practices"><h2>Best Practices for next migration</h2><b>
1.</b> Segregation of traffic should be as below. I did it like this so sharing it as my personal recommendations. You can chose other way round as well. </div><div id="Best Practices"> vCD 9.7 appliance eth0 eth1 </div><div id="Best Practices"> Primary HTTPS+VMRC+API PostgreDB+NFS </div><div id="Best Practices"> Standby HTTPS+VMRC+API PostgreDB+NFS </div><div id="Best Practices"> Standby HTTPS+VMRC+API PostgreDB+NFS</div><div id="Best Practices"><b>
2.</b> If primary is deployed as "Primary-Large" then all standby cells must be deployed as "Standby-Large". If primary is deployed as "Primary-small" then all standby cells must be deployed as "Standby-small". <br /><b>
3. </b>In multicell architecture, standby cells should be deployed at very last stage that is after making first cell up and running fully functional and after replacing the certificates. It will make things simple.<br /><b>
4.</b> Both NICs of vcd 9.7 appliance cells must be on different VLANs
</div>
<div id="migration"><h2>Migrate from ver 9.7 In-linux to 9.7 appliance</h2><u><b>Pre-requisites</b></u><br /><b>1.</b> Clean and accessible NFS mount share. Must be accessible from eth1 nic if you are planning to transfer NFS traffic to eth1. I did the same.</div><div id="Migration"><b>2.</b> Accurate DNS entries for new vcd cells with old IPs (If you don't plan to change the existing IPs)</div><div id="Migration"><b>3.</b> If you have customized certificates then have passwords of keystore, https and console proxy.</div><div id="Migration"><b>4. </b>Make sure that network flows are opened between new vcd cell's eth1 nic and old cell. Follow vcd 9.7 Install guide attached in last of this post<br /><b>5. </b>Configure AMQP with version 3.7</div><div id="Migration"><b>6. </b>Here is the vendor <a href="https://docs.vmware.com/en/VMware-Cloud-Director/9.7/com.vmware.vcloud.install.doc/GUID-CAFC4A88-FFB9-4D61-9F72-689DD4E583F9.html" target="_blank">documentation</a> for all pre-requisites</div><div id="Migration"><b>7.</b> Your production downtime will start when you will change the production IP of old vcd cell here. We will assign this IP to new primary cell.</div><div id="Migration"><br /><b><u>Start the vCloud Director Appliance Deployment : Primary Node</u></b></div><div id="Migration"><b><u><br /></u></b></div><div id="Migration"><b>1. </b>Start deploying an ova as usual. A wizard will open → Give vCD cell a valid name → Give it folder location → Compatible datastore → Underlying ESXi host → Select eth1 and eth0 portgroups → Click next to complete customized template wizard →<br /><br /><b>Under Customized template, fill the following-</b></div><div id="Migration"><div id="Migration">NTP Server to use: 8.8.8.8 </div><div id="Migration">Initial Root Password: VMware1!</div><div id="Migration">Expire Root Password Upon First Login: uncheck</div><div id="Migration">Enable SSH root login: check</div><div id="Migration">NFS mount for transfer file location: IPaddress:/sharename </div><div id="Migration">'vcloud' DB password for the 'vcloud' user: VMware1!</div><div id="Migration">Admin User Name: administrator</div><div id="Migration">Admin Full Name: vCD Admin</div><div id="Migration">Admin user password: VMware1!</div><div id="Migration">Admin email: vcd97@vcnotes.in</div><div id="Migration">System name: vcd4</div><div id="Migration">Installation ID: 12</div><div id="Migration">eth0 Network Routes: blank</div><div id="Migration">eth1 Network Routes: blank</div><div id="Migration">Default Gateway: 172.17.2.1</div><div id="Migration">Domain Name: vcnotes.in</div><div id="Migration">Domain Name Servers: 8.8.8.8,8.8.4.4</div><div id="Migration">eth0 Network IP Address: 172.17.2.21</div><div id="Migration">eth0 Network Netmask: 255.255.255.224</div><div id="Migration">eth1 Network IP Address: 172.17.2.22</div><div id="Migration">eth1 Network Netmask: 255.255.255.240</div></div><div id="Migration"><br /></div><div id="Migration">You need to modify above detail as per your environment. Few doubts you might have-</div><div id="Migration"><br /></div><div id="Migration"><i>System Name</i> - For first primary node, you can put vcd1<br /><i>Installation ID</i> - In case of Brownfiled setup, note the installation id from running setup and put same here<br /><i>eth0 and eth1 Network</i> - It is to put static routes according to your network design</div><div id="Migration"><br /></div><div id="Migration">Once all info is given, review it and click on Finish.</div><div id="Migration"><br /></div><div id="Migration">Glad to see vendor's <a href="https://docs.vmware.com/en/VMware-Cloud-Director/9.7/vcd_97_install.pdf" target="_blank">documentation here</a>. Refer to page number 54. </div><div id="Migration"><br /></div><div id="Migration"><b>Note that:</b></div><div id="Migration"><br /></div><div id="Migration"><b>1.</b> You need not to change installation ID on each and every standby cell. Installation ID is the ID which vCD uses to generate unique mac addresses for vCD VMs. I have seen few blogs asking to change it for standby nodes. This is totally incorrect.</div><div id="Migration"><b>2.</b> Domain Name and Domain search path will be same as vcnotes.in. It should not be like vcdcell01.vcnotes.in. When you put the VM name at starting of deployment then DNS automatically generate FQDN.</div><div id="Migration"><br /></div><div id="Migration"><b>Post-Checks-<br /><br /></b></div><div id="Migration"><b>1.</b> Once ova deployment is finished then access SSH. If SSH is not responding the access console and start sshd service. Service sshd start. Check below logs to ensure everything is good.</div><div id="Migration"><div id="Migration">#cat /opt/vmware/var/log/firstboot</div><div id="Migration">#cat /opt/vmware/var/log/vcd/setupvcd.log</div><div id="Migration">#cat /opt/vmware/var/log/vami/vami-ovf.log</div><div id="Migration"><br />If everything went well during deployment then firstboot logs will show you the success mark otherwise it will refer to check setupvcd.log and then vami-ovf.log</div><div id="Migration"><br /></div><div id="Migration"><b>2. </b>Browse VAMI interface https://IP_FQDN_of_primary_cell:5480. It should be like below<br /><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOHYmUCfiTFO3pjJs9mWh_wYAH6ticIVk7Nf80IcOs43zMpEf1La0TX3daXQ7KZKRvhfagWC4pMdnGezGQTxGm-3v-x9XsYqIcpyYZTL8v5ou7a9tHT6HnylaCim4ptMvSs06oifJpNqU/s1266/1.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="410" data-original-width="1266" height="208" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOHYmUCfiTFO3pjJs9mWh_wYAH6ticIVk7Nf80IcOs43zMpEf1La0TX3daXQ7KZKRvhfagWC4pMdnGezGQTxGm-3v-x9XsYqIcpyYZTL8v5ou7a9tHT6HnylaCim4ptMvSs06oifJpNqU/w640-h208/1.PNG" width="640" /></a></div><br /><div id="Migration"><b>3. </b>Browse https://IP_FQDN_of_primary_cell/cloud and https://IP_FQDN_of_primary_cell/provider. All portals will be accessible and without any error</div></div><div id="Migration"><br /><b><u>Start the vCloud Director Appliance Deployment : Standby Node</u></b></div><div id="Migration"><u>Not Now</u> :)</div><div id="Migration"><u><br /></u></div><div id="Migration">Once your primary cell is deployed then don't deploy standby node right after. Now, its time to transfer the DB.</div><div id="Migration"><br /></div><div id="Migration"><b>Take backup of internal embedded postgres database</b></div><div id="Migration"><br /></div><div id="Migration">#/opt/vmware/appliance/bin/create-db-backup</div><div id="Migration"><b><u><br /></u></b></div><div id="Migration"><b><u>Configure External Access to the vCloud Director Database</u></b> <b><u><br /><br /></u></b></div><div id="Migration"><b>1. </b>Stop vCD services on all cells including one primary and old three cells. </div><div id="Migration"><b>2.</b> SSH to new vcd cell and create a file with name external.txt in /opt/vmware/appliance/etc/pg_hba.d with below command</div><div id="Migration"><br /></div><div id="Migration">#vi /opt/vmware/appliance/etc/pg_hba.d/external.txt</div><div id="Migration"><br /></div><div id="Migration">Now add below colored content in external.txt file<br /><br /><div id="Migration"><b><span style="background-color: white; color: #0b5394;">#TYPE DATABASE USER ADDRESS METHOD</span></b></div><div id="Migration"><b><span style="background-color: white; color: #0b5394;">host vcloud vcloud 172.25.2.194/32 md5<br />host vcloud vcloud 172.25.2.209/32 md5</span></b></div><div id="Migration"><b><span style="background-color: white;"><br /></span></b></div><div id="Migration"><span style="background-color: white;"><b>Note that : </b>IP address 172.25.2.194/32 is IP address of you old external DB server with CIDR value. IP address 172.25.2.209 is the IP address of eth1 NIC of old vcd cell. Refer to Page number 82 and 83 in vcd 9.7 Install guide attached in last of this post.</span></div><div id="Migration"><span style="background-color: white;">You can ensure proper update of above created file by checking file pg_hba.conf. Just run #cat pg_hba.conf and it should show the entries you just made in above steps</span></div></div><div id="Migration"><br /></div><div id="Migration"><b>3. </b>SSH to old vcd cell and run below command. Refer to vCD 9.7 Install guide page number 122.</div><div id="Migration"><br /></div><div id="Migration"><i>/opt/vmware/vcloud-director/bin/cell-management-tool dbmigrate -dbhost eth1_IP_new_primary \
-dbport 5432 -dbuser vcloud -dbname vcloud -dbpassword database_password_new_primary</i></div><div id="Migration"><i><br /></i></div><div id="Migration">What you need to modify in above command is-</div><div id="Migration"><i><br /></i><i><b>eth1_IP_new_primary -</b> </i>It is eth1 IP address of new primary vcd appliance cell<br /><i><b>database_password_new_primary </b>- </i>it is the database password given while deploying the primary vcd node</div><div id="Migration"><b><i>-dbname</i> </b> - It should be vcloud only if you haven't changed intentionally. </div><div id="Migration"><b>/</b> - Many get confused with this /, it is just in VMware documentation which means next line. Doesn't matter if you use it or not.</div><div id="Migration"><br />Rest info should be understood and can be used as it is. If all went well then it will transfer your external SQL DB to embedded postgreSQL.</div><div id="Migration"><br /></div><div id="Migration"><b><u>Transfer Certificates from Old Cell and Integrate it to New Primary Cells</u></b></div><div id="Migration"><b><u><br /></u></b></div><div id="Migration"><div id="Migration"><b>1.</b> On the migration source copy all the following files from old vcd cell to new vcd cell. Do not edit any entries in these files in this process. Use WinSCP to move the files between the two devices. Rename the file to cerificates.ks.migrated to avoid any confusion before paste it into new vcd cell.<br /><br /></div><div id="Migration">/opt/vmware/vcloud-director/certificates.ks</div><div id="Migration">/opt/vmware/vcloud-director/etc/certificates</div><div id="Migration">/opt/vmware/vcloud-director/etc/global.properties</div><div id="Migration">/opt/vmware/vcloud-director/etc/proxycertificates</div><div id="Migration">/opt/vmware/vcloud-director/etc/responses.properties</div><div id="Migration">/opt/vmware/vcloud-director/etc/truststore</div></div><div id="Migration"><br /></div><div id="Migration"><b>2. </b>Create a new directory in new vCD cell and paste above files there</div><div id="Migration">mkdir /root/tempCerts<br /><br /><b>3. </b>Change the ownership of vcloud user on above files<div id="Migration">chown vcloud:vcloud /root/tempCerts/*</div><div id="Migration"><br /></div><div id="Migration"><b>4. </b>On the new appliance, now rename all existing files to keep them for reference</div><div id="Migration">cd /opt/vmware/vcloud-director/etc/</div><div id="Migration">mv certificates certificates</div><div id="Migration">mv global.properties global.properties</div><div id="Migration">mv proxycertificates proxycertificates</div><div id="Migration">mv responses.properties responses.properties</div><div id="Migration">mv truststore truststore</div><div id="Migration"><br /></div><div id="Migration">I didn't renamed /opt/vmware/vcloud-director/certificates.ks here because I have already renamed it in step 1.</div><div id="Migration"><br /></div><div id="Migration"><b>5. </b>On the new appliance copy the files from /root/tempCerts to their respective directories. <br /><br /></div><div id="Migration">mv /root/tempCerts/certificates.ks.migrated /opt/vmware/vcloud-director/</div><div id="Migration">mv /root/tempCerts/certificates /opt/vmware/vcloud-director/etc/</div><div id="Migration">mv /root/tempCerts/global.properties /opt/vmware/vcloud-director/etc/</div><div id="Migration">mv /root/tempCerts/proxycertificates /opt/vmware/vcloud-director/etc/</div><div id="Migration">mv /root/tempCerts/responses.properties /opt/vmware/vcloud-director/etc/</div><div id="Migration">mv /root/tempCerts/truststore /opt/vmware/vcloud-director/etc/</div><div id="Migration"><br /></div><div id="Migration">Here, you have transferred all the certificates from old to new cell and now this is the time to run configure command so that new vCD primary appliance can use these certificates. </div><div id="Migration"><b><br /></b></div><div id="Migration"><b>6. Below is the command.</b></div><div id="Migration"><br /></div><div id="Migration">Before this, note that /opt/vmware/vcloud-director/certificates.ks (Customer certificate copied from old cell) is not in use because we have renamed it with certificates.ks.migrated. We will do all initial configurations with self-signed certificates and then will use custom certificate in last step.</div><div id="Migration"><br /></div><div id="Migration"><div id="Migration">/opt/vmware/vcloud-director/bin/configure --unattended-installation --database-type postgres --database-user vcloud --database-password db_password_new_primary --database-host eth1_ip_new_primary --database-port 5432 --database-name vcloud --database-ssl true --uuid --keystore /opt/vmware/vcloud-director/etc/certificates.ks --keystore-password root_password_new_primary --primary-ip appliance_eth0_ip --console-proxy-ip appliance_eth0_ip --console-proxy-port-https 8443</div></div><br /></div><div id="Migration">Hope above command is self-explanatory. If not, comment it and ask your doubt.</div><div id="Migration"><br /></div><div id="Migration">Once above command is successful one then you can follow next step</div><div id="Migration"><br /></div><div id="Migration"><div id="Migration"><b>7.</b> Start vCD services on first primary new cell</div><div id="Migration"><br /></div><div id="Migration">SSH to primary cell and start the vcd services </div><div id="Migration">#service vmware-vcd start or #systemctl start vmware-vcd.services</div><div id="Migration"><br /></div><div id="Migration">You can monitor the progress of the cell startup at /opt/vmware/vcloud-director/logs/cell.log.</div></div><div id="Migration"><br /></div><div id="Migration"><b><u>Update certificate.ks file</u></b></div><div id="Migration"><br /></div><div id="Migration"><div id="Migration"><b>1.</b> Rename the original certificates.ks file. You are renaming self-signed certificate now. </div><div id="Migration"><br /></div><div id="Migration">mv /opt/vmware/vcloud-director/certificates.ks /opt/vmware/vcloud-director/certificates.ks.original</div></div><div id="Migration"><br /></div><div id="Migration"><b>2. </b>Rename the migrated certificates.ks file. You are renaming custom certificate now to use it in production</div><div id="Migration">mv /opt/vmware/vcloud-director/certificates.ks.migrated /opt/vmware/vcloud-director/certificates.ks </div><div id="Migration"><br /></div><div id="Migration"><b>3. </b>Shutdown vCloud Director management cell. <br /><br /></div><div id="Migration">/opt/vmware/vcloud-director/bin/cell-management-tool -u administrator -p 'Password' cell --quiese true </div><div id="Migration">/opt/vmware/vcloud-director/bin/cell-management-tool -u administrator -p 'Password' cell --maintanance true</div><div id="Migration">/opt/vmware/vcloud-director/bin/cell-management-tool -u administrator -p 'Password' celll -s</div><div id="Migration"><br /></div><div id="Migration"><b>4. </b>Change the ownership on certificates.ks file</div><div id="Migration">chown vcloud.vcloud /opt/vmware/vcloud-director/certificates.ks</div><div id="Migration"><br /></div><div id="Migration"><b>5. </b>Run the configuration tool to import the new certificate. </div><div id="Migration">/opt/vmware/vcloud-director/bin/configure<br /><br />If asked “Please enter the path to the Java keystore containing your SSL certificates and private keys:” enter the location you uploaded the file to. If our case: /opt/vmware/vcloud-director/certificates.ks. It will ask about https, console proxy and keystore password. Supply all.</div><div id="Migration"><br /></div><div id="Migration">Press Y wherever it prompt and You are Done!!</div><div id="Migration"><br /></div><div id="Migration">You need not to start vCD service manually now. It will automatically started.</div><div id="Migration"><br /></div><div id="Migration">Check the /cloud, /provider and :5480 portals and make sure it is accessible well from intranet and internet environments. </div><div id="Migration"><br /></div><div id="Migration"><b>Some Useful Commands for HA Cluster Operations-</b></div><div id="Migration"><b><br /></b></div><div id="Migration">I am making it smallest font size to avoid any confusion in command. These are show commands and you can run to have deep inside of vCD HA cluster status.</div><div id="Migration"><div id="Migration"><b><span style="font-size: xx-small;"><br /></span></b></div><div id="Migration"><span style="font-size: xx-small;"><b>sudo -i -u postgres /opt/vmware/vpostgres/current/bin/repmgr -f /opt/vmware/vpostgres/current/etc/repmgr.conf node status</b></span></div><div id="Migration"><span style="font-size: xx-small;"><b>sudo -i -u postgres /opt/vmware/vpostgres/current/bin/repmgr -f /opt/vmware/vpostgres/current/etc/repmgr.conf cluster show</b></span></div><div id="Migration"><span style="font-size: xx-small;"><b>sudo -i -u postgres /opt/vmware/vpostgres/current/bin/repmgr -f /opt/vmware/vpostgres/current/etc/repmgr.conf cluster matrix </b></span></div><div id="Migration"><span style="font-size: xx-small;"><b>sudo -i -u postgres /opt/vmware/vpostgres/current/bin/repmgr -f /opt/vmware/vpostgres/current/etc/repmgr.conf cluster crosscheck </b></span></div><div id="Migration"><span style="font-size: xx-small;"><b>systemctl status appliance-sync.timer </b> #It is to check the time sync between all the nodes and need to run on all nodes seperately</span></div><div id="Migration"><span style="font-size: xx-small;"><br /></span></div><div id="Migration"><span style="font-size: xx-small;"><br /></span></div></div><div id="Migration"><b><br /></b></div><div id="Migration"><br /></div><div id="Migration"><b><u>Start the vCloud Director Appliance Deployment : Standby Node1</u></b></div><div id="Migration"><b><u><br /></u></b></div><div id="Migration"><b>1.</b> All process to deploy standby node is same except</div><div id="Migration"><br /></div><div id="Migration">- You will only seed info which is applicable for standby node at the time of deployment</div><div id="Migration">- You just need to transfer Certificate.ks file to its default location and no other certificate replacement is required on standby node</div><div id="Migration"><br /></div><div id="Migration"><b><u>Start the vCloud Director Appliance Deployment : Standby Node2</u></b></div><div id="Migration"><b><u><br /></u></b></div><div id="Migration">Same as above no change.</div><div id="Migration"><br /></div><div id="Migration">If everything goes well then in /cloud or /provider interface, you will see all three nodes with green ticket icon.</div><div id="Migration"><br /></div><div id="Migration">Now, All nodes are deploy in vCD. In mulit-cell deployment only one or two steps are additional here.<br /><br /><b>Load-Balancer Configuration :</b> You need to check your existing load balancer configurations and need to modify them if require. If your load-balancer was already configured with in-use IP addresses then you just need to change in-use port from 443 to 8443. For me, LB was configured in NSX for internal traffic and F5 was there to entertain Internet traffic.</div><div id="Migration"><br /></div><div id="Migration">Would like to share some issues which I encountered during migration</div>
<div id="Known Issues"><h2>Known Errors during above deployment and migration</h2></div><div id="Known Errors during above deployment and migration"><div id="Known Errors during above deployment and migration">Listing down where I was stuck <br /><b>Issue 1:</b> After deployment of first node, I got below error on VAMI interface <br />The deployment of the primary vCloud Director appliance fails because of insufficient access permissions to the NFS share. The appliance management user interface displays the message: No nodes found in cluster, this likely means PostgreSQL is not running on this node. The /opt/vmware/var/log/vcd/appliance-sync.log file contains an error message: creating appliance-nodes directory in the transfer share /usr/bin/mkdir: cannot create directory ‘/opt/vmware/vcloud-director/data/transfer/appliance-nodes’: Permission denied.<br /><b>Solution :</b> It means that NFS was not clean and PostgreSQL service couldn't be running. If you check above mentioned firstboot and setupvcd.log files then you will have idea. Delete all the content of NFS share and delete the existing node and retry deployment. No other fix.<br /><b>Issue 2:</b> sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: signature check failed. <br />These were the log entires in cell.log and portal was not up<br /><b>Solution: </b>Edit the global.properties file in new primary cell and comment out (#) three lines which are associated with ssl connection and run configure command<br />/opt/vmware/vcloud-director/bin/configure --unattended-installation --database-type postgres --database-user vcloud --database-password db_password_new_primary --database-host eth1_ip_new_primary --database-port 5432 --database-name vcloud --database-ssl <b>true</b> --uuid --keystore /opt/vmware/vcloud-director/etc/certificates.ks --keystore-password root_password_new_primary --primary-ip appliance_eth0_ip --console-proxy-ip appliance_eth0_ip --console-proxy-port-https 8443<br />If it doesn't work then run below command <br />/opt/vmware/vcloud-director/bin/configure --unattended-installation --database-type postgres --database-user vcloud --database-password db_password_new_primary --database-host eth1_ip_new_primary --database-port 5432 --database-name vcloud --database-ssl <b>false</b> --uuid --keystore /opt/vmware/vcloud-director/etc/certificates.ks --keystore-password root_password_new_primary --primary-ip appliance_eth0_ip --console-proxy-ip appliance_eth0_ip --console-proxy-port-https 8443<br />It will work for sure as worked for me twice<br />Again run below command now <br />/opt/vmware/vcloud-director/bin/configure --unattended-installation --database-type postgres --database-user vcloud --database-password db_password_new_primary --database-host eth1_ip_new_primary --database-port 5432 --database-name vcloud --database-ssl <b>true</b> --uuid --keystore /opt/vmware/vcloud-director/etc/certificates.ks --keystore-password root_password_new_primary --primary-ip appliance_eth0_ip --console-proxy-ip appliance_eth0_ip --console-proxy-port-https 8443<br /><b>Issue 3</b>: DB transfer was failing, I couldn't capture the error but it was giving old cell's IP address error<br /><b>Solution </b>: When you prepare /opt/vmware/appliance/etc/pg_hba.d/external.txt file, I mentioned to put IP address of external DB so here you need to put IP address of your old cell as mentioned in above steps. In my case, I had to put IP address of eth1 nic of old cell <br /><b>Issue 4: </b>vCD Portal was up from internet and Intranet but VM's console was not accessible from Internet.<br /><b>Solution: </b>You need to make sure that in multi-cell deployment if you are using more than one LB then you will change the new cell's IP address in all LB configuration. In my case, Internet facing LB configuration change was missed so when we corrected it was resolved.</div></div><div id="upgrade to 10.1.2"><h2>Upgrade from version 9.7 appliance to Cloud Director 10.1.2 appliance</h2></div><div id="upgrade to 10.1.2"><h3 style="text-align: left;">Prerequisites</h3><h4 style="text-align: left;">Take a snapshot of the primary vCloud Director appliance.</h4><div id="upgrade to 10.1.2">Log in to the vCenter Server instance on which resides the primary vCloud Director appliance of your database high availability cluster.</div><div id="upgrade to 10.1.2">Navigate to the primary vCloud Director appliance, right-click it, and click Power > Shut Down Guest OS.</div><div id="upgrade to 10.1.2">Right-click the appliance and click Snapshots > Take Snapshot. Enter a name and, optionally, a description for the snapshot, and click OK.</div><div id="upgrade to 10.1.2">Right-click the vCloud Director appliance and click Power > Power On.<br /><br /></div><div id="upgrade to 10.1.2">Verify that all nodes in your database high availability configuration are in a good state. See Check the Status of a Database High Availability Cluster.</div><div id="upgrade to 10.1.2"><br /></div><div id="upgrade to 10.1.2"><h2 style="text-align: left;">Procedure</h2><div id="upgrade to 10.1.2"><ol><li>In a Web browser, log in to the appliance management user interface of a vCloud Director appliance instance to identify the primary appliance, https://appliance_ip_address:5480.</li><li>Make a note of the primary appliance name. You must upgrade the primary appliance before the standby and application cells. You must use the primary appliance when backing up the database. <b>Note: You must upgrade primary cell first. <br /></b><br />vCloud Director is distributed as an executable file with a name of the form VMware_vCloud_Director_v.v.v.v- nnnnnnnn_update. tar.gz, where v. v. v. v represents the product version and nnnnnnnn the build number. For example, VMware_vCloud_Director_10.0.0.4424-14420378_update.tar.gz.</li><li>Create the local-update-package directory in which to extract the update package.<br />#mkdir /tmp/local-update-package</li><li>Extract the update package in the newly created directory.<br />#cd /tmp<br />#tar -vzxf VMware_vCloud_Director_v.v.v.v-nnnnnnnn_update.tar.gz -C /tmp/local-update-package</li><li>Set the local-update-package directory as the update repository.<br />#vamicli<span style="white-space: pre;"> </span>update --repo file:///tmp/local-update-package</li><li>Check for updates to verify that you established correctly the repository.<br />#vamicli update --check<br />You will see similar output, if all went well<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxb4nZ-tklgXeLIkpTEHmNbgNosfSjoiEP6y0H9Z6MG2f_7jEJOfipL2IIQ8S4CbR18OoNgxF0SPDPLk0AtIAJO5ObtJvQznZdKvXx1LCKdQ6-vznHlz0Mll-Rqm4jn9HaC0JlG16Aw4Q/s1266/1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="210" data-original-width="1266" height="106" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxb4nZ-tklgXeLIkpTEHmNbgNosfSjoiEP6y0H9Z6MG2f_7jEJOfipL2IIQ8S4CbR18OoNgxF0SPDPLk0AtIAJO5ObtJvQznZdKvXx1LCKdQ6-vznHlz0Mll-Rqm4jn9HaC0JlG16Aw4Q/w640-h106/1.PNG" width="640" /></a></div><br /></li><li>Shut down vCloud Director by running the following command<br />#/opt/vmware/vcloud-director/bin/cell-management-tool -u <admin username> cell --shutdown<br />OR<br />#Service vmware-vcd stop<br />You can use either way to stop vcd services</li><li>Apply the available upgrade<br />#vamicli update --install latest<br /><br />Note: Follow all above steps on all cells one by one and restart each cell too after upgrading the application. Now login on Primary Cell only and upgrade the database schema</li><li>From the primary appliance, back up the vCloud Director appliance embedded database.<br />#/opt/vmware/appliance/bin/create-db-backup</li><li>From any appliance, run the vCloud Director database "upgrade" utility.<br />#/opt/vmware/vcloud-director/bin/upgrade</li><li>Reboot each vCloud Director appliance<br />#shutdown -r now</li></ol><div>I will now share what is not there on vendor article-</div><div><br /></div><div>1. Post application upgrade and login in html interface of vCD 10.1.2, you might notice that vCenter is showing disconnected and is not connecting post reconnect and refresh option. In that case, you need to follow below steps-<br /><br /></div><div><div><ol style="text-align: left;"><li>Login to primary cell with root</li><li>Run below command to accept the certificate (Issue is with certificate exchange of new vCD version 10.1.2 and needs to accept)</li></ol></div><div>#opt/vmware/vcloud-director/bin/cell-management-tool trust-infra-certs --vsphere --unattended</div><div><br />For more info, refer the URL https://kb.vmware.com/s/article/78885</div></div><div><br /></div><div>2. Post upgrading vCD application, postgres service might stop and while upgrading the database schema, you may see error, "unable to establish initial connection with database". To resolve this, either start the service manually or reboot the cell once.</div></div><div id="upgrade to 10.1.2"><br /></div><div id="upgrade to 10.1.2">That's all :) Hope it was helpful.</div></div></div>
<div id="VMware References"><h2>VMware References</h2></div><div id="VMware References">1. vCD 9.7 Install and Upgrade <a href="https://docs.vmware.com/en/VMware-Cloud-Director/9.7/vcd_97_install.pdf" target="_blank">guide</a> </div><div id="VMware References">2. Above guide has all detail but just in case, if you need something specific. Here is <a href="https://docs.vmware.com/en/VMware-Cloud-Director/9.7/com.vmware.vcloud.install.doc/GUID-74296A4D-416F-4D7F-BBD6-BA983AAAD4E7.html" target="_blank">Certificate replacement guide</a> from VMware<br />3. Here is the <a href="https://docs.vmware.com/en/VMware-Cloud-Director/9.7/com.vmware.vcloud.install.doc/GUID-826F9B56-7A0D-4159-89E4-2BB522D9F603.html" target="_blank">database migration steps</a> from VMware and same is mentioned in guide number 1.<br />4.<a href="http://nuthouse.us/dlouddirector/2020/09/20/upgrade-vcd95-to-1011.html#import-existing-data-into-the-new-appliance" target="_blank">Awesome article</a> written by Richard Harris for the same process. Must check. I too learned from his experiences </div>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com0tag:blogger.com,1999:blog-3224609577145482350.post-43812053607994922252020-10-10T13:27:00.005+05:302020-12-16T11:49:42.332+05:30vCD | Error "Invalid User" during any operation with VM<p><span><span style="font-family: Merriweather;"><span><span><span><span>Hi Guys,</span></span></span></span></span></span></p><p><span><span style="font-family: Merriweather;"><span><span><span><span>I am covering this error because I couldn't find any article on it and I had to open a case with VMware to resolve it. Luckily, my issue went into hand of a good guy and we could resolve it after around 5-6 hours call. So, I thought to cover this up as well. It can be beneficial for someone.</span></span></span></span></span></span></p><p><span><span style="font-family: Merriweather;"><span><span><span><span>In this article, I will not share exact solution rather I will tell you that why is it happening, I mean the root cause and then you have to raise a case with VMware. At least you will now know the root cause. Why not solution? because you will have to do some changes in vCloud Database and it is very critical to touch cloud director DB by your own and if you are not that expert.</span></span></span></span></span></span></p><p><span><span style="font-family: Merriweather;"><span><span><span><span>Error is below in image and impacted vCD version is 9.7<br /></span></span></span></span></span></span></p><div class="separator" style="clear: both; text-align: center;"><span><span style="font-family: Merriweather;"><span><span><span><span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZWNb1amb5RyeZqSIY9l8Truyo7P0BLaz79oRCnB7E7s34NyHVCG7eSFzQGDITTr6snR3Et9j4UldeO5GuXzm0cyNNyyfhhH3uQgzyYb8lGdNJtqEgyNzdIsOmWJMhyphenhyphenK7lGjZPc20cKAw/s1212/image.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="897" data-original-width="1212" height="474" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZWNb1amb5RyeZqSIY9l8Truyo7P0BLaz79oRCnB7E7s34NyHVCG7eSFzQGDITTr6snR3Et9j4UldeO5GuXzm0cyNNyyfhhH3uQgzyYb8lGdNJtqEgyNzdIsOmWJMhyphenhyphenK7lGjZPc20cKAw/w640-h474/image.png" width="640" /></a></span></span></span></span></span></span></div><p><span><span style="font-family: Merriweather;"></span></span></p><p><span><span style="font-family: Merriweather;"><span><span><span><span>Reason: In my case, it happened because my customer deleted a user from LDAP server directly without transferring its objected from vCloud Director. Hope you know that when you delete any user in vCD, it ask you to transfer its objects. In this case, it was not happened and all those owned objected were locked for any modification.</span></span></span></span></span></span></p><p><span><span style="font-family: Merriweather;"><span><span><span><span>VMware identified all the objects which was running with user ID and then replaced the user ID with system's account user id. They did it from vCD database. You need to raise case with them.</span></span></span></span></span></span></p><p><span><span style="font-family: Merriweather;"><span><span><span><span>Enjoy the troubleshooting :) <br /></span></span></span></span></span></span></p><p><span><span style="font-family: Merriweather;"><span><span><span><span><br /></span></span></span></span></span></span></p><p><span style="font-size: large;"><span style="font-family: Merriweather;"><span><span><span><span><br /></span></span></span></span></span></span></p>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com0tag:blogger.com,1999:blog-3224609577145482350.post-49660180298706063232020-10-07T21:34:00.007+05:302020-10-10T13:15:53.380+05:30vROPS | CPU Addition Automation<p>Hello Friends,</p><p>In my <a href="https://www.vcnotes.in/2020/10/automation-add-cpu-if-usage-is-more.html">previous post, </a>I explained the cpu addition automation with PowerShell. Now, I got a request to explain the steps from vROPS as well. As I said that who has vROPS then it is better than doing it from PowerShell. vROPS is undoubtedly Enterprise level solution and I would say PS here is a trick to do it.</p><p>Here you go...</p><p><span style="color: #3d85c6;"><u><b>Pre-requisite</b></u></span></p><ul style="text-align: left;"><li>CPU hot add must be enable for the VM(s) which you want to automate for. <a href="https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.vm_admin.doc/GUID-285BB774-CE69-4477-9011-598FEF1E9ACB.html" target="_blank">How to do it?</a></li><li>User account you are using, must have sufficient access rights <br /></li></ul><p><span style="color: #3d85c6;"><u><b> Procedure</b></u></span></p><p>1. Login vROPS with admin privilege account.<br />2. Click on Alerts from top Menu. Which one? See below image-</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF2r7ZgfxUpRIdA8e0DeD4qlAUv8vxtTFa7Aho4fwT3smx9qkb2f2s5G4QqZNSgmFKnpJxasqhyphenhyphenkNIsOETyMV4u3H_x4Gf5CdiiqyNaIFmoSPE6Oo19eccU19cykJMkgTte6Rwxsg1Nkc/s1079/123.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="86" data-original-width="1079" height="52" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF2r7ZgfxUpRIdA8e0DeD4qlAUv8vxtTFa7Aho4fwT3smx9qkb2f2s5G4QqZNSgmFKnpJxasqhyphenhyphenkNIsOETyMV4u3H_x4Gf5CdiiqyNaIFmoSPE6Oo19eccU19cykJMkgTte6Rwxsg1Nkc/w640-h52/123.PNG" width="640" /></a></div><p>3. Expand the Alert Settings and Click on "Alert Definition" and then click on Green + icon as shown below.<br /></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitjLDrkEKiQFXzPScqCxeR82k_Ttcerld7YYogGPLmMMhyphenhypheneYAw9JI1reAtwyPi6fjtvt86ckEpifVAxLJNd4iLEWft2IED4NcP-PaHnu3Aq9gy5WXmRscjKe8VS5ZeMMFyvqUf7kM_b1g/s881/125.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="322" data-original-width="881" height="234" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitjLDrkEKiQFXzPScqCxeR82k_Ttcerld7YYogGPLmMMhyphenhypheneYAw9JI1reAtwyPi6fjtvt86ckEpifVAxLJNd4iLEWft2IED4NcP-PaHnu3Aq9gy5WXmRscjKe8VS5ZeMMFyvqUf7kM_b1g/w640-h234/125.PNG" width="640" /></a></div> 4. Fill the form ;)<br /><p></p><p>Name : Give any suitable name. I gave "_increase cpu count".<br />Base Object : Select Virtual machine under vcenter adapter here. Type virt and it will auto highlight.<br />Alert Impact : <br />Impact: Efficiency (Because continuous CPU spike will decrease the efficiency)<br />Criticality : Critical (You can select any as per your requirement)<br />Alert type and sub-type : Application:Performance<br />Wait Cycle : 1<br />Cancel Cycle : 1</p><p>5. Add Symptom definitions<br /><br />1. Click on + icon to create a new one if you don't have already. <br />2. Now select CPU|usage% or CPU|Workload% metric as per your requirement. I chose CPU|Workload% as it make more sense in vROPS version 10.1.2. <br />3. Drag it to right or double click on the metric.<br /><br />it looks like as -</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAm71lvj4q7xm0D0tF7eaD2bVIxkzsg_ZcMc0cVzIDPW5xTPczbHQPZPijU9eyvJut5FFdJ5F_4nbC7iSHbQwCSKLsD7-S3qMBfNcYKo5YyCmWjKech4mQQLgJiaOFXTfjJPbxHkoa1Rg/s1722/126.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="391" data-original-width="1722" height="146" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAm71lvj4q7xm0D0tF7eaD2bVIxkzsg_ZcMc0cVzIDPW5xTPczbHQPZPijU9eyvJut5FFdJ5F_4nbC7iSHbQwCSKLsD7-S3qMBfNcYKo5YyCmWjKech4mQQLgJiaOFXTfjJPbxHkoa1Rg/w640-h146/126.PNG" width="640" /></a></div><ul style="text-align: left;"><li>3.1. Give it a name</li><li>3.2. click on drop down and select "Immediate" or "Critical" as you wish</li><li>3.3. When metric is greater than, I put here 99. It means that when CPU|Workload% will be higher than 99%, it will trigger the action. </li><li>3.4. Once done, click on save. You will be back on alert definition page.</li><li>3.5. Add recommendation if you want.</li><ul><li>3.5.1. Click on + icon</li><li>Select Adapter type "vCenter Adapter"</li><li>Select Action "Set CPU count for VM"</li></ul></ul><p>Once done then click on save. Your new and fresh Alert Definition has been created here.</p><p><span style="color: #3d85c6;"><b>Let's automate it now-</b></span></p><p>1. Check your current active policy. How? Check below</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRBTOxHalD3Mfoal_XSrwUjtFCDA4BktHg4OrbqxUAyX1C9HA_Vop5TuGjGT4qlGFfDKlVVsVWjGJ4FgWPSY36iqqJYfnl2D8B9oBlR6zpplEGWkMG79Bx9PjgRMTl7S_B3cmS_TK8-WQ/s896/127.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="290" data-original-width="896" height="208" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRBTOxHalD3Mfoal_XSrwUjtFCDA4BktHg4OrbqxUAyX1C9HA_Vop5TuGjGT4qlGFfDKlVVsVWjGJ4FgWPSY36iqqJYfnl2D8B9oBlR6zpplEGWkMG79Bx9PjgRMTl7S_B3cmS_TK8-WQ/w640-h208/127.PNG" width="640" /></a></div><p>2. Now go to "Policy Library" and find active policy name in the list.<br />3. Select it and click on edit<br />4. Directly go to "Alert/Symptoms:Definition" and search for your "Alert Definition" which we created in above steps. It will look like below-</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKGwoj7I_MEEgZlI3EgbLM62Jb8k7FdOetBZWI1tBzWbyMklMX50G2YInwXKGSNJ8BKSaKiCRGWXRMAWR6WyXUkYkm_aogZpSvAlyTHE_5Ko0V9rCtf3vFfHagL03c6KUqoSkAjiYcWHY/s914/128.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="295" data-original-width="914" height="206" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKGwoj7I_MEEgZlI3EgbLM62Jb8k7FdOetBZWI1tBzWbyMklMX50G2YInwXKGSNJ8BKSaKiCRGWXRMAWR6WyXUkYkm_aogZpSvAlyTHE_5Ko0V9rCtf3vFfHagL03c6KUqoSkAjiYcWHY/w640-h206/128.PNG" width="640" /></a></div><p><br />5. Click on Automate column and select "Local". You will see green tick icon as shown in above image.</p><p>That's it!</p><p>Now what you have done is, You have enabled automated action to add CPU count (it will add +1) whenever any VM's CPU workload% will be more than 99%.</p><p>To see automated task's action, you can go to:</p><p>Administration → History → Recent Tasks. Below is the example of successful automated task</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAK-kPPkW0aqG-XX559mnkUfzoWsZhHfaKmajL_k7LesQoB9iNvhsxpKafNuR61vZ2Z49V0CgEWyyQtjx16jgg-QgSvTKuUiNhvUIrGWH3fmajBQH-hdv7VP6ItR327h0O2nGt8M-pLjk/s1353/31.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="443" data-original-width="1353" height="210" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAK-kPPkW0aqG-XX559mnkUfzoWsZhHfaKmajL_k7LesQoB9iNvhsxpKafNuR61vZ2Z49V0CgEWyyQtjx16jgg-QgSvTKuUiNhvUIrGWH3fmajBQH-hdv7VP6ItR327h0O2nGt8M-pLjk/w640-h210/31.PNG" width="640" /></a></div><p></p><p>Above is standard way to automate it and it should work in most of the scenarios.</p><p> </p><p><span style="color: red;">Caution : If you are targeting few VMs then make sure you are not applying automation on "Current Default Policy" otherwise CPU addition will trigger on all your VMs in vCenter server.</span></p><p><span style="color: red;"><span style="color: #0b5394;">Solution : Create a new policy </span></span><span style="color: red;"><span style="color: #0b5394;">→ Create new Group and add target VMs in this group </span></span><span style="color: #0b5394;">→</span> <span style="color: #0b5394;">Apply new Policy on new Group. In this way, only those VMs will be automated which you will add in the group</span></p><p><span style="color: #0b5394;"><span style="color: black;">Known issues in this Automation:</span></span></p><p><span style="color: #0b5394;"><span style="color: black;"><span style="color: red;">Problem 1 :</span> Input Parameter 'CpuCount' not in range, positive number range;passed value 0</span></span></p><p><span style="color: #0b5394;"><span style="color: black;"></span></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq8E2ZiBwvTCKUIfQFG5fPV7O8i_kY5fY2DmozRgLCDYzFz0HiRbBDQ4vGUhhi-l9cpcvgyrJmunv36PBejidlU4m-rCGOFe93waFU79ffcAbFgCU78i8PeZPP9qEBPg75K30Jx_j_xJY/s1564/32.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="430" data-original-width="1564" height="176" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq8E2ZiBwvTCKUIfQFG5fPV7O8i_kY5fY2DmozRgLCDYzFz0HiRbBDQ4vGUhhi-l9cpcvgyrJmunv36PBejidlU4m-rCGOFe93waFU79ffcAbFgCU78i8PeZPP9qEBPg75K30Jx_j_xJY/w640-h176/32.PNG" width="640" /></a></div><p></p><p><span style="color: #0b5394;"><span style="color: black;">It means while increasing cpu count, vROPS detected that new cpu value passed was 0. It means let's say current value is 2 and we or vrops asked it to be 0. That is why it is failing. <span style="color: #0b5394;"><br />Solution: </span><br />1. Check the VMware tool version, It should be running and up to date<br />2. Check the host CPU's core maximum capacity. How many max cores it can assign to any VM<br />3. Check esxi host's CPU family and other compatibility. Check this <a href="https://www.vmware.com/resources/compatibility/pdf/VMware_GOS_Compatibility_Guide.pdf" target="_blank">guide</a></span></span></p><p><span style="color: #0b5394;"><span style="color: black;"><br /></span></span><span style="color: #0b5394;"><span style="color: black;"><span style="color: red;">Problem2 :</span> Automation is not triggering<br /><span style="color: #0b5394;">Solution :</span> It has only one reason that automation is not enabled in Policy.</span></span></p><p><span style="color: #0b5394;"><span style="color: black;">If you have any other issues than above ones then feel free to comment out. I will try my best to help you out.<br /></span></span></p>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com2tag:blogger.com,1999:blog-3224609577145482350.post-18678289033249254072020-10-03T16:23:00.008+05:302020-10-03T21:20:39.374+05:30Automation | Add vCPU in VM if usage is more than 90%<p>Hi Guys,</p><p>I got this question from one of the VMware group so I thought to add it in my blog and then share. Automation of CPU addition is not tough but adding it with condition can be little challenging. You can do it with vROPS very easily but if you don't have vROPS then I have solution for you.</p><p>Pre-requisite is to enable hot add for CPU. <br /></p><p>Below is the base code- <br /></p><p>Connect-VIServer vcenter_ip<span style="color: #3d85c6;"> #to connect vcenter</span><br />$VM = Get-VM VM_Name <span style="color: #3d85c6;">#to get the vm name</span><br /><span style="color: #3d85c6;">#to convert the value in GHz. Default value comes in MHz</span><br />$maxcpu = ($vm.Extensiondata.Summary.Runtime.MaxCpuUsage)/1024<br /><span style="color: #3d85c6;">#to convert number of cpu into GHz speed. Here you need to replace 2.80 as per physical host's core speed at your end</span><br />$cpus = ($vm.Extensiondata.summary.config.NumCPU)*2.80<br /><span style="color: #3d85c6;"># to have percentage value</span><br />$cpulimit = $cpus*90/100 <br /><span style="color: #3d85c6;">#below is the hot add cpu command</span><br />if ($maxcpu -gt $cpulimit){<br />get-vm $vm | Set-VM -NumCpu 2 -Confirm:$false <span style="color: #3d85c6;">#Current value is 1 and it will change it to 2</span><br />}</p><p>Now the question is how to automate it,</p><p>you can create a loop so that it can run infinite. I have created below function<br /></p><p>Connect-VIServer vcenter_ip<br />Function AutoAddCPU{<br />$VM = Get-VM VM_Name<br />#to convert the value in GHz<br />$maxcpu = ($vm.Extensiondata.Summary.Runtime.MaxCpuUsage)/1024<br />#to convert number of cpu into GHz speed<br />$cpus = ($vm.Extensiondata.summary.config.NumCPU)*2.80<br />$cpulimit = $cpus*90/100 <br /><br />if ($maxcpu -gt $cpulimit){<br />get-vm $vm | Set-VM -NumCpu 2 -Confirm:$false<br />}<br />AutoAddCPU<br />}<br />AutoAddCPU <span style="color: #3d85c6;">#this is not a mistake. Use it as it is.</span></p><p><span style="color: #3d85c6;"><span style="color: black;">Now the problem is, how will it monitor that particular VM continuously.</span></span></p><p><span style="color: #3d85c6;"><span style="color: black;">Simple solution, use task scheduler from where you can access vcenter server. Add above script in task scheduler and then run it once, it will run forever.</span></span></p><p><span style="color: #3d85c6;"><span style="color: black;">Another problem is, what if that server or jump server restart then it will break the script. Solution is to create task scheduler to run this script at every system startup.</span></span></p><p><span style="color: #3d85c6;"><span style="color: black;">There must be many questions here. For example, you might need to monitor many VMs at the same time, you want to monitor the cpu usage if goes above than 95% and more....<br /></span></span></p><p><span style="color: #3d85c6;"><span style="color: black;">This is the base solution I have provided and can be customized or enhance as per individual need.</span></span></p><p><span style="color: #3d85c6;"><span style="color: black;">If you have such requirement too then feel free to write me back. Will be glad to assist. </span></span></p><p><span style="color: #3d85c6;"><span style="color: black;">If anyone wants the same thing from vrops then let me know, I will create one post on that as well. Using vrops is more authentic and efficient way to do it.</span> </span><br /></p><p><br /></p><p><br /></p>Gautam Joharhttp://www.blogger.com/profile/10890251936106071795noreply@blogger.com1