Archive for the ‘VMware’ Category


Problem :

I experience this snapshot error with VEEAM backup and replication. For both  the error ,one single solution worked for me .

Error :

1) Consolidating virtual machine snapshots fails with the error: Change tracking target file already exists 

or

2) Creating Snapshot failed : The virtual disk is either corrupted or not a supported format.

 

Resolution :

To resolve this issue, the CBT files need to be moved out of the working folder of the affected virtual machine(s).

To move the CBT files and consolidate snapshots:
  1. Connect to the ESXi host that the virtual machine is running on using SSH.
  2. Navigate to the virtual machine folder using this command:

    cd /vmfs/volumes/datastore/virtual_machine/

  3. List the contents of the directory using the ls command and look for .ctk files.
  4. Create a temporary directory for the CBT files.

    For example:

    mkdir tmp

  5. Move the CBT files to this directory with this command:

    mv *-ctk.vmdk tmp/

  6. Run the snapshot  again.
Advertisements

Experiencing this issue first thing in the morning while provisioning some VD in an existing pool . Then also tried to create a new pool and issue remains the same . Tried the following KB from vmware but doing some mistake at the end while editing pae_moid attribute . Please note you need to put vm-<MOID> to get it work . I need to log call with vmware support for this .

KB location : http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2004269

In View Administrator a View desktop has a status of “Provisioned (Missing)”

Symptoms

  • In View Administrator, a View desktop has a status of Provisioned (Missing).
  • In vCenter, the View desktop is present and is fully functional.
  • You cannot log in into the View desktop.

Cause

A common cause for this issue is if a vSphere/vCenter administrator had previously removed a View VM from inventory and later added it back into inventory. This can cause the View VM to get a different MOID (Managed Object ID) within vCenter. The VM’s MOID now differs between the vCenter database and VMware View’s ADAM database.

Resolution

To resolve this issue, you must make the VM’s MOID in the ADAM database match the vCenter MOID. To make the MOIDs match:

Note: The MOID in vCenter is in the form of a number. In the ADAM database, the number is preceded by vm-.

  1. Determine the VM’s MOID within the vCenter Database:
    1. Connect to the vCenter Database.
    2. Execute this query:

      Select id from vpx_entity where name='<Name of the VM>'

      This returns the VM’s MOID as seen by vCenter.

  2. Determine the VM’s MOID in the ADAM database on the View Connection Server:
    1. Log in to the machine hosting your VMware View Connection Server through the VMware Infrastructure Client or Microsoft RDP.
    2. Open the ADAM Active Directory Service Interfaces Editor:
      • Windows 2003: Go to Start > Programs > ADAM > ADAM ADSI Edit.
      • Windows 2008: Go to Start > All Programs >Administrator Tools > ADSI Edit.
    3. Right-click ADAM ADSI Edit and click Connect to.
    4. Ensure that Select or type a domain or server is selected and that Destination points to localhost.
    5. Select Distinguished Name (DN) or naming context
    6. Type dc=vdi, dc=vmware, dc=int.
    7. Run a query against OU=Servers, DC=vdi, DC=vmware, DC=int with this string:

      (&(objectClass=pae-VM)(pae-displayname=<Virtual Machine name>))

      Note: The <Virtual Machine Name> can use * or ? as a wildcard to match multiple desktops.

    8. Double-click the CN record for the VM you want to edit.
    9. Scroll down until you see the pae-MOID attribute.
    10. Double-click pae-MOID
    11. Change the pae-MOID to match the VM’s MOID as seen in vCenter.
    12. Restart the Connection Server service for the changes to take effect.

Each disk drive for a virtual machine consists of a pair of .vmdk files. One is a text file containing descriptive data about the virtual hard disk, and the second is the actual content of that disk. For example, a virtual machine named examplevm has one disk attached to it. This disk is comprised of a examplevm.vmdk descriptor file of under 1 KB, and a 10 GB examplevm-flat.vmdk flat file which contains virtual machine content.

This article helps you to recreate a lost virtual disk descriptor file.

Detailed steps

