Wednesday, December 24, 2014

vSphere 5.1 vs vSphere 5.5


How to Resize a VMs Virtual Disk (.VMDK)




When you created your virtual machine you of course created the number of disks and their sizes as per the requirements, best practice guidelines or just your best estimation for its use. However, as requirements change and the amount of data in your virtual machine grows, from time to time you need add additional storage. How do you resize the virtual disk (.VMDK)?

 Resizing virtual disks is relativley straight forward. However, as with anything before making changes ensure you have a backup (especially when making changes to disks).

Note: You cannot change the disk size if you take a snapshot, plus if there was an issue with the disk the snapshot would be useless anyway.

Another thing to be aware of is you can only INCREASE the size of a virtual disk. You cannot reduce the size of a virtual disk, VMware does not currently allow it as it could risk losing data. If you want to reduce the disk size you could either use VMware converter to copy the VM and resize the disks at the same time or create a new smaller virtual disk and copy the data over to it.


To Increase the size of a virtual disk (.VMDK):
1. Shutdown the virtual machine.
2. Right click on the virtual machine and select "Edit Settings".
3. On the "Hardware" tab, select the virtual disk you would like to resize and in the "Capacity" section enter the required size.



 






                                
We are not finished yet. If you boot the virtual machine now the OS will not see the new size, it will only see the old size. You need to expand the volume into the new free space. Below are two methods of doing this, and depding on the guest OS and your preference depends which one you will choose.
 
Method 1 (Windows DISKPART) will of course only work in windows.
Method 2 (GParted) will work for any OS, including Linux and Unix provided as the filesystem type is supported by your chosen partitional utility.



Method 1 (Windows DISKPART):
1.
Click Start --> Run and type "diskmgmt.msc"
2. You will see the free space after your volume.




 













3. Use DISKPART to extend the volume into all the free space:
diskpart
list volume
select Volume 0
extend
exit






.












 
4. You will now see the volume has been extended to use all the free space
















Method 2 (GParted):
To resize the partition on the disk use your favourite partition resizing tool. If you dont have one mine is GParted, which there is a live CD for.
Download the GParted Live CD

1. Click on the "Options" tab and go to "Boot Options".

2. Tick "Force BIOS Setup" (This will boot into the BIOS screen when the VM is powered on - This is so that you can mount and ISO image before the OS boots.)
3. Click Ok to reconfigure the virtual machine.











4. Connect the ISO image or connect the CD drive with your GParted Live CD (This is easier with force BIOS option set in step 5).










5. Boot into GParted and you will see the current partion in the now much larger disk.












6. Right click on the partion and select "Resize/Move".











7. Resize the partion to fill entire remaining space and click "Resize/Move".














8. Click "Apply" to run the resize task. After sometime depending on the size the task will complete.
9. Reboot the computer, remove the CD and boot into the OS.












10. Depending on the OS it may perform a disk check.

11. You should now see the disk has been resized.




Wednesday, December 17, 2014

Install VMware ESXi 5




Step 1: You will get the following screen once server started. Press Enter to Continue to boot from the CD Drive.

Next it will start to loading the ESXi installer.

The following screen shows the initialization of ACPI.

Step 2: Press Enter to Start the installation.

Step 3: Press F11 to accept the license and continue.

Step 4 : Select installation Drive and Enter to Continue.

Step 5:  Select the Keyboard Layout and Enter to Continue.

Step 6: Type the root password in the two fields, then press Enter to Continue.

Step 7: Press F11 to start the installation.

Now it is installing the VMware ESXi.

Step 8: Enter to reboot after the installation.

Step 9: Now the installation is over. You can find the following image displaying the ip address (IP address is DHCP)  for managing this host.

Go to your web browser and type the url according to the ip address, in this case http://192.168.1.10.
If you visit the address that is mentioned in you Esxi 5 server, you will get the following screen.

from the above you can find vSphere 5 client requires for managing the ESXi 5 host.

Monday, December 15, 2014

Install Windows 7 in VMware Workstation


                             VMware Workstation is a hypervisor that runs on x64 computers; it enables users to set up one or more virtual machines (VMs) on a single physical machine, and use them simultaneously along with the actual machine.

Creating a Virtual Machine:

 

Let’s begin by opening VMware Workstation from the Start menu. Alternatively, you can type, “VMware” in the instant search field and select VMware Workstation from the list of programs.


Next, click File | New | Virtual Machine. A wizard appears to create a new virtual machine as shown  

 Click “Next” and choose how you want to load Windows 7. You can load it from installation media (DVD) or you can use an ISO image. For the purposes of this article, we will use an ISO image.

 Next, select “Installer disc image file (ISO)” and browse to where your Windows 7 ISO image resides. Click “Next” and enter the Windows 7 product key.

