Mass Update Media in vCloud Dicrector

In vCloud 5.1 it is very difficult to move media from LUN to LUN once it is uploaded. In vCloud 5.5 this gets better but it is still a pain.

One method I have found that works is to disable the LUN you want the media moved off of, and change something on the media record. Something such as adding a ' ' (space) to the description will cause vCloud Director to copy the media to a new LUN.

Below is a script to mass update media entries to allow them to move easier.

1$MediaToUpdate = Get-Catalog -Org NAME | Get-Media 
2Foreach ( $Media in $MediaToUpdate ) { 
3  $RefMedia = Get-Media -Id $Media.Id
4  Write-Host "Updating " $RefMedia.Name 
5  $OldDescription = $RefMedia.Description 
6  $OldDescription += "." 
7  $Media.ExtensionData.Description = $OldDescription 
8  $Media.ExtensionData.UpdateServerData 
9}

Just make sure the LUN you want cleaned off is ‘disabled’ and you have enough space on the other LUNs for the newly copied/moved media.


Relocating a VM in vCloud Director
vSphere 6.5 - Top KB Articles for Upgrade Prep