Find Out Windows SID (Security Identifier) of a Windows Machine:


SID stands for Security Identifier; it is a security principle of the Microsoft Windows network. If you have
created a windows based network then each computer on the network will have a unique SID and that SID is used to identify an object, such as, a user or a group of users in the network. Whenever any specific user in the network tries to access any particular resource, the SID of the requesting user is checked to verify whether the user is authorized to access the resource or not.

Find out the SID of a Windows Computer:

It is very hard to find out the SID of the computer because you need to be a registry geek for this purpose. Instead, you can try out PsGetSid, a free command line utility which lets you view and change the SID.
Download it from the Micosoft website, and then open the command prompt in the administrator mode and run the following command to find out the SID of your machine.

Psgetsid



Shrink a VMware Virtual Machine Disk (VMDK)



In fact, increasing the size of a VMware Virtual Machine Disk (VMDK) is straightforward, and is supported in the vSphere Client, by selecting the virtual hard disk, and increasing the size using the up arrow. or typing in a new value.

However, you cannot shrink the disk in this way, it’s not supported. The only supported method of shrinking a VMware virtual machine disk (VMDK) is to use VMware vCenter Converter Standalone and create a virtual to virtual (V2V)
conversion, a similar process to a Physical to Virtual (P2V) conversion.

The following procedure should be followed to shrink the VMware VM Disk:

1.      RDP to the VM for which the disk size is to be reduced.
2.      Select Disk Management, and select the partition you need to shrink.
3.      Right Click the Volume/Partition to shrink, and select Shrink.
4.      Enter a size to reduce the OS partition.
5.      In this example the VMware virtual machine disk (VMDK) is 30GB, and we would like to reduce the size of the VMware virtual machine disk (VMDK) to 20GB.
6.       Enter the figure 20 (GB) x 1024 = 20480
7.       Now you can see an unallocated 20 GB space on the virtual disk
8.       Power OFF the Virtual Machine, and navigate to the datastore path where the VMware virtual machine disk (VMDK) is located using Putty
9.       We need to edit the *.vmdk, which is the descriptor file, which contains the variables for the size of the *.-flat.vmdk.
10.  The number mentioned under the heading #Extent description, after the letters RW, defines the size of the VMware virtual disk (VMDK).
11.  We wanted to reduce the size of the VMware virtual machine disk (VMDK) from 40 GB to 20 GB. So the value we need to enter into the descriptor file is:-

20 GB = 20 * 1024 * 1024 * 1024 / 512 = 41943040

12.   Using vi, edit the descriptor file, and change the number from 125829120 to 41943040, and save the file.

125829120 is calculated from 80 GB = 80 * 1024 * 1024 * 1024 / 512 = 125829120

13.   Migrate or Copy the virtual machine to another datastore.
14.   After the virtual machine disk (VMDK) has been moved, you will notice the disk size reflects the desired size of 20GB.
15.   After restarting the virtual machine, and checking with Disk Management, you will notice the 20 GB unallocated storage space, has been removed, and disappeared.

How to copy a VM host to host without vCenter


Login to both ESXi hosts that you are copying from and copying to and make sure SSH is enabled.

Make sure the SSH service is started and allowed in ESXi Firewall on both the hosts.

Now ssh into the esxi host 1 which has the VM that needs to be transferred.

Lets give that host ip 10.1.1.1 and the Host 2 that’s going to receive the file will be 10.2.2.2.

You can SSH into the host 1 using putty(win) or terminal (mac)

#ssh root@10.1.1.1
The authenticity of host '10.1.1.1 (10.1.1.1)' can't be established.
RSA key fingerprint is b2:d6:00:34:aa:cc:62:95:8f:d7:f3:1d:59:1e:c3:54.
Are you sure you want to continue connecting (yes/no)? yes

then it will prompt for Password: so enter that.

Start transferring folder:

nohup scp -rv /vmfs/volumes/data-store1/vm-folder-name root@10.2.2.2:/vmfs/volumes/data-store2/

For Multiple VMs (Folders)

First change directory to the Datastore folder

cd /vmfs/volumes/data-store1/

nohup scp -rv vm-folder-1 vm-folder-2 root@10.2.2.2:/vmfs/volumes/data-store2/

Then it’s better to enter multiple VMs leave just a single space between the VM folder name. No quotes or commas.
Now you will be prompted for “host 2” password. enter that and the file transfer will start. The flags used here are -rv, where r is for folder tranfer and v for verbos to watch the progress.

Note: Adding nohup before scp will allow the command to run in background even if you close Terminal/Putty window.

Purpose of Native VLAN in Cisco UCS

Issue:

We have created a service profile that contains 1 vNIC and it is placed in VLAN XX.  I have installed Windows 2008 on a blade using this service profile.  In the OS I have assigned static IP for the NIC in VLAN XX.  From the OS, we cannot ping another device that is in VLAN XX. We cannot ping a host on another VLAN as well.  If we place a check on VLAN 1 as the native VLAN, we still cannot ping anything.  If we place the check for native VLAN to VLAN XX, I can ping hosts within the same VLAN as well as outside the VLAN.  So, why do I need to place VLAN XX as the native VLAN when all my trunks are set up as VLAN 1 being the native VLAN?

