November 4, 2009

Virtualization Basics

Virtualization is a framework or methodology of dividing the resources of a computer into multiple execution environments, by applying one or more concepts or technologies such as hardware and software partitioning, time-sharing, partial or complete machine simulation, emulation, quality of service, and many others.

A virtual machine is a tightly isolated software container that can run its own operating systems and applications as if it were a physical computer.

A virtual machine is a tightly isolated software container that can run its own operating systems and applications as if it were a physical computer. A virtual machine behaves exactly like a physical computer and contains it own virtual (ie, software-based) CPU, RAM hard disk and network interface card (NIC).

Virtual Machines Benefits
  1. Compatibility

  2. Isolation

  3. Encapsulation

  4. Hardware Independence

Isolation

While virtual machines can share the physical resources of a single computer, they remain completely isolated from each other as if they were separate physical machines. If, for example, there are four virtual machines on a single physical server and one of the virtual machines crashes, the other three virtual machines remain available. Isolation is an important reason why the availability and security of applications running in a virtual environment is far superior to applications running in a traditional, non-virtualized system.

Encapsulation

A virtual machine is essentially a software container that bundles or “encapsulates” a complete set of virtual hardware resources, as well as an operating system and all its applications, inside a software package. Encapsulation makes virtual machines incredibly portable and easy to manage. For example, you can move and copy a virtual machine from one location to another just like any other software file, or save a virtual machine on any standard data storage medium, from a pocket-sized USB flash memory card to an enterprise storage area networks (SANs).

Hardware Independence

Virtual machines are completely independent from their underlying physical hardware. For example, you can configure a virtual machine with virtual components (eg, CPU, network card, SCSI controller) that are completely different from the physical components that are present on the underlying hardware. Virtual machines on the same physical server can even run different kinds of operating systems (Windows, Linux, etc).

Compatibility

Just like a physical computer, a virtual machine hosts its own guest operating system and applications, and has all the components found in a physical computer (motherboard, VGA card, network card controller, etc). As a result, virtual machines are completely compatible with all standard x86 operating systems, applications and device drivers, so you can use a virtual machine to run all the same software that you would run on a physical x86 computer.


Loading...

September 16, 2009

Convert or Import VMWARE Workstation images (VMX) to ESX Server

Introduction:

Convert or import Vmware workstation images VMX files to ESX Server images.

Ex: Windows Server 2003 SP2

Prerequisites:

a. VMware workstation

b. VMware ESX Server Credentials

c. VMware Converter

d. Download sysrep files from Sysrep files for windows server 2003 sp2 and install it.

VMWARE Converter:

1. Download VMware converter from http://www.vmware.com/products/converter/ and install VMware converter on local machine

2. Open VMware converter from Start > Programs > VMware > VMware Converter

Step 1: Source

1. Select Source Type as “Other” from the source drop down list.

2. Give Source VM or Image: Virtual Machine name and location of the VMWARE Workstation image (VMX ) file

a. Ex : \\172.16.226.8\vmwares\win2k3sp2

3. Source Data: If you want to increase or decrease disk space of VMX file, go to Volume: Drop down list and change the size of your machine drives.

Step 2: Destination

1. Select Destination Type as “Vmware infrastructure Virtual Machine” from the destination drop down list.

2. Destination Login: Specify the VMware ESX Server IPAddress, Username and Password

3. VMName: Give the Virtual machine name ex : Win2k3Sp2

4. Select Host: (ESX SERVER NAME)

5. Data store : Gives the details of space available in the ESX Server

6. Networks : Select No of Nic cards for your ESX SERVER Image machine

Step 3: Customization

1. Select Install Vmware Tools (which enhances your resolution and timing functionalities)

2. Select “Customize identity of the VM”

3. Instead of restarting your VMware machine for NetBIOS name and other details. Give computer name or NetBIOS name , Owner name, organization and location of sysrep files ( Deploy folder contains sysrep.exe file)

4. Give the product ID : KEY information or you can continue with the default options

5. Select Time Zone as per your time location

6. Select “Nic” network adapter

7. Give workgroup or domain details

8. Continue with the default options

Wait for 10 to 30 mins, and then you can start using converted image with your VMware workstation or Server.

TIPS:

1. How to increase or decrease the size of the Vmware machine?

Ans: You can increase or decrease the size of the C: or D: drives of your Vmware by following steps in Step1: Source > Source data (3rd step)

2. Where to find sysrep files in the system?

Ans: Download Sysrep files for windows server 2003 sp2 exe and install it. Search for deploy.cab files. Extract these files and give the location of the deploy.exe file.

How to convert Host or Vmware images to Vmware images

Introduction :


Automate and simplify physical machine to virtual machine conversions as well as conversions between virtual machine formats with VMware vCenter Converter. You can convert Physical machine or Vmware images or Server images to Virtual images.

Ex: Windows Server 2003 SP2


Prerequisites:

  1. Vmware workstation or Server software
  2. Download sysrep files from Sysrep files for windows server 2003 sp2 and install it.


For details, Refer the below link

http://docs.google.com/View?id=d3dh9rq_16gkh667df

How to Convert Physical Machine to VMware Machines

