Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

Moving a persistent data disk to another View desktop (1033286)

Purpose

As a maintenance or troubleshooting step, you may have to move the user data disk from one View desktop to another.
 
The steps in this article can move a data disk from a View desktop to another View desktop in the same or different pool and can move a user data disk to a desktop that is on another datastore.

Resolution

To complete the steps in this article, you require:
  • The ability to power off and power on virtual machines in vCenter Server
  • Access the the View Admin console
  • Command-line access on the View connection broker
  • SSH access or Remote Command Line access to one of the hosts in the cluster that contains the View desktops
Caution: Before following the steps in this article, familiarize yourself with the ESX console command line, the vSphere Management Assistant (vMA), and the syntax for vmkfstools and vdmadmin. For links to documentation, see the Additional Information section in this article.

Before performing the steps in this article, collect this information:
  • The username assigned to the source virtual machine
  • The name of user's current or source virtual machine and its pool
  • The path of the user data disk for the source virtual machine:
    1. Right-click the virtual machine in the vCenter and choose Edit Settings.
    2. Select the Hard disks and note the Disk File entry in the right pane.

      The hard disk that has a Disk File entry with -vdm-user-disk- is the Data disk. For example:

      [datastore1]/sb7-1/b7-1-vdm-user-disk-D-22d670ca-8949-480c-8f8f-a423b39312b3.vmdk

      The complete path for later use is:

      /vmfs/volumes/datastore1/sb7-1/b7-1-vdm-user-disk-D-22d670ca-8949-480c-8f8f-a423b39312b3.vmdk

  • The name of an unassigned desktop in the same or different pool. This is the target Virtual Machine. if the pool is different get the new pool name
  • The path of the user data disk for the target desktop. For example:

    [datastore1]/b7-3/sb7-3-vdm-user-disk-D-821a1b91-8226-4d62-9b92-03b2b163d999.vmdk

    The complete path for later use is:

    /vmfs/volumes/datastore1/b7-3/sb7-3-vdm-user-disk-D-821a1b91-8226-4d62-9b92-03b2b163d999.vmdk

To move a persistent data disk to another View desktop: 

  1. On the View Connection server command line, execute these commands to remove and add the user's assignment to the desktops:

    To remove the existing assignment:

    vdmadmin -L -d pool_name -m existing_desktop_name -r

    To assign the user a new desktop:

    vdmadmin -L -d pool_name -m new_desktop_name -u username

    Note: The vdmadmin command can be located at C:\Program Files\VMware\VMware View\Server\tools\bin.

  2. Log in to the newly assigned desktop with the user credentials to allow View to properly re-direct profiles to the user data disk.
  3. Shutdown both desktops in vCenter Server by right-clicking the virtual machine and choosing Power > Shut Down Guest.

    You may need to disable both pools if the View Connection server powers on the desktops.

    Note: For the next step, use an SSH connection or direct console access to the ESX host. For ESXi, use VMware vSphere Management Assistant (vMA).

  4. Copy the user data disk from the destination virtual machine as a backup with the command:

    vmkfstools -i source_vmdk_file destination_vmdk_file

    Where source_vmdk_file includes the full path of the source vmdk file and destination_vmdk_file includes the full path of the destination vmdk file.

    For example:

    vmkfstools -i /vmfs/volumes/datastore1/sb7-3/sb7-3-vdm-user-disk-D-821a1b91-8226-4d62-9b92-03b2b163d999.vmdk /vmfs/volumes/datastore1/sb7-3/sb7-3-vdm-user-disk-D-821a1b91-8226-4d62-9b92-03b2b163d999-copy.vmdk

  5. Delete the user datadisk for the destination virtual machine with the command:

    vmkfstools -U vmdk_file

    Where vmdk_file includes the full path to the vmdk file.

    For example:

    vmkfstools -U \vmfs\volumes\datastore1\sb7-3-vdm-user-disk-D-821a1b91-8226-4d62-9b92-03b2b163d999.vmdk

  6. Copy the source user data disk to the destination virtual machine's location with the command:

    vmkfstools -i source_vmdk_file destination_vmdk_file

    Where source_vmdk_file includes the full path of the source vmdk file and destination_vmdk_file includes the full path of the destination vmdk file.

    For example: 

    vmkfstools -i /vmfs/volumes/datastore1/sb7-1/b7-1-vdm-user-disk-D-22d670ca-8949-480c-8f8f-a423b39312b3.vmdk /vmfs/volumes/datastore1/b7-3/sb7-3-vdm-user-disk-D-821a1b91-8226-4d62-9b92-03b2b163d999.vmdk

  7. If you have disabled pools, enable them. 

    Note: Disabling pools prevents users access to the pools. It does not interrupt users that are already connected.

  8. Power on the destination virtual machine.
  9. Log in to the new virtual machine desktop with the assigned user credentials and verify that the disk has been successfully moved.
  10. Remove the user data disk created as backup in step 4 with the command:

    vmkfstools -U vmdk_file

    Where vmdk_file includes the full path to the vmdk_file.

    For example: 

    vmkfstools -U /vmfs/volumes/datastore1/sb7-3/sb7-3-vdm-user-disk-D-821a1b91-8226-4d62-9b92-03b2b163d999-copy.vmdk

Additional Information

For information on the vdmadmin command, see:
For information on vSphere Management Assistant (vMA), see the vSphere Management Assistant Documentation.
For the syntax for vmkfstools, see the ESX Configuration Guide.

This Article Replaces

1016628

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 3 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
  • 3 Ratings
Actions
KB: