VMware Cloud Community
inforhunter
Enthusiast
Enthusiast
Jump to solution

Who know the naming rule of the URL for webAccess generated by VC?

I some time access my VMs via webAccess,bookmark the URL of sepecify VMs often used(Summary tab, click Generate Virtual Machine Shortcut.).

but one day I found I can not access VMs via URL bookmarked,because it had been changed.

I did not know what change of the VC or ESX will result of the URL changes.

and I want to know  the naming rule of the random code of the URL?

Reply
0 Kudos
1 Solution

Accepted Solutions
vmroyale
Immortal
Immortal
Jump to solution

Hello.

The only unique parts of these URLs are the name of the vCenter (or ESX/ESXi) host and the object id of the VM.  If you moved the vm from inventory or did anything operationally that would have changed the VM's Object Id, then the URL is likely not valid because of this.  You can use the free RVTools to view the Object Id for the VM and try to change the URL accordingly, but it might be just as fast to re-create the URL again.

Good Luck!

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com

View solution in original post

Reply
0 Kudos
3 Replies
RvdNieuwendijk
Leadership
Leadership
Jump to solution

The Webaccess URL is in the form of:

https://vCenterServer/ui/?wsUrl=http://localhost:80/sdk&mo=VirtualMachine|vm-1083&inventory=none&tab..._


In this URL vCenterServer is the name of your vCenter Server. vm-1083 is the MoRef of the virtual machine. To generate the URL's for all your virtual machines you can use the following PowerCLI script:

New-VIProperty -Name WebShortcut -ObjectType VirtualMachine `
    -Value {
        $vCenterServer = $Args[0].Uid.Split(:)[0].Split(@)[1]
        $Id = $Args[0].Id.Replace(e-v,”e|v”)
        https://$vCenterServer/ui/?wsUrl=http://localhost:80/sdk&mo=$Id&inventory=none&tabs=hide_
    } -Force
Get-VM | Select-Object -Property Name,WebShortcut | Format-List

Regards, Robert

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition
vmroyale
Immortal
Immortal
Jump to solution

Hello.

The only unique parts of these URLs are the name of the vCenter (or ESX/ESXi) host and the object id of the VM.  If you moved the vm from inventory or did anything operationally that would have changed the VM's Object Id, then the URL is likely not valid because of this.  You can use the free RVTools to view the Object Id for the VM and try to change the URL accordingly, but it might be just as fast to re-create the URL again.

Good Luck!

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
Reply
0 Kudos
inforhunter
Enthusiast
Enthusiast
Jump to solution

Does vMotion or HA  or other else type of  migration  impact  the object ID of VMs?

Reply
0 Kudos