How to convert Host or Vmware images to Vmware images height="500" width="100%" > value="http://d1.scribdassets.com/ScribdViewer.swf?document_id=22398173&access_key=key-1ivp1aatuxbmv66b9oyx&page=1&version=1&viewMode=list">

Configuring SQUID Proxy Server on LINUX

Introduction:

Squid server is a popular open source proxy and web cache. It has a variety of uses, from speeding up a web server by caching repeated requests, to caching web, name server query, and other network lookups for a group of people sharing network resources.

It is primarily designed to run on Linux / Unix-like systems. Squid is a high-performance proxy caching server for Web clients, supporting FTP, gopher, and HTTP data objects. Unlike traditional caching software, Squid handles all requests in a single, non-blocking, I/O-driven process.

Prerequisites:


a. Linux Machine Ex: RHEL5
b. squid-2.6.STABLE6-3.el5.i386.rpm

Installation on Linux
Use the following command to install SQUID RPM

# Rpm –ivh squid-2.6.STABLE6-3.el5.i386.rpm
Squid Basic Configuration
Squid configuration file located at /etc/squid/squid.conf. Open file using a text editor: with the following command.
# vi /etc/squid/squid.conf
Squid Configuration:
-------------------------------------------------------------------------------------------------------
Basic SQUID Config file: Uncommented lines

Cmd : > grep -v "^#" /etc/squid/squid.conf | sed -e '/^$/d' Port

http_port 3128 # Port

hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY


ACL Parameters :
acl password proxy_auth REQUIRED
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 631 # cups
acl Safe_ports port 777 # multiling http
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT

Access Parameters
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow password
http_access deny all
icp_access allow all
visible_hostname CARMASQUIDProxy #You can change the name of the Proxy Server

No Authentication Configuration:
Specify the command for the external authenticator. Such a program reads a line containing "username password" and replies “OK" or "ERR" in an endless loop. If you use an authenticator, make sure you have 1 acl of type proxy_auth. By default, the authenticator_program is not used.
Change the http Access Parameter from http_access deny all to http_access allow all
Restart SQUID Proxy Server process

# /etc/ini.d/squid restart

Stopping squid: ................ [ OK ]
Starting squid: . [ OK ]

IE Proxy Server Configuration:

1. Open Internet Explorer
2. Go to Internet Options > Connections Tab > LAN Settings > Proxy Server
3. Enter IPAddress and Port of the SQUID Proxy Server
4. Try Accessing http://www.google.com
5. Done.
-------------------------------------------------------------------------------------------------------
Basic Authentication Configuration:

Specify the command for the external authenticator. Such a program reads a line containing "username password" and replies "OK" or "ERR" in an endless loop. If you use an authenticator, make sure you have 1 acl of type proxy_auth. By default, the authenticator_program is not used.
Add the following configuration parameter to squid config file enable Basic Authentication.

auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/basic_passwd

Generate a basic authentication password file for any user “basic”

# htpasswd -c /etc/squid/basic_passwd basic
New password:
Re-type new password:
Adding password for user basic

Username: basic
Password file: /etc/squid/basic_passwd

Restart SQUID Proxy Server process
# /etc/ini.d/squid restart

Stopping squid: ................ [ OK ]
Starting squid: . [ OK ]

IE Proxy Server Configuration:

1. Open Internet Explorer
2. Go to Internet Options > Connections Tab > Lan Settings > Proxy Server
3. Enter IPAddress and Port of the SQUID Proxy Server
4. Try Accessing http://www.google.com > Enter Username and password (basic) > Authenticate it
5. Done.

Digest Authentication Configuration:

Specify the command for the external authenticator. Such a program reads a line containing "username password" and replies "OK" or "ERR" in an endless loop. If you use an authenticator, make sure you have 1 acl of type proxy_auth. By default, the authenticator_program is not used.
Add the following configuration parameter to the squid config file to enable Digest Authentication.

auth_param digest program /usr/lib/squid/digest_pw_auth -c /etc/squid/digest

Create a digest.sh file to generate digest using the following script.

/etc/squid/Digest.sh
-------------------------------------------------------------------------------------------------------
#!/bin/sh
user=$1
pass=$2
realm=$3

if [ -z "$1" -o -z "$2" -o -z "$3" ] ; then
echo "Usage: $0 user password 'realm'";
exit 1
fi

ha1=$(echo -n "$user:$realm:$pass"|md5sum |cut -f1 -d' ')
echo "$user:$realm:$ha1"
-------------------------------------------------------------------------------------------------------
Give executable permissions to the above create file.

# chmod +rwx /etc/squid/digest.sh
#./digest.sh username password 'Squid proxy-caching web server' >>/etc/squid/digest

Generate a digest for the user “Admin” with the password “password”

#./digest.sh admin password 'Squid proxy-caching web server' >>/etc/squid/digest

Restart SQUID Proxy Server process

# /etc/ini.d/squid restart

Stopping squid: ................ [ OK ]
Starting squid: . [ OK ]

IE Proxy Server Configuration:

1. Open Internet Explorer
2. Go to Internet Options > Connections Tab > LAN Settings > Proxy Server
3. Enter IPAddress and Port of the SQUID Proxy Server
4. Try Accessing http://www.google.com > Enter Username and password (Digest) > Authenticate it
5. Done.