Showing posts with label vmware. Show all posts
Showing posts with label vmware. Show all posts
Typically some hosts from a resource pool can be in maintenance mode. In such situations customers can't wait till these hosts are out from the maintenance mode, neither can they stop new SRs ... However TSAM's bluecloud reservation is not aware that some hosts need to be skipped when trying to fit reservations.

In such cases, SRs will continue to fail for sitting on those hosts. Inorder to indicate to Bluecloud that a particular host must be skipped, set the "ignored-by-resource-broker" property to "true" for that host. This can be set from Maximo UI. Goto -> Service Automation -> Cloud Server Pool Administration. Select the required pool. From the Resource Pool Configuration tab, Goto the Resource Pool. Here you will be able to see the hosts included in this pool. For ever host to be ignored, check the "Is Failed" flag.

Why TSAM continues to select host for resource allocation requests even when the host is in maintaince mode ?


When you read the word snapshot what is the first thing that comes to your mind is , "A Photograph which preserves the best moments of your life". Technically snapshot is very much the same with the difference that it preserves the state of some digital resource. In VMware a disk "snapshot" is a copy of the VM's disk file (.vmdk) captured at a certain point in time. This snapshot preserves the disk file system and the files stored on it which can be of any type (including all the operating system files). So if something goes wrong with your virtual machine, you can restore it to a snapshot which was working previously.

One can also create snapshots for different versions/service-packs on an OS.
Hence snapshots can also be looked upon as version controlling mechanism at OS level. So if your computer was shut down abruptly or gets infected by virus, just revert to a snapshot.

So how do snapshots really work ? There's just one Thumb Rule to VMware's snapshot technology : "Snapshots only store the differences between the current state and the original state". It follows the copy-on-write scheme with every subsequent disk access. Lets try to understand what that means ...

Consider that you have a text file with the word "COMPUTING" stored in it.
This file is a sparse in nature : which means it spans across multiple blocks on the disk. Step 1 below demonstrates this scenario. The black lines indicate the links on to the stored data. For demonstration purpose lets consider that each block on disk has only one character.


Note : The blocks shown above contain only one character and is purely for example purpose. In real the block size could be of say 1MB or a sector on disk.
 
Now when you take a snapshot another file named Snapshot1.vmdk will be created. When you create a snapshot, any changes made on the original virtual disk image are not made on the original disk, but they are written to a new (snapshot) disk file. This action is very fast as there is no need to copy whole virtual disk image.

Thumb Rule : "While saving changed data blocks in a snapshot, all modified block will be saved first , followed by blocks which were deleted as compared to base disk blocks." As seen in Step 2 , blue block is linked at the end of the snapshot1.vmdk

Lets suppose that you take a snapshot after you have saved the word "COMPUTING" in the file. After the snapshot you modify the file by changing its last two blocks (letters N and G circled above) and clear the letter I. The new changed word is "COMPUTER" as show in the Step 2. The blue block above is nothing but an empty block created by deleting letter I. The blocks in RED represents the new snapshot1.vmdk disk which contains only the changed characters.

Thumb Rule : "While reading any file in current state read only the data accessible by first level links, irrespective of number of snapshots and original data of the file."

Reading the first links of the "Current State" disk from Step 2 (Green blocks) , word "COMPUTER" is retrieved and the size of snapshot1.vmdk is 3 blocks (2 filled and one empty). However since its a differential snapshot file its size is much less than original base disk (9 blocks).  Snapshot image size grows as you continue to change more and more data from your original virtual disk image (which remains untouched from the moment you took the snapshot).

Thumb Rule : "Size of a snapshot will always be less than the base disk, but in worst case it will be exactly the same size if all blocks were to be changed."


As seen in Step 3 , we now take another snapshot after saving the word "COMPUTER" in the file. On making more changes after snapshot2 , similar process is followed to create snapshot2.vmdk file. The new changed word in the file is  "CONTAINER". As a result now neither snapshot 1 nor the base file are written two, but are still referenced. Snapshot 2 will store the new changes as compared to snapshot 1. If you read the first level links of the green blocks from top to bottom , the word "CONTAINER" is read with the fact that only 5 letters are stored in snapshot2.

