Irfan Salam

Latest ICT news, Technology Reviews and Tutorials

Category Archives: Virtualization & Cloud Computing

Dropbox Hits 200M Users, Unveils New “For Business” Client Combining Work And Personal Files

Recreating a missing virtual machine disk (VMDK) descriptor file

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. You may need to recreate missing header/descriptor files if:

  • The virtual machine disk file listed in the Datastore Browser is your virtual machine’s flat file, and does not have an icon.
  • When powering on a virtual machine, you see a File not found error.
  • The flat file exists when viewing the virtual machine’s directory via the terminal, VMware vSphere Management Assistant (vMA), or VMware Command-Line Interface (vCLI).
  • The disk descriptor file for the virtual machine’s disk does not exist or is corrupted.
  • In the virtual machine’s vmware.log file, you see messages similar to:

    Jul 22 09:22:32.141: vmx| DISKLIB-LINK : “myvm.vmdk” : failed to open (The system cannot find the file specified).
    Jul 22 09:22:32.141: vmx| DISKLIB-CHAIN : “myvm.vmdk” : failed to open (The system cannot find the file specified).
    Jul 22 09:22:32.141: vmx| DISKLIB-LIB : Failed to open ‘myvm.vmdk’ with flags 0xa (The system cannot find the file specified).
    Jul 22 09:22:32.142: vmx| Msg_Post: Error
    Jul 22 09:22:32.142: vmx| [msg.disk.fileNotFound] VMware ESX Server cannot find the virtual disk “myvm.vmdk”. Please verify the path is valid and try again.
    Jul 22 09:22:32.142: vmx| [msg.disk.noBackEnd] Cannot open the disk ‘myvm.vmdk’ or one of the snapshot disks it depends on.
    Jul 22 09:22:32.142: vmx| [msg.disk.configureDiskError] Reason: The system cannot find the file specified.

  • In the /var/log/hostd.log file of the ESX 5.0 host, you see messages similar to:

    2011-07-13T17:59:48.704Z [74258B90 info ‘Libs’] FoundryVMDBPowerOpCallback: VMDB reports power op failed for VM /vmfs/volumes/4e1
    c0986-14d88a26-416a-000c2988e4dd/myvm/myvm.vmx with error msg = “VMware ESX cannot find the virtual disk “myvm_2.vmdk”. Verify the path is valid and try again.
    –> Cannot open the disk ‘myvm_2.vmdk’ or one of the snapshot disks it depends on.
    –> Reason: The system cannot find the file specified.” and error code -57.
    2011-07-13T17:59:48.705Z [74258B90 info ‘Libs’] Vix: [3057 foundryVMMsgPost.c:1354]: Error VIX_E_FAIL in FoundryVMGetMsgPostError
    (): Unknown error

    2011-07-13T17:59:48.775Z [743C0B90 info ‘vm:/vmfs/volumes/4e1c0986-14d88a26-416a-000c2988e4dd/myvm/myvm.vmx’ opID=841A7BF1-00000188] Failed to do Power Op: Error: (4) A file was not found

Overview steps

Note: It would be advisable to attempt to restore the missing descriptor file from backups if possible. If this is not possible, proceed with recreating the virtual machine disk descriptor file.

To create a virtual machine disk descriptor file:

  1. Identify the size of the flat file in bytes.
  2. Create a new blank virtual disk that is the same size as the original. This serves as a baseline example that is modified in later steps.

    Note: This step is critical to assure proper disk geometry.

  3. Rename the descriptor file (also referred to as a header file) of the newly-created disk to match the name of the original virtual disk.
  4. Modify the contents of the renamed descriptor file to reference the flat file.
  5. Remove the leftover temporary flat file of the newly-created disk, as it is not required.

Note: This procedure will not work on virtual disks configured with a Para-virtualized SCSI controller in the virtual machine.

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


    • 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 size

      This is the size of the virtual disk.

    • -a virtual_controller

      Whether the virtual disk was configured to work with BusLogic, LSILogic (for both lsilogic and lsilogic SAS) or IDE.

    • -d thin

      This 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

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

      # The Disk Data Base

      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.

  9. To check the disk chain for consistency, run this command against the disk descriptor file:

    vmkfstools -e filename.vmdk

    For example:

    # vmkfstools -e test.vmdk

    You see output similar to:

    Disk chain is consistent

    Note: The -e option exists only for ESXi 5.0 and later. For earlier versions, use the vmkfstools -q filename.vmdk command. The -q option walks through the entire chain of .vmdk files until it reaches the base disk and checks the consistency of all .vmdk descriptor files in the chain.

    For example:

    # vmkfstools -q test.vmdk

    For a complete chain, you see output similar to:

    test.vmdk is not an rdm


  • Although these steps are specific to the ESX host’s Service Console (otherwise referred to as the Console OS), they may also be applied to platforms using VMware desktop products such as VMware Server or VMware Workstation. Instead of using the vmkfstools command, use the vmware-vdiskmanager utility. For more information on the Virtual Disk Manager, see the Virtual Disk Manager User’s Guide.
  • When performing these operations on a different platform, you must use the equivalent commands for your platform. For example, move, copy, and del for Microsoft Windows platforms, and mv, cp, and rm for Unix, Linux, and Mac OS X platforms.
  • For more information about platform-specific commands, see DOS versus Linux Commands from the Linux Documentation Project.

