Monday 6 February 2017

Move AD Databse to other location

Active Directory Site and Services with Replication
FSMO Roles-Move and Seize theory
Active Directory Group Policy-I


Hello Professionals,

Lab Setup:

1.Active Directory server-
2. Access and Availability of other drive.

It is very much recommended to perform cleanup and maintenance of database if you are facing performance issue in AD level. Before starting this activity make sure you have healthy system state backup of this Domain Controller, Copy of NTDS data with robocopy tool and double sure no AD database level critical error and make sure to export the output for comparison os permission of get-cacls or get-acl.
This activity some times improve the performance of Active Directory.

1. You can do this  with Directory services safe mode
2. Log in with Administrator Account and Stop the AD DS Service

Before moving of the AD database, first stop the AD DS service from Service console or command prompt. To Stop from command enter net stop ntds and it will ask your confirmation to stop finally. If you do this from service console it will pop up like this

Click Yes and it will stop all dependency service too.
Now open command prompt with Administrative Access and type ntdsutil
 then  activate instance ntds
  then files
 then type the drive path where you are planning to move, i did it for E Drive.
type  move db to E:\NTDS
 after this you will see on below its shows Move database is successfully.


Now will move the logs, type move logs to E:\NTDS
 and same it shows successfully.

and after this you can see all files moved to New Drive.

After all make sure to verify the permission level must be as were on old path.Then Start the AD DS service from command or from Service console.

At the time of activity the registry entries that Ntdsutil.exe updates when you move the database file are as follows:
In HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\
Parameters:
    Database backup path
    Directory System Agent (DSA) database file
    DSA working directory

At the registry entry that Ntdsutil.exe updates when you move the log files is as follows:
In HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\
Parameters:
    Database log files path

And in Event viewer you can see below alerts
Event ID 1046. “The Active Directory database engine caused an exception with the following parameters.” In this case, AD DS cannot recover from this error and you must restore AD DS from backup.Event ID 1168. “Internal error: An Active Directory error has occurred.” In this case, information is missing from the registry and you must restore AD DS from backup.
Feel free to comment, put a question and share it. We will be happy to assist.
Dont let sleep your zeal to learn and earn with share the knowledge.

 

Thursday 2 February 2017

ESXi Troubleshooting-I


Hello Professionals,

Requirement for lab setup:
 1. esxi host
 2.VCenter
 3. VI Tool Kit, download from here
 4. Vsphere Cli, download from here
 5. putty and updated version of powershell.

Today am going to share some interesting facts and point for esxtop command. which is used in esxi to see the performance in regard of vm, cpu, storage, memory and many more.
This command help to analyze the issue for cpu, memory, network or any issue with vm, the output can be analysed by VisualESXtop, perform and other tools available with vmware.
To see whats going on host level, will login to one of esxi host with putty. Remember to enable login with putty you have to enable ssh connections from security profile other wise it will not allow and give you error network refused on putty session.
After login and giving command for esxtop it will show you like this. where it will shows the current usage of esxi host.

it fetch the performance metrics from raw counters from VMkernel system info nodes.
and the description result stands for
ID – resource pool or VM ID of the running worlds resource pool or VM or world ID of running world.
GID – Resource pool ID of the running worlds resource pool or VM.
NAME –  name.
NWLD – Number of members in a running worlds resource pool or VM.
%USED – CPU core cycles used.
%RUN – CPU scheduled time.
%SYS – Time spent in the ESX(i) VMkernel on behalf of the resource pool, VM or world to processor interrupts.
%WAIT – Time spent in the blocked or busy wait state.
%RDY – Time CPU is ready to run, waiting for something else
High %RDY and high %USED can imply CPU over-commitment

By default esxtop will refresh result every 5 sec, and you can modify by command s 2 (that will refresh in 2 sec). Esxtop run with "interactive" mode by default and collect and assemble a report for cpu, memory, disk and network statistics. Here are some commands which help to collect the specific task.
c – CPU resource utilization.
m – memory resource utilization.
d – storage (disk) adapter resource utilization.
u – storage device resource utilization.
v – storage VM resource utilization.
f – displays a panel for adding or removing statistics columns to or from the current panel.
n – network resource utilization.
h – help.
o – displays a panel for changing the order of statistics.
i – interrupt resource utilization.
p – power resource utilization.
q – quit.
s – delay of updates in seconds. w – write current setup to the config file.
and the base command is esxtop [h] [v] [s] [a] [c file] [d delay]

By pressing O or o you can re-arrange the esxtop output like this.

 You can get access of esxi host by typing DCUI command on this putty session and perform the respective task.

 From this putty session you can do more configuration for esxi host also like change host name, IP configuration, DNS settings and more. To do this you need to type vi /etc/host and screen will appear like this.
 To modify here need to follow these lines
Without entering insert mode move to the character you want to change, press R, then press the key for the character you want to change to.   To save and quit press Esc, :, w, q. 
To delete any lines here, Press d twice to delete the whole line. You can also press x to delete only one character at a time when you are not in insert mode.
To see available commands here type cd /usr/sbin  then ls and the output will be like and many more are there.
 

To update and see the nic status