Below are the list of changes made to the file
--------------------------------------------------------------------------
Step1 - Base Disk  = COMPUTING
Step2 - Snapshot1 = COMPUTER
Step3 - Snapshot2 = CONTAINER

From the above scenarios its clear that taking snapshots in VMware involves only writing the differences in files changed from the time of the snapshot, not the complete virtual machine disk. This mechanism is similar to taking diff and patch in Unix, but in a more sophisticated way that diffs on a binary level with the knowledge of how a VMFS ( Virtual Machine File System ) is structured.

Now we have a clear idea about the Copy-On-Write Protocol - Every time a block from the base disk or previous snapshot is changed , copy it to the current delta or snapshot file, which implies that when you perform a snapshot restoration, it only has to rewrite the sectors that were modified since you took the snapshot. As a result snapshot revert is also super fast.

But the Question is, What happens when you revert to an older snapshot? The VM software throws away the contents of snapshot2.vmdk and starts over with  reading contents from snapshot1.vmdk. During this all the Blue links in Step3 are replaced with Green Links. ( this is a similar strategy followed in deleting a node from a linklist ... Pure programming stuff ). Note : Links to Snapshot1 and Base are not changed.

There are two more important aspects of Snapshot management : Discarding a snapshot and Merging a snapshot (reverting to a non-immediate parent snapshot).

A KB article from VMware on Snapshot management.
http://www.youtube.com/watch?feature=player_embedded&v=rj8ugLrmU-M

How do Virtual Machine Snapshots work in VMware

Host, Clusters and Resource Pools together form the skeleton for any virtualization technology so that the virtualization software (hypervisor) can consume it to present a virtual machine to the end user. They are the building blocks of any virtualization platform (eg: VMware). Just like a normal enterprise application would have a front-end , business logic & back-end , Virtualization Applications are also very similar.
Now the best part of Virtualization application in the above diagram is that, the last layer (Hardware) is dynamic - in the sense that resources can be added and removed as per the needs.

A host is nothing but a high-end physical computer with only computing and memory resources. The number of CPUs for a Host is fixed , however there is an option of increasing or decreasing the RAM for a Host (with a constraint to max upper-limit ). Storage or data-stores can be added to the Host as per the need. This entire concept of host is same as that a physical desktop or laptop. But a host is much powerful than a desktop/laptop. 

For example : A host with 4 dual-core CPUs each running at 3 GHz  and 32GB of memory will have 24GHz (dual-core = 4x2 ) of computing power and 32 GB of RAM available for running virtual machines on top of the host.

Now how do we scale this ??? You guessed it right ... combine multiple hosts together. This is nothing but a Cluster. So if a Cluster has 4 hosts then a total of 24GHz * 4 = 96 GHz computational power , 32 GB * 4 = 128 GB of RAM is available for Virtualization

How does clustering help ? Now the hypervisor software sees the each underlying hardware as a single entitiy. Which means if we want to create a Virtual Machine with 50GHz computational power and 50GB RAM then creating it with a single host is not possible. However creating it on a cluster is possible. One can relate Cluster as a solution to the problem of Defragmentation. Lets see this :



So what's a resource pool ? Well its grouping of resources like CPUs and Memory to that they can be allocated as per the business needs for a particular department in the company.  Which means it makes more sense to create a group of resource pools from a cluster than a individual hosts. Resource Pools are dynamic and hence resources reserved can be dynamically changed, modified or removed. Lets consider a scenario of a Software Company Project with one manager , two developers and three test engineers.

Any Resource Pools can be partitioned into smaller
Resource Pools at a fine-grain level to further divide and assign resources to different groups or for different purposes .

Obviously more machines and resources will be required by the test team inorder to test a piece of software on different operating systems. Comparatively developers would require lesser number of VMs but each VM should be powerful enough. We can easily load balance the resources as the team expands or shrinks. If the development team is not utilizing the resources to its peak and the test team needs more CPU/RAM , we can easily adjust the resource pool.

