Preetam's profileVirtualization = > VMWar...BlogListsNetwork Tools Help

Blog


    February 16

    VM Provisioning

     

    Template is used for provisioning of VM's in VMware. Provisioning is inbuilt feature in VMInfra 3.0. Technically Template is a VM which cannot be powered ON. Templates/VMDK can be stored in Monolithic form or sparse file format.

    What is monolithic or spare file format ?

    lets take a example:  If you create a monolithic file format of 16 GB, totally 16 GB is claimed  at one go, But if you create sparse file format 16GB will be consumed as and when it is utilized. Templates can be stored in NFS/SVC Console/VMFS

    Templates can be created in two ways

    • Clone to template - Original VM is retained.
    • Convert to template - converts VM to template

    DEPLOY VM FROM TEMPLATE

     Connect to Virtual center via VI client

    Change the view to VM and Templates

    Right click the template and select deploy this VM from this template.

    Wizard will ask you VM's Name and Host on which you want to put this VM

    Next select resource pool

    Last you get option to customize OS.

    You can select YES /NO depending upon your choices.

    1) Select Template

    2) Select Datacenter and ESX Host

    UPDATING TEMPLATES:

    In case you need to include latest Hotfix/Patches into templates, you easily do it. In order to achieve this task. Select template and select convert to virtual machine. Once VM is powered ON, apply patches and etc. Convert the same VM back to template.

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    February 15

    VM Networking

     

    Virtual Switches uses software constructs implemented by VMKernel. VMKernel itself uses virtual switches to access iSCSI and NAS based storage and to implement VMotion.

    NIC Team, which is simply a virtual switch connected to 2 or more Physical NIC's. And NIC team provides automatic distribution of packets and failover.

    Each Switch is internal LAN, implemented entirely in software by the VMKernel. Internal only switch is used for network isolation for testing purpose for example Anti-virus software and IDS and One Box Firewall enviornment.

    Default number of ports on switch is 54, however one created during installation has 24 ports and maximum limit is 1024.

    The simplest way to give virtual machine access to network is to make virtual switch and associated it with outbound Phyical Nic. High performance application can benefit from NIC teaming which offers higher bandwidth and provide automatic load balancing and network fail over.

     

    There are three types of Network connections

    • Service console:Managing ESX hosts
    • VMKernel Port:For managing iSCSI and NAS devices
    • Virtual Machine port group:For accessing VM Networks

    More than one connection type can exist on a single virtual switch. Seperate IP Stacks are configured for the service console and the VMkernel, which means each port must be assigned with it's own IP address.

    When creating new virtual switch you have to specify connection type.

    All virtual switches are known as vSwitch# (remember S is captial, since LINUX is case sensitive), Each Port or Port group has a network label

    While Service console port are known as vSwif#

    Virtual Switch Properties

    General: Allows to configure number of ports

    Network Policies: VLAN,Security,Traffic Shaping and NIC Teaming.

    Network policies for virtual switch becomes default policies at port and port group level, which can be override at the respective level.

    To change the speed of the NIC card,

    Configuration Tab->Networking ->Properties->Network Adapters->Edit

     LittleBit about VLANS

    VLAN are a network layer 2 concept (the same layer at which MAC address and Ethernet live, one layer below IP addressing and routing). Smart L2 switches that can keep track of which ports belongs to which VLAN. In order to extend VLAN across switches, a trunk link must interconnect switches.

    ESX server provides VLAN support through virtual switch tagging, which is simply provided by giving port group VLAN ID. Then VMKernel takes care of all tagging and untagging as the packets pass through the virtual switches. VLAN ID is optional by default.

    Security:There are three security policies exception; Promiscuous [Default -Reject];MAC Address Changes [Default -Accept];Forget Transmits; [Default -Accept]

    Traffic Shaping:VM's Network Bandwidth can be controlled by Traffic Shaping. Traffic shaper only controls outbound network traffic only.To control inbound traffic, use a load-balancing system, or turn on rate limiting features of your router. Network traffic shaping is off by default. That is, each VM can consume as much outbound traffic as its guest is configured for. VM subject to these controls may exceed its average bandwidth and spike up to its peak bandwidth -but only enough to transmit data defined in Burst Size. 

    Port Group level: If you set average Bandwidth at 1000 kbps on a port group, then any VM connected to that port group can use an average bandwidth of 1000kbps

     

     

    Technorati tags: ,

    VMWare -License Information

     

    Host-based licensing

    Advantages:

    One less piece of Infrastructure

    sufficient for small organization

    Disadvantages:

    Licenses do not float

    features which requires virtual center cannot be used.

    ESX server features do not require Virtual Center nor a license server and are transferable.

    There are two types of licenses, Starter and Standard

    Starters License :

    1. Only 4 Processors
    2. 8 GB RAM
    3. No fiber channel or iSCSI storage available only Local and NAS
    4. VMFS (Virtual Machine File System) only on local storage
    5. Virtual Center Agent

    However you would be able to add few features using add-on license, seperate charges apply

    Standard License :

    1. No limitations on RAM and Processor
    2. Local/NAS/SAN/iSCSI storage available
    3. Virtual center agent
    4. VMFS

    Enterprize License :

    Standard License +

    1. VMotion
    2. VMWare HA
    3. VMWare DRS
    4. VCB (VMware consolidated Backup) (This is also available as add-on cost license)

    More information could be found at Doc ID: 5357713 under VMTN

    Technorati tags: ,

    January 29

    VMFS

    VMFS

    VMWare file system is a file system optimized for storing VM’s. A virtual disk stored on a VMFS always appears to the virtual machine as mounted SCSI device. VMFS store is used to ISO Images,templates.

    VMFS volumes are accessible in the service console underneath /vmfs/volumes directory

    To create VMFS datastore

    Configuration tab ->

    - > Hardware

    o Storage(SCSI,SAN and NFS)

    § Add Storage

    ScreenShot021.jpg

    Adding extends to datastore

    Datastore can span upto 32 physical disks. You generally wish to add extend when VM’s need more space or you need to create more space.

    To add one or more extend to the datastore

    Configuration

    Storage

    Properties

    Volume properties

    Extends

    ScreenShot022.jpg

    Select the disk which you want to add as an extend and click next

    If disk or partition you add was formatted previously, it will be reformatted and loose file systems and any data it contained.you have the option to decided the disk space to utilize.

    ScreenShot023.jpg

    To remove extends you will have to delete the entire VMFS, to remove VMFS, select VMFS and click remove. Make sure there no running VM’s on it. Removing datastore from the ESX server breaks the connection between system and storage device that holds the datastore and stops all functions of that storage device.

    Managing Paths for Fibre Channel and iSCSI

    ESX Server supports multipathing to maintain a constant connection between the server machine and the storage device in case of the failure of an HBA, switch, storage processor (SP), or cable. Multipathing support does not require specific failover drivers.

    To support path switching, the server typically has two or more HBAs available, from which the storage array can be reached using one or more switches. Alternatively, the setup could include one HBA and two storage processors so that the HBA can use a different path to reach the disk array.

    By default, ESX Server systems use only one path from the host to a given LUN at any given time. If the path being used by the ESX Server system fails, the server selects another of the available paths. The process of detecting a failed path and switching to another is called path failover. A path fails if any of the components—HBA, cable, switch port, or storage processor—along the path fails.

    sc_storage_manage_11_9_1.jpg

    The process of one HBA taking over for another is called HBA failover. The process of 1 SP taking over SP2 is called SP failover. VMware ESX Server supports both HBA and SP failover with its multipathing capability.

    Setting Multipathing policies for LUN’s

    MRU: Most recently used: [Default] which means once failover occur, we do not automatically failover. Recommended under Active/Passive storage devices

    Fixed: means ESX server will always try to use preferred path. Recommended under active/active storage devices

    ScreenShot026.jpg

    ScreenShot024.jpg

    ScreenShot025.jpg

    The ESX Server host automatically sets the multipathing policy according to the make and model of the array it detects. If the detected array is not supported, it is treated as active/active.

    NAS and NFS

    NAS is a specialised storage device that connects to a network and can provide file level access services to an ESX server. VMWare only support NFS for access file system over network.

    NAS is low cost and less infrastructure investment required than FC. NFS volumes are treated just like VMFS volume, can hold ISO/Templates and VM’s. ESX server supports

    - VMotion

    - Create VM

    - Boot virtual Machines

    - Mount ISO files

    - Create virtual machine snapshots on NFS mounted volumes. The snapshot feature lets you preserve the state of the virtual machine so you can return to the same state repeatedly.

    NFS client built into ESX server lets us access NFS Server and use NFS volume for storing VM’s.

    sc_storage_10_13_1.jpg

    When ESX Server accesses a virtual machine disk file on an NFS-based datastore, a special .lck-XXX lock file is generated in the same directory where the disk file resides to prevent other ESX Server hosts from accessing this virtual disk file. Don’t remove the .lck-XXX lock file, otherwise the running virtual machine will not be able to access its virtual disk file.

    NFS and Permission

    ESX server must be configured with a VMKernel port defined on a virtual switch. VMkernel port must be access NFS server over the network.

    /Etc/Exports defines the systems allowed to access the shared directory. The options used in this file are :

    Name of the directory to be shared

    Subnet allowed to access the share

    The root squash feature maps root to a user with no significant privileges on the NFS server, limiting the root user's abilities. This feature is commonly used to prevent unauthorized access to files on an NFS volume. If the NFS volume was exported with root squash enabled, the NFS server might refuse access to the ESX Server host. To ensure that you can create and manage virtual machines from your host, the NFS administrator must turn off the root squash feature or add the ESX Server host’s physical network adapter to the list of trusted servers

    If the NFS administrator is unwilling to take either of these actions, you can change the delegate user to a different identity through experimental ESX Server functionality. This identity must match the owner of the directory on the NFS server otherwise the ESX Server host will be unable to perform file level operations. To set up a different identity for the delegate user, acquire the following information:

    • User name of the directory owner

    • User ID (UID) of the directory owner

    • Group ID (GID) of the directory owner

    The delegate user is configured globally, and the same identity is used to access to every volume.

    Setting up the delegate user on an ESX Server host requires that you complete these activities:

    • From the Users & Groups tab for a VI Client running directly on the ESX Server host, either:

    • Edit the user named vimuser to add the correct UID and GID. vimuser is an ESX Server host user provided to you as a convenience for setting up delegate users. By default, vimuser has a UID of 12 and a GID of 20.

    • Add a completely new user to the ESX Server host with the delegate user name, UID, and GID.

    You must perform one of these steps regardless of whether you manage the host through a direct connection or through the VirtualCenter Server. Also, you need to make sure that the delegate user (vimuser or a delegate user you create) is identical across all ESX Server hosts that use the NFS datastore.

    To change the virtual machine delegate

    1 Log on to the VI Client through the ESX Server host.

    2 Select the server from the inventory panel.

    1. The hardware configuration page for this server appears with the Summary tab displayed.

    3 Click Enter Maintenance Mode.

    4 Click the Configuration tab and click Security Profile.

    5 Click Virtual Machine Delegate > Edit to open the Virtual Machine Delegate dialog box.

    2. Enter the user name for the delegate user.

    3. ScreenShot027.jpg

    6 Click OK.

    7 Reboot the ESX Server host.

    After you reboot the host, the delegate user setting is visible in both VirtualCenter and the VI Client running directly on the ESX Server host.

    Before you begin access NFS datastore you have to create VMKernel port manually.VMkernel port can be created on an existing virtual switch or as new connection on a new virtual switch