To create a virtual machine disk:

  1. Log into the terminal of the ESXi/ESX host:
  2. Navigate to the directory that contains the virtual machine disk with the missing descriptor file using the command:# cd /vmfs/volumes/myvmfsvolume/mydir

    Note:

    • If you are using a version of ESXi, you can access and modify files and directories using the vSphere Client Datastore Browser or the vifs utility included with the vSphere CLI. For more information, see the section Performing File System Operations in the vSphere Command-Line Interface Documentation.
    • If you are using VMware Fusion, the default location for the virtual machine files is the home/Documents/Virtual Machines.localized/virtual_machine/ folder, where home is your home folder, and virtual_machine is the name of the virtual machine.
  3. Identify the type of SCSI controller the virtual disk is using. You can do this by examining the virtual machine configuration file (.vmx). The controller is identified by the line scsi#.virtualDev, where # is the controller number. There may be more than one controller and controller type attached to the virtual machine, such as lsisas1068 (which is the LSILogic SAS controller), lsilogic, or buslogic. This example uses lsilogic:scsi0.present = “true”
    scsi0.sharedBus = “none”
    scsi1.present = “true”
    scsi1.sharedBus = “virtual”
    scsi1.virtualDev = “lsilogic”
  4. Identify and record the exact size of the -flat file using a command similar to:# ls -l vmdisk0-flat.vmdk

    -rw——- 1 root root 4294967296 Oct 11 12:30 vmdisk0-flat.vmdk

  5. Use the vmkfstools command to create a new virtual disk:# vmkfstools -c 4294967296 -a lsilogic -d thin temp.vmdk

    The command uses these flags:

    • -c sizeThis is the size of the virtual disk.
    • -a virtual_controllerWhether the virtual disk was configured to work with BusLogic, LSILogic (for both lsilogic and lsilogic SAS) or IDE.
    • -d thinThis creates the disk in thin-provisioned format.

    Note: To save disk space, we create the disk in thin-provisioned format using the type thin. The resulting flat file then consumes minimal amounts of space (1 MB) instead of immediately assuming the capacity specified with the -c switch. The only consequence, however, is the descriptor file contains an extra line that must be manually removed in a later step.

    The temp.vmdk and temp-flat.vmdk files are created as a result.

  6. Delete temp-flat.vmdk, as it is not needed. Run the command:# rm temp-flat.vmdk
  7. Rename temp.vmdk to the name that is required to match the orphaned .flat file (or vmdisk0.vmdk, in this example):# mv temp.vmdk vmdisk0.vmdk
  8. Edit the descriptor file with a text editor:
    1. Under the Extent Description section, change the name of the .flat file to match the orphaned .flat file you have.
    2. Find and remove the line ddb.thinProvisioned = “1” if the original .vmdk was not a thin disk. If it was, retain this line.# Disk DescriptorFile
      version=1
      CID=fb183c20
      parentCID=ffffffff
      createType=”vmfs”

      # Extent description
      RW 8388608 VMFS “vmdisk0-flat.vmdk”

      # The Disk Data Base
      #DDB

      ddb.virtualHWVersion = “4”
      ddb.geometry.cylinders = “522”
      ddb.geometry.heads = “255”
      ddb.geometry.sectors = “63”
      ddb.adapterType = “lsilogic”
      ddb.thinProvisioned = “1”

      The virtual machine is now ready to power on. Verify your changes before starting the virtual machine.

      If powering on the virtual machine is not successful, see Troubleshooting a virtual machine that is unable to power on (2001005).

  9. To check the disk chain for consistency, run this command against the disk descriptor file:For ESXi 5.0:
    # vmkfstools -e filename.vmdk

    For a complete chain, you see output similar to:
    Disk chain is consistent

    For a broken chain, you will see a summary of the snapshot chain and then an output similar to:
    Disk chain is not consistent : The parent virtual disk has been modified since the child was created. The content ID of the parent virtual disk does not match the corresponding parent content ID in the child (18)

    For ESXi 3.5/4.x:
    # vmkfstools -q filename.vmdk

    For a complete chain, you see output similar to:
    filename.vmdk is not an rdm

    For a broken chain, you see output similar to:
    Failed to open ‘test-000001.vmdk’ : The parent virtual disk has been modified since the child was created (18)

Ref : http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1002511


We were getting the following error at the summery tab on each ESXi host .

  • ESXi host shows the error:

    ESXi Shell for the Host has been enabled

  • ESXi host shows the error:

    SSH for the host has been enabled

Go the solution from this KB. Hope this helps.

 

Ashraf


Just a quick solution on a error while I was installing vMa 5 . The ovf was deployed ok but while trying to power the vMa on , it was coming up with the following error on the screen .

“Power On virtual machine <VM name> Cannot initialize property ‘ vami.DNS0.vSphere_Man- agement_Assistant_(vMA)’ , since network ‘<network name>’ has no associated IP pool configuration.”

Solution :

– Edit the vMA virtual machine’s properties .

– go to Options, vApp Options and select disable.

– Acknowledge the warning and click OK to close the VM properties.

-Start vMa . It should be ok now.

 

 

 

How to disable firewall from ESXi

Posted: February 18, 2013 in VMware
Tags: ,

Was trying to disable firewall option from ESXi . Though it was not recommanded but need to do that for a specific reason . First I tried with “chkconfig” but it was not listed there .However it was listed with  “esxcli” command . Here is how you do it .

esxcli network firewall set --enabled false

 

 


Was looking for solution to increase the persistent disk space for a user today who was running out of space. I am using view 4.5 . Very easy to set the configuration to reflect the new size is future deployment of a pool . But need to do some manual work for already provisioned VM . It will a bit of pain if you already have few vm deployed already. Not sure if there is any work around but will check in future.

To start with the pool needs to be changed if all future pool machines need to selected HDD  , do the following .

1. Login to the VMware View Administrator.
2. Select the pools from the ‘Inventory.
3. Select Edit from the top menu tabs
4. Under View Composer Disk change the value of Persistent disk size to the required value
5. Click OK

From now on any new deployed vm will get the edited Persistent HDD size.However already provisioned VM from that pool will still have the old persistent HDD.Do the following fow those VM.

1. Login to the vSphere Client
2. Select the virtual machine that needs to be changed and right click selecting Edit Settings…
4. Select the Hard disk that is the current persistent disk. Make sure you are changing the right HDD . You can double check the HDD name from Vmware View Administrator console.
5. In the Disk Provisioning section change the Provisioned Size to the required size
6. Click OK.

Now restart the virtual machine and login to this with a username that got Administrative right.Then do the following.

1. Click Start and the right click on Computer selecting Manage
6. Select Disk Management
7. Select the disk to be change and right click selecting Extend Volume…
8. Click Next
9. Click Next
10. Click Finish
11. Close the window and logoff the machine

Now check the Persistent disk space from my computer to make sure you are getting the right HDD size.

Ashraf