As a result resources are not wasted if they are not being used to their max capacity.Hence resource pools can be nested, dynamically reconfigured and organized hierarchically .

Individual business units can use their own dedicated infrastructure while still benefiting from the efficiency of resource pooling. Isn't this something like an " À la carte " where we use resources only as per the requirement.

What are Hosts, Clusters and Resource Pools

VMware's vSphere has become the Virtualization standard for any company wanting to run its IT infrastructure in a virtualized mode. Tracing the roots of VMware back to year 2001 when the company launched its first product "ESX 1.0" which stands for "Elastic Sky X" ( Not sure what is really means ). The real essence is to maximize the hardware utilization by making use of hardware on a sharing basis between different Virtual Machines sitting on top of the ESX software which runs on a bare metal machine and not on top of a third part OS.
ESX 1.0 supported 1 CPU , 2GB of Memory, upto 5GB/s of network speed and a massive 5000 IOPS (Input/Output operations per second). Since then till the current release of vSphere 5.0 ( after EX1, ESX2 new release was named as Virtual Infrastrure 3 which then was re-named to vSphere 4 for the next release) these metrics have changed drastically.
VSphere 5 has a support for 32 CPU, 1000GB of Memory, upto 36 GB/s of network speed and 1,000,000 of IOPS. Thats the beauty of VMware and the innovation in the hardware world.

VMware is everywhere, starting from Military infrastructure to Banking to Public Transport Systems.Every IT organization is using VMware/Virtualization to reduce its IT costs and achieve its "Cost to Value" goal. The infographic gives better picture of the ancestors of vSphere 5.0



Hardware, Software & now VMware is currently the third most important word in the IT dictionary.

VMware Product History on a Timeline

Lets play around the Solaris virtualization technology by Oracle (SUN) known as Jumpstart - a network installation tool-set used by Solaris for virtualising the SPARC/x86 hardware for Solaris operating systems. Ever imagined on how to take OS snapshots for Solaris considering the fact that its mostly deployed on SPARC architecture ? How to remotely deploy Solaris OS over the network ? How to backup all the operating system data from one Solaris machine and deploy it over another machine ? How can we have an automated mechanism to do all the above steps ? Well Jumpstart is the answer to your questions.

Did you know there's something known as Kickstart for Linux based operating systems only ... to be discussed in future articles.For now lets jump back to Jumpstart ...

Why Jumpstart ?

} Simplifies - the way Solaris installations are done on 'N' machines
} Speed - Faster than the traditional manual method of CD-ROM installation
} Adminless - Allows unattended installation
} Replication - easily replicate systems across the organization/institution

Lets try to understand the Jumpstart scenario for Intel (x86) based machines.
Jumpstart consists of 2 main parts :
{ network booting of a system } and  { network installation }

Ingredients for setting up Jumpstart on x86 based machines or VMware :

1. One Virtual Switch - helps create a private network on existing VMware setup
2. Two Solaris 10 machines on x86/vmware hardware (one server and one client)
      - Server plays the role of DHCP server + Boot Server + Installation Server
      - Client will boot from DHCP server and start the installation/clone deployment process

3. One NFS / HTTP / FTP machine to store captured data or FLAR files (optional but recommended to have a separate machine to store captured images)

Note : You don't want other machines on your VMware setup to boot from Jumpstart's DHCP server and mess up your critical environment, hence create a virtual switch to isolate your Jumpstart setup.

Here's a sample image of how your setup would look like ...



Setup two machines with Solaris 10. While installing Solaris 10 make sure that you select "Entire Group" option so that all packages are installed.
If you are using a virtual switch to isolate your environment you will need to setup a DNS server also using the DNS packages for Solaris.The DNS machine can be of any flavor windows or linux.

Consider the two machines as Server and Client.On the Server you need to follow the below steps :

1. Create install and configuration directories