Note: You can optionally personalize Windows 7 with a user and password.

 Click “Next”, and enter a virtual machine name and choose a location for your virtual machine to reside. You can simply accept the defaults and move forward in the installation.


Click “Next” and accept  the default disk size of 40 GB. You can increase or decrease this size as you see fit.
Experimenting with different sizes will help you obtain your sweet spot for all Windows 7 virtual machines. Additionally, you have the option of splitting the virtual machine in 2 GB files; this will help when moving your virtual machines between computers.


Click “Next” and you can customize your virtual machine hardware prior to beginning the Windows 7 virtual machine Operating System (OS) load .
For example, you can add disks, serial ports, and printers. You can also remove unnecessary hardware such as floppy drives and sound cards .

 Customizing Virtual Machine Hardware.
 Click OK and Finish and Windows 7 begins to load (Figure 9). Since you entered the product key, VMware Workstation enters an “Easy Install” mode. Just sit back, relax, and a Windows 7 virtual machine is installed.


Working with a Virtual Machine

Now that your virtual machine (Figure 10) is ready, you can use it like it was a physical computer. If you choose View | Full Screen, you can work with your virtual machine a full-screen mode. Other options you have when working with virtual machines is the following:
  • Power On a Virtual Machine
  • Power Off a Virtual Machine
  • Suspend a Virtual Machine into Memory
  • Snapshot a Virtual Machine

Sunday, December 14, 2014

Anatomy of VM files


                  VMware virtual machine files are organized in the Virtual Machine File System (VMFS).you'll notice that most of the files start with the actual name of the VM, followed by different file extensions that denote the file type. 

 The .vmx file : Configuration file in text format, which means you can open it and read it

                    This file contains all of the configuration information and hardware settings of the virtual machine. Whenever you edit the settings of a virtual machine, all of that information is stored in text format in this file. This file can contain a wide variety of information about the VM, including its specific hardware configuration (i.e., RAM size, network interface card info, hard drive info and serial/parallel port info), advanced power and resource settings, VMware tools options, and power management options.


VMDK files. Disk related files, includes .VMDK, -delta.vmdk, -rdm.vmds

                    All virtual disks are made up of two files, a large data file equal to the size of the virtual disk and a small text disk descriptor file, which describes the size and geometry of the virtual disk file.

                    The different types of virtual disk data files that can be used with VMware virtual machines are:

  • The -flat.vmdk file : This is the default large virtual disk data file that is created when you add a virtual hard drive to your VM.
  • The .vmdk header file: text descriptor file
  • The -delta.vmdk file : These virtual disk data files are only used when making snapshots. When a snapshot is created, all writes to the original -flat.vmdk are halted and it becomes read-only.
  • The -rdm.vmdk file :
    This is the mapping file for the raw device mapping (RDM) format that manages mapping data for the RDM device.
The .vswp file. VM's swap file

                 When you power on a VM, a memory swap file is created that can be used in lieu of physical host memory if an ESX host exhausts all of its physical memory because it is overcommitted. 

The .vmss file : virtual machine suspended state file.

                This file is used when virtual machines are suspended and is used to preserve the memory contents of the VM so it can start up again where it left off. 

The .vmsn file : VM snapshot file

                This file is used to store the state of a virtual machine when a snapshot is taken. A separate .vmsn file is created for every snapshot that is created on a VM and is automatically deleted when the snapshot is deleted.

The .vmsd file:  VM snapshot database file

                 This file is used with snapshots to store metadata and other information about each snapshot that is active on a VM. The snapshot information in a VMSD file consists of the name of the VMDK and VMSN file.

.NVRAM -- Consider this file the BIOS of the virtual machine.

When a virtual machine is created and not powered on, these are its files:







When a virtual machine is powered on, these are its files:









When a virtual machine is powered on ans has a snapshot, these are its files:
 

 

Saturday, December 13, 2014

Type 1′ hypervisor and a ‘Type 2′ hypervisor

Type 1 hypervisor (Bare-Metal Architecture) – This is a hypervisor that runs directly on a given hardware platform. A Guest OS then runs at the second level above the hardware. The classic type 1 hypervisor was CP/CMS, developed at IBM in the 1960s. Often quoted examples of this type are Xen, VMware’s ESX Server and IBM’s LPAR hypervisor (PR/SM)..


Type 2 hypervisor (Hosted Architecture) – This is a hypervisor that runs within an OS environment. A Guest OS then runs at the third level above the hardware. Some examples quoted of this type are VMware Server and Linux KVM.