Friday, 27 September 2013

Extend Data Volume on a Windows Virtual Machine using VMware vCentre convertor

Already there is a method to do this task by extending the provisioned space but there we need to shutdown the server to add the hard disk,

This method doesn't need to shutdown the server to extend the virtual Drive.

Step 1:



Step 2:



Step 3:



Step 4:



Step 5:



Step 6: 



Step 7:



Step 8:



Step 9:




Thursday, 26 September 2013

Extend Data Volume on a Windows Virtual Machine (VMware ESXi)


I had an issue recently with my disk space, I was running out of space so I need to add more space to the virtual Disk, 

But i was thinking if i add another new virtual disk and meagre that with the existing one i may need to shut down the server once. 

But luckily i had fee provisioned space so, I just increased the virtual disk space and then followed the steps given below,

Its worked well, but I couldn’t add the space without shutting down the server in this method.  
1.
Add Additional Space to the Virtual Hard Drive
- Once connected, select your Virtual Machine from the Hosts & Clusters or VMs & Templates view.
- Click "Edit Settings"
- Select your Virtual Disk, and increase the Provisioned Space.
- Click OK
- Using the vSphere Client, connect to vCenter server or your host. 
2.
Extend the Volume
- Open a Command Prompt
- Use the following commands from the Microsoft KB 325590
DISKPART>list volume
(You'll see the volumes - note the vol number you want to expand)
(Or whatever volume number you're expanding)
(will extend to full amount of space available)
- Access your Server (either Open Console from the vSphere Client or RDP) 
c:\diskpart.exe 
DISKPART>select volume 1 
DISKPART>extend 
DISKPART>exit




Friday, 20 September 2013

Set up an FTP server on Amazon AWS EC2

You really don't need to set up an FTP server if you simply want to tranfer files between your EC2 instance and your local machine. You can use PSFTP (coming with putty package) with a saved putty session for your EC2 conection. Open a command window, type in psftp your_saved_putty_session_name. Type ec2-user for  login as and you are connected.


If you don't like commandline tool, you can use Filezilla instead. Download and install Filezilla client.  Lauch Filezilla. Click Edit -> Settings and select SFTP under Connction. Click Add Keyfile to add the private key file you use for putty connection. Click OK.


Click File -> Site Manager, Click New Site, enter your AWS EC2's public DNS or IP in Host field. Choose SFTP, enter ec2-user in User field and click Connect.

Now you are connected to your EC2 instance with FileZilla.


If you still want to set up an FTP server on your AWS EC2. Below are steps to install VSFTP.
  1. login to  your AWS management console.
    • Go to EC2 and click the Security Groups link.
    • Then choose the default group and switch to the inbound tab (at the bottom of the page)
    • Add the port ranges as above (20-21 and 40000-41000) and apply the rule changes
  2. connect to your instance with putty.
  3. login as ec2-user
  4. sudo su
  5. yum vsftpd
  6. change the conf file. vim /etc/vsftpd/vsftpd.conf. Add
    write_enable=YES 
    pasv_max_port=41000
    pasv_min_port=40000
    port_enable=YES
    pasv_enable=YES
  7. Add an FTP user (see instruction here)
  8. Start the FTP server. service vsftpd start

How to enable direct ssh to EC2 linux instance without keypair file

how to enable direct ssh to EC2 linux instance without keypair file
To enable the direct ssh to linux EC2 instance without using keypair file we have to edit the sshd_config file.
Follow the given below steps
Step 1 : Login into linux EC2 instance with the help of keypair. Use the user name which is related to your instance. for eg.
example:
ssh -i keypar_file.pem ubuntu@ec2-1.1.1.1.compute-1.amazonaws.com
Step 2: After login ,edit the /etc/ssh/sshd_config file and make the value of parameter called PasswordAuthentication as yes
vi /etc/ssh/sshd_config
change the PasswordAuthentication value as yes
PasswordAuthentication yes
:wq
save and exit
Step 3: Restart the ssh service.
In Debian or Ubuntu instance:
/etc/init.d/ssh restart
In CentOS or Red Hat instance:
/etc/init.d/sshd restart
Step 4: Open new terminal in your PC or laptop. ( Do not take the risk :) ,playing safe side )
Now try direct ssh without using keypair file.
for eg.
ssh ubuntu@ec2-1.1.1.1.compute-1.amazonaws.com

Wednesday, 18 September 2013

DNS Pointing

A (Host) records

A records (also known as host records or address records) point a domain name or subdomain to an IP address. For example, if you want your domain "domainnamegoeshere.com" to point to your home computer (whose IP address is, for example, 172.0.0.1), the A record would list "domainnamegoeshere.com", or "@" as the host and "172.0.0.1" as the "Points To" IP address. Entering "@" for the host name is the same as entering your domain name, minus the "www". Entering "www" for the host name is the same as entering your domain name, including the "www





CNAME records
CNAME records (also known as alias records) point a subdomain to an existing A (host) record so that the domain points to the appropriate IP address.
Entering "@" for the host name is the same as entering your domain name, including the "www".
The Points To Host Name should be defined as your domain name (i.e., "www.domainnamegoeshere.com") or "@" (Entering "@" will automatically insert your domain name as the host name for the CNAME Record). The Alias field should be the subdomain of your top-level domain the CNAME record points to your domain.
For example: If you want the CNAME record to point "www" within your domain to "www.domainnamegoeshere," you should enter "www" in the Alias field and "www.domainnamegoeshere.com" in the Points To field. If you want the CNAME record to point "email" within your domain to "email.domainnamegoeshere," enter "email" as the Alias and "email.domainnamegoeshere.com" as the Points To Host Name.
MX records
MX records are for routing email that is addressed to a particular domain name. Like a CNAME record, an MX record points one domain name or subdomain to another domain name or subdomain for which an A record exists.
Entering "@" for the host name is the same as entering your domain name, minus the "www." Entering "www" for the host name is the same as entering your domain name, including the "www".


NS records
NS records specify the authoritative nameservers (both primary and secondary) for the given domain. The authoritative nameservers are identified by name, not IP address. For this reason, an A record must exist for the specified nameservers. Without it, connecting to the servers might be impossible. In every DNS zone, there must be at least two NS records.

Friday, 13 September 2013

TIPS For SYSADMIN


TIPS For SYSADMIN

Open a New RDP session, 
mstsc /v:00.00.00.00 /admin
Replace 00.00.00.00 with your server's IP Address.

Server Mail Queue check
You can also run this on intdelivery.internal
sudo tail -f /var/log/mail.log | grep ServerName
It will monitor the last lines of the mail log and check for ServerName so you can see if mail is being delivered or failing

User details checking in AD
C:\Users\ssatchi>net user username /domain

Check machine is physical or virtual
Open command prompt and run the following command
systeminfo
This command will give you the full details of your system , scroll down to see the following information
system Manufacturer line,

If the system is a physical machine then you ll see
system Manufacturer  ASUS,DELL,HP

If the system is a virtual machine then you will see
system Manufacturer : VMware inc.
System Model : VMware virtual Platform.

If the system is a microsoft Hyper-V then you will see
system Manufacturer : Microsoft Corporation.
System Model : Virtual Machine

How many users are logged on/connected to a server?
On the Server
NET SESSION | FIND /C "\\"

On Remote Server
PSEXEC \\servername NET SESSION | FIND /C "\\"

When did someone last change his password?
H:\>net user saththiyan /domain | find /I "password last set"
Password last set            8/11/2013 5:32:27 PM


Is some one’s account locked ?
H:\>net user saththiyan /domain | find /I "account active"
Account active               Yes

Unlock the account


License capacity monitoring alarm triggered in vCenter Server

License capacity monitoring alarm triggered in vCenter Server
Symptoms
·    License capacity monitoring alarms are triggered in vCenter Server.
·    After upgrading to vCenter Server 5.x, license capacity monitoring alarms trigger.
·    This issue occurs even when license key counts in the Management tab are under capacity.

Note: To access the Management tab, Click Home Administration > Licensing. Click the Management tab and select the License key radio button.
Cause
This issue occurs because vCenter Server reports that vRAM licensing capacity is exceeded.
Resolution
This is a known issue affecting vCenter Server 5.x.

VMware has eliminated the vRAM restriction on licenses to VMware vSphere. For more information, see the Updated vRAM Policy. This alarm can be safely ignored or disabled.

To disable the alarm:
1. Log in to vCenter Server.
2. Select the vCenter Server at the top level (above Datacenter and Cluster).
3. Select Alarm Definition.
4. Locate the License capacity monitoring alarm.
5. Right-click the alarm and click Edit Settings.

6. In General tab, deselect the Enable this alarm option.


Thursday, 12 September 2013

Veeam Backup Error - 'Unable to release guest. Error: Unfreeze error

Veeam Backup Error - 'Unable to release guest. Error: Unfreeze error:'

Problem
Yesterday morning, I walked into the office, the boss told me a client's Exchange was running slowly and they had had a Veeam backup fail. I know this client well enough to know if it was something simple he would have fixed it himself, so while my laptop booted I armed myself with a coffee.

I connected to the Veeam backup server and this was the error.

Unable to release guest. Error: Unfreeze error: [Backup job failed. Cannot create a shadow copy of the volumes containing writer's data. A VSS critical writer has failed. Writer name: [Microsoft Exchange Writer]. Class ID: [{76fe1ac4-15f7-4bcd-987e-8e1acb462fb7}]. Instance ID: [{65ec880f-7b6a-402f-baf1-14d4de7f6fb9}]. Writer's state: [VSS_WS_FAILED_AT_FREEZE]. Error code: [0x800423f2].]
Error: Unfreeze error: [Backup job failed. Cannot create a shadow copy of the volumes containing writer's data. A VSS critical writer has failed. Writer name: [Microsoft Exchange Writer]. Class ID: [{76fe1ac4-15f7-4bcd-987e-8e1acb462fb7}]. Instance ID: [{65ec880f-7b6a-402f-baf1-14d4de7f6fb9}]. Writer's state: [VSS_WS_FAILED_AT_FREEZE]. Error code: [0x800423f2].]
Solution
1. OK that’s a huge error, but essentially it's complaining about the VSS writer on the Exchange server. Log onto the Exchange server, drop to command line and issue the following command;
vssadmin list writers
Chances are you will see the following;

If you look in the Event Log you will probably also see Event ID 2007.

Information Store (2544) Shadow copy instance 1 aborted.
2. To fix that you need to restart the Microsoft Exchange information store service.

3. Check again to make sure you are back up.

4. Note: We are backing up using Veeam, make sure there is no instance of the Symantec Backup Exec Remote Agent for Exchange, if it's there remove it.

5. Finally, I’ve got over 120GB of transaction logs to contend with, for the problem mail store, I’m going to enable circular logging to free up some room. (Note: You can disable this again once you have a decent backup if you wish).

6. At this point I rebooted both the Exchange server and the Veeam Backup server it then performed a backup of the Exchange server without error.

Tuesday, 10 September 2013

Updating VMware Tools fails with the error: Update Tools failed. Edit the virtual machine’s vmx file

Updating VMware Tools fails with the error: Update Tools failed. Edit the virtual machine’s vmx file


Symptoms

  • You are unable to update VMware Tools
  • Updating VMware Tools fails
  • You see the error:
    Update Tools failed. Edit the virtual machine's vmx file, add the line below and try again. Please read KB article 1714 on tips for editing a vmx file.
    isolation.tools.guestInitiatedUpgrade.disable = "FALSE"

Cause

This issue only occurs when using the update VMTools button from within the guest operating system.

Resolution

To resolve this issue, add the necessary setting to the virtual machine configuration file.
  • Go to Edit settings from VM
  • Go to Options
  • Go to General (picture 1)
  • Go to button Configuration Parameters (picture 1)
  • Go down to last rule and klik Add row (picture 2)
  • Put isolation.tools.guestInitiatedUpgrade.disable  in the Name field (picture 3)
  • Put FALSE in the Value field (picture 3)
  • Click OK and start VM
  • Now you can use the update tools button in the VM without errors
Picture 1
Picture 2
Picture 3

Http vs Https