vmware –l shows version of vmware
esxcli system-- shows more details about vmware
esxcli storage--about storage
esxcli storage nfs list--if any nfs storage is there

There is a fantastic tool kit VI Toolkit which works with windows powershell. After installing VI Toolkit you will see a icon on your desktop just double click and it will show you like this.
 

To use this first you can have connect the vcenter by typing connect-VIServer and it will pop up and credential screen to login like
 
After successful login  this will be screen, you can see its show that you are connected with 443 port to vcenter with authorized user


Just type the get-VIcommand to see the available, there are lots of command to perform from vcenter level. Like show all vm, show only power on vm, show storage and many more.

Listing out some Known issues with VI Toolkit


The VI Toolkit (for Windows) 1.5 has the following known issues:(with Ref of Vmware Blogs)

Get-Datastore : (Get-Datastore).FreeSpaceMB might not return the actual datastore free space after a virtual machine is powered on. A refresh should be made first.

Get-Log : The output of Get-LogType cmdlet can not be pipelined to the Get-Log cmdlet.

Get-ScsiLunPath :When running Get-ScsiLunPath, the Scsi device can not be specified by name.

Get-VIEvent :When Get-VIEvent is run for entities other than virtual machines, an incorrect result is returned.
    When Get-VIEvent is run against an ESX host and a non-existing user is specified, a hundred entity records are returned.
    When Get-VIEvent is run against an ESX host whose time zone setting differs from the time zone setting of the local machine, no result is returned.
    Workaround: Run Get-VIEvent directly on the ESX host.

Get-View : Get-View might behave inconsistently depending on how the managed object is specified.
Get-VM :During the process of creating a template from a virtual machine, Get-VM returns both the virtual machine and template objects.

Get-VMHostFirmware:Get-VMHostFirmware can not be executed by users with read-only rights on the ESX or the VirtualCenter host.

Get-VMGuest: When Get-VMGuest is run against a virtual machine that is just starting, the properties of the returned VMGuest object are not filled at one time.

Invoke-VMScript: On 64-bit operating systems, Invoke-VMScript works only in 32-bit mode.
    Invoke-VMScript does not work if the guest operating system is installed on a hard drive different than C: or D:.
    Invoke-VMScript might hang when executed against a virtual machine running on ESX 3.0.

Move-Inventory:Move-Inventory does not work with virtual machine templates.

New-HardDisk: When New-HardDisk is run, the Split parameter can not be applied to the hard disk.
    New-HardDisk can not create an undoable disk on a powered on virtual machine.

New-VM: New-VM can not create virtual machines whose names contain special chars on VirtualCenter 2.0/ ESX3.0.

New-VMHostNetworkAdapter: New-VMHostNetworkAdapter cannot set the value of the MAC address on VirtualCenter 2.5 and ESX 3.5.
    New-VMHostNetworkAdapter does not accept object names as arguments for the VirtualSwitch parameter.
    Workaround: Pass to the VirtualSwitch parameter VirtualSwitch objects instead of their names.

New-OSCustomizationSpec :The operating system customization specifications with passwords created by New-OSCustomizationSpec, if edited with VIClient, throw errors when applied.

New-Snapshot: When invoked with the Quiesced switch parameter on, New-Snapshot creates a snapshot with Quiesced parameter value $false.

Remove-Template: When invoked with the DeleteFromDisk switch parameter on, Remove-Template is not executed synchronously.

Remove-VMHostNtpServer: The pipeline Get-VMHost | Get-VMHostNtpServer | Remove-VMHostNtpServer does not work.

Set-HardDisk: Set-HardDisk can not set the hard disk persistence to IndependentNonPersistent.

Set-ScsiLunPath: Set-ScsiLunPath does not work properly when the Active parameter is set to $false.

Set-VMHost: Set-VMHost throws an error when applied on a disconnected virtual machine host.

Set-VMHostDiagnosticPartition: Enabling a diagnostic partition with the Set-VMHostDiagnosticPartition cmdlet does not work on VirtualCenter 2.0/ ESX 3.0 platforms.

Set-VMHostNetworkAdapter:On VMware ESX 3.x/ VirtualCenter 2.x, the Set-VMHostNetworkAdapter cmdlet might take longer time to update the values of the FullDuplex and BitRatePerSec network adapter properties due to the hardware configuration being performed, and the object returned by Set-VMHostNetworkAdapter might still contain the current configuration instead of the updated one.

Set-VMHostSNMP: Set-VMHostSNMP fails to enable VMHostSNMP and to set the ReadOnlyCommunityString when called for the first time.
    Workaround: Run the command again.
    The default value of the Set-VMHostSNMP TargetPort parameter is a random number instead of the
     port  number.

    Set-VMHostSNMP does not take in account the value of the TargetPort parameter.

Update-Tools: Update-Tools might hang if the mouse, VGA, and network drivers are not signed. A standard Windows dialog appears and a manual interaction is needed.
Inventory Provider: The output of the dir command, run while the Inventory Provider is running, might be difficult to read.

Datastore Provider: Files can not be copied in or out the Datastore Provider.
VI .NET Toolkit: The ScreenDimensions property of the VMGuestInfo object is not populated.