Solution:
When allowing certain VLANs on your Service Profile vNICs, you need to set the native VLAN. This is because the way you have it configured currently you're only "allowing VLAN XX, but you're not tagging it. This would work fine for ESXi or any other Hypervisor where you can assign the dot1q tag at the host.  With Windows unless you have specific drivers doing the tagging for you, you'll need to do this at the vNIC level within UCS.
Two ways to see this in action.  When creating a service profile in the "Basic" method - not "Expert", you will select a single VLAN for your interfaces.  This will treat the interfaces pretty much like an "Access Port".  Conversely when you use the "Expert mode you're enable the vNIC as a trunk, in which you will "allow" all the VLANs you'd like access to. Sounds like this is the method you have performed.
For a Windows OS, set the VLAN as Native for the VLAN you want it to access and you'll be sweet.  Unchecking that "Native VLAN" option box is allowing the traffic to traverse out of UCS on the Native VLAN of your network - VLAN 1, which is why it's MAC appears on the other fabric under VLAN1


vSphere 5.x Storage vMotion does not rename virtual machine files on completing migration

Symptoms
  • You rename a virtual machine in the VMware vSphere Client, but the .vmdk disks are not renamed following a successful Storage vMotion task.
  • You perform a Storage vMotion of the virtual machine to have its folder and associated files renamed to match the new name. The virtual machine folder name changes, but the virtual machine file names do not change.
Resolution
  1. Log in to the vSphere Client as an Administrator.
  2. Click Administration > vCenter Server Settings.
  3. Click Advanced Settings.
  4. Add this advanced parameter key:

    provisioning.relocate.enableRename
  5. Set the value to:

    true
  6. Click Add.
  7. Click OK.
  8. Restart the VMware VirtualCenter Server service for the changes to take effect. For more information, see Stopping, starting, or restarting vCenter services (1003895).

"RPC server Unavailable" error while trying to RDP

Try putting this registry key in your regedit if you get the above error:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server

Create a new keyword selecting Dword and name it as IgnoreRegUserConfigErrors
Now double click it and give a value as 1

Now try doing an RDP it should work for you .

This issue is normally seen in 2003 servers and the fix works mostly on 2003 servers

Extend System Partition on a Windows Server 2003 VM using Dell ExtPart

There is no native tool that enables extending system partitions (C:\ drives) on Server 2003. There are multiple ways to perform this task using Third party tools, however, the only method that can be done online utilizes a Dell utility called ExtPart. It can perform the extension of the system partition with no downtime although sometimes booting into Safe Mode and then running ExtPart is necessary to clear locks on the disk.
NoteThis applies to Server 2003 only, newer versions of Windows do not suffer from this limitation, Disk Management as well as the diskpart are able to extend system partitions on-the-fly.
1.   The first step is to download the ExtPart utility from this link. Click on the Download File link and save it to your desktop. The file is a self-extracting zip file called ExtPart.exe per the below:
2.   Double-click on it and accept the default path it will extract the utility to.
3.   Click on Unzip and the files will be extracted successfully.
To demonstrate how useful ExtPart is we will use an example whereby our demo VM has a 12 GB C:\ drive and it needs to be increased to 25 GB. A screenshot of the the current state of the C:\ drive is below: 

Ensure that you have 13 GB of unallocated space to next to C drive to extend the partition.
Now we need to run the ExtPart utility expand the C:\ drive so that it utilizes the 13 GB of unallocated space. To proceed, open the command prompt and go to the location where you extracted the ExtPart utility, in my case, C:\dell\ExtPart:
C:\>cd C:\dell\ExtPart

Then run ExtPart.exe:
C:\dell\ExtPart>extpart.exe

Enter the volume that is being expanded, in this example it is the C:\ drive so enter just C: without the backslash:
Volume to extend (drive letter or mount point): C:

Then enter the amount in MB to increase the volume by, I entered 13312:
Size to expand the volume (MB): 13312

The output will confirm the new size of the volume (C:\ drive), which is 25101 MB:
New volume size          :25101 MB (26320895488 bytes)

The full sequence of commands can be seen in the screenshot below:

When going back into Disk Management and re-scanning the disks you can see that the C:\ drive is using all of the provisioned space in the disk:


If the utility returns an error such as “the disk is not accessible” or “unable to connect to C:” then reboot the VM into Safe Mode and then run the same ExtPart commands. This is caused by various services locking the disk and preventing ExtPart from extending the volume. Booting into Safe Mode starts up the OS in a clean state, so only minimal services and drivers will run, thereby allowing ExtPart to expand the volume without interruption.

Link to download DELL Basic Disk Expansion, v.1.0.4, A01