# mkdir –m 755 /export/jumpstart /export/jump_sol10
# chown root:root /export/jumpstart /export/jump_sol10
# cat /etc/dfs/dfstab share –F nfs –o ro,anon=0 /export/jumpstart share –F nfs –o ro,anon=0 /export/jump_sol10 ^D
# shareall


2. Copy the solaris operating system media

# mount -F hsfs -o ro /dev/dsk/c0t0d0s2 /mnt
# ls /mnt/
Copyright License boot
JDS-THIRDPARTYLICENSEREADME Solaris_10 installer
#
# mkdir /export/install
# cd /mnt/Solaris_10/Tools/
# ./setup_install_server /export/install/
Verifying target directory…
Calculating the required disk space for the Solaris_10 product
Calculating space required for the installation boot image
Copying the CD image to disk…
Copying Install Boot Image hierarchy…
Copying /boot netboot hierarchy…
Install Server setup complete
#

3. Create sysidcfg file in install directory

# mkdir /export/config
# vi /export/config/sysidcfg
system_locale=C
timezone=Europe/Madrid
terminal=vt100
keyboard=Spanish
security_policy=none
root_password=s0yZy.w98CEO6
timeserver=localhost
name_service=none
network_interface=nge0 { hostname=hostname_of_your_client
protocol_ipv6=no
netmask=255.255.255.0
default_route=10.164.5.254}
nfs4_domain=dynamic
#

Now export the NFS where the files are stored :

# more /etc/dfs/dfstab

# Place share(1M) commands here for automatic execution
# on entering init state 3.
#
# Issue the command ‘svcadm enable network/nfs/server’ to
# run the NFS daemon processes and the share commands, after adding
# the very first entry to this file.
#
# share [-F fstype] [ -o options] [-d ""] [resource]
# .e.g,
# share -F nfs -o rw=engineering -d “home dirs” /export/home2
share -F nfs -o ro /export/config
#
# shareall
#
# share
- /export/config ro “”
- /export/install ro,anon=0 “”
#

4. Create Profile and rules.ok file

creating the profile file :

# cd /export/config/
# vi profile1
install_type initial_install
system_type standalone
cluster SUNWCXall
# format the entire disk for Solaris
fdisk all solaris all
# define how the disk is partitioned
partitioning explicit
filesys rootdisk.s0 6144 /
filesys rootdisk.s1 4096 swap
filesys rootdisk.s7 free /partition7
#

creating the rules file :

# cd /export/config
#
# vi rules
hostname hostname_of_your_client – profile1 -
#

Now run the "check" file to validate the profile and rules.ok file

# cd /export/config/
# cp /export/install/Solaris_10/Misc/jumpstart_sample/check /export/config/
# ls -l
total 130
-r-xr-xr-x 1 root root 63082 Sep 14 17:19 check
-rw-r–r– 1 root root 364 Sep 14 17:12 profile1
-rw-r–r– 1 root root 30 Sep 14 17:08 rules
-rw-r–r– 1 root root 289 Sep 14 17:05 sysidcfg
# ./check
Validating rules…
Validating profile profile1…
The custom JumpStart configuration is ok.
# ls -l
total 132
xr-xr-x 1 root root 63082 Sep 14 17:19 check
-rw-r–r– 1 root root 364 Sep 14 17:12 profile1
-rw-r–r– 1 root root 30 Sep 14 17:08 rules
-rw-r–r– 1 root root 56 Sep 14 17:19 rules.ok
-rw-r–r– 1 root root 289 Sep 14 17:05 sysidcfg
# more rules.ok
hostname hostname_of_your_client – profile1 -
# version=2 checksum=2581
#

5. Create /tftpboot

# mkdir –m 711 /tftpboot
# chown root:root /tftpboot

Also uncomment the line in /etc/inet/inetd.conf

#tftp … /usr/sbin/in.tftpd in.tftpd -s /tftpboot

6. Start system daemons
Restart the following daemons :
NFS daemons
in.rarpd
rpc.bootparamd
inetd

7. Configure the DHCP server