Working on 64-bit Platforms:  Operations with ESX or VirtualCenter take long to complete when working on 64-bit platforms.
    Workaround: This is a .NET 2.0 issue and it is fixed in Service Pack 1. Install Service Pack 1 for .NET 2.0.

 I will be updating admin task which can be done with vi-toolkit with powershell very soon.
Pls do comment and reply on page if any query or explanation needed, will be happy to listen and solve your technical issues.

Always try to learn the thing which enhance your current role.


                                               

Wednesday 1 February 2017

HYPER-V Networking Concept

 

Hello Professional,



HYPER-V Networking Concept: 

There are 3 types of networking switch in HYPER-V

     1.External Virtual Network: This network is basically bound or connected with network card that is installed in physical host, and vms have access to access this adapter.In different and easy way to understand this network can be called as Management NIC.


    2.Internal Virtual Network: this is not bound with physical host network adapter. this is only being used to communicate with HYPER-V host and vm.  It mainly used for enabling ISCSI. To understand this is used to connect shared storage.

3.Private Virtual Network: This is being used to communicate between vm to vm only. This type of network can be also used in cluster network model.

The Hyper-V networking stack is smart enough to know that the traffic is going to another VM connected to the same switch and directly passes the traffic to the VM without ever touching the physical network adapter or physical network. This is very strong recommendation to use same nomenclature over all network while configuring the network switches, so that you can understand what switch is responsible for what work. if you migrate the vm from one host to another host, it will look for the same name to destination also and if this doesn't match the vm network adapter will show as disconnected network. In the designing part you have to spend good time decide the naming for HYPER-V infrastructure.Soon will be update configuration of switches.

Extensible Switches: This feature provide feature like port mirroring, DHCP server advanced configuration, Route extra feature, bandwidth feature and many more.Even enable Cisco Nexus 1000v which is available in VMWARE environment.In earlier version of Microsoft 2008 and 2008 R2 this was also not supported by HYPER-V but in 2012 Microsoft made it. Basically lots of other feature require when you are working with third part vendor and software in production and this feature enable the ability to manage efficiently.The Windows Server 2012 R2 extensible switch also supports hybrid forwarding, which allows packets to be forwarded to different forwarding agents based on the packet type.
There are other advanced options when you are managing HYPER-V from SCVMM server,that we will doing very soon.


We will be uploading more topics on HYPER-V management. Any query or question, please comment, we are very much available to listen and solve.

Don't let sleep your zeal to learn and earn.



The Vsphere Client Web server is initializing- Issue

Hello Professional,

Here is an issue i face where vsphere web server was showing this error.
Below reason could cause the issue

Issues:
1. Web server service is in starting status or
2. Web server service stuck at starting or
3. All service running but its taking too much time to respond on Web.

Solutions:
1 Wait to Stable the Vcenter Server as after reboot it take some time to be
    in normal behaviour.
2. Try to Restart Dependency service and check the Event logs or see if the
   ports are not in use with Netstat command.
3.What i found in the case, After Reboot all vmware services are running
   properly but it showing initializing. Because of vCenter Server is very
   hungry in regard of resources (Memory and CPU) so wait for 15-20
   minutes  to let this stable.

If none of the suggested solution works in your environment, please do let us know will be happy to assist you. Comment or reply.

Amazon Web Service Training



AWS Technical Training Syllabus
Hi professionals,
Started an introduction with AWS Training Session this week. Sharing starting syllabus now. You will be getting updates very soon on all the topics.   

1. Understanding of Networking concept:
        I.Virtual Private Cloud
              a. Characteristics and Infrastructure
              b. Creating and configuration
              c.Access Method
              d. VPC peering
              e. More Examples and Scenario

2. Groups and NACLs
            a.Layered security
            b.Configuration
            c.Understanding and configuring NACL

3.Understanding and Configuring VPC access
     a. What is VPC acces
     b. Direct Connection Menthod
     c. Configuring and understanding VPN
     d. More on with Configuration VPC Peering

4. What is EC2 Instance
    a. Introduction
    b. Functions and Importance in AWS

5. Elastic Block Storage
    a. What this mean
    b. What I/O stand here
    c. Instances- Configuring and Understanding

6. EBS Replication and Snapshot
    a. Characteristics
    b. Hands on Practical from console

7. Amazon S3
    a. Introduction
    b. Hands on from Console

8. Amazon S3 Website Hosting
    a. Static Website Hosting
    b. Configuring

9. Configuring ELB
    a. Introduction
    b. Deployment Scenario
    c. Configuration from Console

10. Auto Scaling
    a. Introduction
    b. Back-end Working Model
    c. Configuring

11. Route 53
    a. Introduction
    b. Relation with DNS
    c. DNS and Network Routing from Internal and External
    d. Hands on view from console

12. Identity Access Management
    a. Introduction
    b. Configuring
    c. Security Token services

13. Monitoring
    a. Introduction
    b. Configuring
    c. What terms used here Trusted Advisor

14. RDS HA and Load Sharing
    a. Introduction
    b. Configuring

15. Backup
    a. EBS Options
    b. S3 and RDS Backup