VMware – SSH the easy way

VMware - SSH the easy way

Why SMBs haven’t virtualized yet?


True Cloud vs VPS – by Netmagic

Given the rising demand for Cloud, it’s only natural that providers who don’t have true-blue IaaS services try and label their Virtual Private Services as a Cloud offering. The truth is that while there may be minor similarities, Cloud and VPS could not be more different from each other.

Netmagic’s SimpliCloud offering providers a virtual dedicated servers that are created using extremely high—quality ingredients like Cisco UCS servers, EMC Storage, Sun Storage, and Cisco networking elements. These hardware elements or ‘Grids’ are virtualized using VMware which is quite simply the best hypervisor available in the world today. These Virtual Machines offer truly dedicated and protected resources which usually isn’t the case with a VPS (virtual private server). While most VPS offerings may guarantee a small portion of dedicated memory, there is generally no dedicated CPU allocation, disk i/o, network i/o, etc.

Cloud vs VPS

Another significant difference between Cloud and VPS is that VPS platforms are typically oversold. VPS providers typically virtualize a single physical box into far too many virtual private servers which translates into one physical host machine running far too many customers and this turns into a resource allocation nightmare causing server crashes or poor performance (or both). VPS security isn’t as robust as a good Cloud platform because there is almost no way to achieve true tenant isolation which protects customers from each other and segregates data effectively.

With Netmagic’s SimpliCloud Server you always get the full amount of allocated memory, CPU, network i/o, etc that you are paying for. In addition to also benefitting from much more comprehensive Grid security, you also benefit from a raft of additional features like real-time scalability, Elasticity, Pay-per-use, Storage, Firewalls, and Load Balancers.

Cloud server vs VPS

The orchestration layer is the portal into a Cloud system that allows customers to provision servers, networks, and storage instantly. The Orchestration layer allows customers to manage their Cloud environment in real-time. This means they can instantly provision servers, firewalls, load balancers and storage, and commission them as pay-per-hour (Elastic) Instances, or Fixed instances. The portal will allow customers to start and stop their services in real-time and modify infrastructure when needed. Need to increase a RAM in a DB server from 4GB to 8GB? Five minutes is all it would take. None of this is possible in VPS, because a VPS has no orchestration layer or self-provisioning portal.

Enabling SSH and SNMP on your ESXI, Vsphere

There are two ways to go about with this depending upon your installation

a. If your esxi installation is new and/ or your evaluation license is still valid, then go to the section that says Enable       SNMP via RCLI

b. If your esxi installation has been in production for a while / and or you got a license installed and your evaluation period has expired then go to the following section which is to enable SNMP via SSH. For this you will need to enable SSH first on your esxi host by following the steps detailed below.

Enabling SSH on your ESXI host.

  1. Shutdown all your running VM’s on the esxi host and place the host on Maintenance mode.
  2. Log onto your Esxi Console physically from the box by pressing F2
  3. Type in your root password
  4. Press ALT+ F1 to enter the Technical Support login. Beware that any changes from here will not be warranted for support with VMware. So please be careful and test this and practice on a test esxi host before going live with production.
  5. Type unsupported and press enter
  6. Type in your root password
    at the prompt again and press enter
  7. Now you need to edit the inetd.conf file. To do this type vi /etc/inetd.conf
  8. Scroll down using your down arrow key sort of towards the end of the screen where you would see two lines starting with #ssh. Place the cursor on top of the # and press delete. Do this for the next line as well.
  9. Now press SHIFT+: and type wq to save the file.
  10. Now you will be back at your #prompt. To restart the service type restart.
  11. Press ALT+F1 to return to the esxi host console page.
  12. Press ESC to log off
  13. Press F12 to initiate your restart of the esxi host.
  14. You will be promoted for your root password and press enter.
  15. Press F11 to restart the host.
  16. Once the esxi host is up and running again use your favourite SSH client mine is Putty and WinSCP to test SSH connectivity to your esxi host.