# dhcpconfig -D -r SUNWfiles -p /var/dhcp
Created DHCP configuration file.
Created dhcptab.
Added “Locale” macro to dhcptab.
Added server macro to dhcptab – galdospr.
DHCP server started.
# svcs -p dhcp-server
STATE STIME FMRI
online 18:30:39 svc:/network/dhcp-server:default
18:30:39 7687 in.dhcpd
# dhcpconfig -N 10.164.5.0 -t 10.164.5.254
Added network macro to dhcptab – 10.164.5.0.
Created network table.
#

8. Add the IP of your client

# pntadm -A 10.164.5.13 -c hostname_of_your_client -f DYNAMIC -m 10.164.5.0 -y -s IP_OF_YOUR_SERVER
#

9. Add the client to the JumpStart configuration

Add the client to the JumpStart configuration with the add_install_client script
available options :
-p : directory where the sysidcfg file resides
-d : specify as a DHCP client
-e : ethernet/MAC address
-c : directory where the rules.ok file resides

# cd /export/install/Solaris_10/Tools/
# ./add_install_client -d -c YOUR_SERVER_IP:/export/config -p YOUR_SERVER_IP:/export/config -e YOUR_CLIENTS_MAC_ADDRESS i86pc

Adding “share -F nfs -o ro,anon=0 /export/install” to /etc/dfs/dfstab
copying boot file to /tftpboot/pxegrub.I86PC.Solaris_10-1

If not already configured, enable PXE boot by creating
a macro named 0100E0815F2C07 with:
Boot server IP (BootSrvA) : YOUR_SERVER_IP
Boot file (BootFile) : 0100E0815F2C07
#

Create the following macro (the name contains the MAC address of the client) to enable the PXE boot, as mentioned in the output of the previous script :

# dhtadm -A -m 0100E0815F2C07 -d ‘:BootFile=0100E0815F2C07:BootSrvA=YOUR_SERVER_IP:’
#

10. Final touch

activate the tftp boot service

# svcs ‘*tftp*’
STATE STIME FMRI
online 18:16:15 svc:/network/tftp/udp6:default
#

modify the vfstab

# grep tftp /etc/vfstab
/export/install/boot – /tftpboot/I86PC.Solaris_10-1 lofs – yes ro
#

add_client script creates a menu.lst file , modify that to add the "-install dhcp" option

# more /tftpboot/menu.lst.01080027701392
default=0
timeout=30
title Solaris_10 Jumpstart
kernel /I86PC.Solaris_10-1/multiboot kernel/unix – install dhcp -B install_config=YOUR_CLIENT_IP:/e
xport/config,sysid_config=YOUR_CLIENT_IP:/export/config,install_media=YOUR_CLIENT_IP:/export/install
module /I86PC.Solaris_10-1/x86.miniroot
#

DONE ... now just reboot your client and wait until it boots from network

.

Solaris Jumpstart on VMware and x86 machines

Virtual machines on VMware ESX* hypervisors can communicate with each other via Virtual Switches, using the same protocols, as used on physical switches. A Virtual Machine (VM) can have multiple Ethernet adapters each with a unique IP address,thus imitating properties same as that of a physical computer.

Virtual Ethernet Adapters are one of the key features of VMware Hypervisor stack. This allows a VM to communicate with another VM and with other virtual switch. Shown below is the video tutorial by rocksolidtechnical on how to create a Virtual Switch on VMware.


Diagrammatically we can represent the multiple VMs communicating via Virtual Ethernet Adapters and Virtual Switches.Note the VMs are also capable of communicating with the outside physical network.


Creating a Virtual Switch on VMware

IBM Software CTO Anant Jhingran talks about total cost of ownership and the value IBM and VMware extend to their customer.




VMware Virtualization and IBM

Computers which are idle or not in use but are "Switched ON" are wasting energy which an organization has to pay for. That not fair ... According to stats, in United States alone , more than 3.2 billion dollars worth of energy is wasted annually by not shutting down or reducing the power state of computers when not in use. How to save this money ? Few countries and many US states have implemented energy savings rebate programs to encourage corporations to adopt Greener IT practices.

Efficient Power Management with Shavlik

+