Enabling SNMP via SSH on your ESXI host.

  1. Once you got SSH running , download and install WinSCP on your workstation..
  2. Open WinSCP and type in the details for your esxi host including IP address, root as the username and root password. Make sure you change connection type to SCP from default SFTP option as shown

  3. Once logged in your WinSCP window will look like the follow. On the Esxi host side navigate to /etc/vmware and find the file called snmp.xml

  4. Drag and drop the snmp.xml file from the right to the left of the screen.

  5. Open the document with your favourite Notepad editor. I am using Notepad++

  6. It would have the following default settings:

  7. First and foremost make a copy of the file before editing it and save it with a different file name so that if something goes wrong you always have a copy of the original.
  8. Now do the following editing to it and save it with same file name snmp.xml.

  9. Save the file and now go back to WinSCP and drag the file from the left to the right and accept the warning message to overwrite the file

  10. Once that is done restart your esxi host and test SNMP which will be followed up in the next section.

Enabling SNMP via RCLI ( Only works for New Installation of Esxi , Valuation License still valid state)

  1. Download the Remote Command Line Interface from Vmware RCLI Download for Vsphere.
  2. Install it on your workstation.
  3. To start RCLI browse to your VMware folder under all programs and kick start the command line under vmware

  4. At the command prompt type cd bin and then do a dir. This Directory has all the scripts that are required to run a variety of tasks on your esxi and esx servers.

  6. To enable SNMP type –server ESXISERVERIP –E
  7. To show the running config of SNMP on your esxi server type –server ESXISERVERIP –s
  8. To test the SNMP confi type vicfg-snmp –server ESXISERVERIP –T

As you may have seen in the heading of this section this works only for new installation of esxi or those that have their Valuation license still valid (60 Days). For those who don’t fall into the category the only option is to go with SSH and then enabling SNMP option.

You will see this error if you try via RCLI

This is because remote write permission is disabled on the free version of esxi.

Now use your favourite SNMP monitoring station Solarwinds, Cacti, Zenoss, Spiceworks there are so many to start monitoring your Esxi environment.

Overlay Transport Virtualization – OTV – A “CE-Centric VPLS”

Overlay Transport Virtualization is one of the more interesting ways to connect remote data centers using layer 2. OTV can be thought of as MAC-address routing, in which destinations are MAC addresses, and next hops are IP addresses. OTV simply maps MAC address destinations to IP next hops that are reachable through the network cloud. Traffic destined for a particular MAC address is encapsulated in IP and carried through the IP cloud to its MAC-address routing next hop.

Cybernet Launches Pakistan’s First Cloud Solution

Source: By Aamir Attaa · Wednesday, May 30, 2012

Cybernet, an enterprise network and data service provider, has launched Pakistan’s first commercial cloud infrastructure, Pakistan’s very own, in a ceremony held in Islamabad yesterday.

2012 05 29 18.06.55 Cybernet Launches Pakistans First Cloud Solution

Cybernet’s cloud solution, dubbed as RapidCompute, is an Infrastructure-as-a-Service (IaaS) cloud platform that is said to be deployed and maintained by in-house expertise and support structure of Cybernet.

Shahid Ahmed Khan, CEO Cybernet, said that RapidCompute will enable businesses across Pakistan to avail important benefits of cloud services that were previously not available in the country. Mr. Khan claimed that locally deployed RapidCompute will reduce network latency by 90 percent for those accessing the cloud network with-in Pakistan.

Cybernet said that it took them an year or so to build the infrastructure from scratch to eventually launch the cloud solution that they are aiming to sell to small to large sized organizations in Pakistan and abroad.

Cybernet said that RapidCompute is built on Cybernet’s datacenter facility in Karachi, while they are planning to establish more datacenters in Islamabad, Lahore and another in Karachi too. Mr. Shahid revealed that Cybernet has plans to invest in cloud computing beyond Pakistan as well.

Company said that its aim is to provide the local businesses and organizations with an opportunity to experience high performing, flexible, robust and cost-effective computing infrastructure with zero capital to start with. While they will have to only pay for the resources they will use.

You can access official website of RapidCompute by clicking this link:


RapidCompute’s pricing seems to be fair. Given the network is deployed in Pakistan, this is probably the best they could offer. Understandably, network bandwidth is pricier than any foreign competition.

RapidCompute thumb Cybernet Launches Pakistans First Cloud Solution

You can click on this link to have an idea of cost for a cloud server based on your requirements.

A detailed service review on RapidCompute with comments on after sale support is likely to come in soon. Meanwhile, you can sign-up for the service and start configuring and running cloud instances.

Cybernet said that payment options include bank deposit, cash deposit at banks and CyberNet offices. Payments through Credit Card will be made available soon.

It’s Time to Consider Virtual Desktop Infrastructure (VDI)

Microsoft and Citrix has joined forces to offer Virtual Desktop Infrastructure, watch the video below for Microsoft VDI offerings:

Cisco CIUS Tablet

%d bloggers like this: