Psphere vm object giving wrong name

42 views
Skip to first unread message

Saju M

unread,
Dec 24, 2012, 2:36:35 AM12/24/12
to psp...@googlegroups.com
Psphere vm object giving wrong name

a) Name of VM in vcenter is
TestVM6~!@#$%^&*()+{}|":?><,./;'\][=-` bbb

c) but vm.name returns
TestVM6~!@#$%25^&*()+{}|":?><,.%2f;'%5c][=-` bbb

So i can't query VM b name like,  VirtualMachine.get(client, name="TestVM6~!@#$%^&*()+{}|":?><,./;'\][=-` bbb"). Getting error ObjectNotF
oundError:.

Is psphere using any encoding ???.

Matthew Welch

unread,
Dec 24, 2012, 3:29:57 AM12/24/12
to psp...@googlegroups.com
first of all..... your doing something wrong if your VM names have names like that lol.


--
You received this message because you are subscribed to the Google Groups "psphere" group.
To post to this group, send an email to psp...@googlegroups.com.
To unsubscribe from this group, send email to psphere+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msg/psphere/-/ifCepJu-x4UJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Saju M

unread,
Dec 26, 2012, 2:19:32 AM12/26/12
to psp...@googlegroups.com
Hi matt,

In vcenter, we can name DC, VM, cluster and folder like TestVM6~!@
#$%^&*()+{}|":?><,./;'\][=-` bbb.

vcenter allow all characters (no restrictions).


Thanks,

Michael Rice

unread,
Dec 26, 2012, 2:23:10 AM12/26/12
to psp...@googlegroups.com
Is there a reason you aren't searching using uuid? I use uuid for this very reason. 



Thanks
Mike
To view this discussion on the web, visit https://groups.google.com/d/msg/psphere/-/iP0XLh9IzpUJ.

Saju M

unread,
Dec 26, 2012, 2:33:13 AM12/26/12
to psp...@googlegroups.com
Hi Matt,

Thanks matt,

I think, we cant use uuid to query all Managedobjects, Only Host and VM support query by uuid.

I think, big issue of vmware API is lack of a unique identifier.
I think, moid is unique, but we can't use it to query managedobjects.



My observation
============

Please note this behaviour also.  
Replacing following chars
% with %25
/ with %2f
\ with %5c

Actual name in vcenter: TestVM6~!@
#$%^&*()+{}|":?><,./;'\][=-` bbb

Actual name in objectbrowser/vsphere: TestVM6~!@#$%25^&*()
+{}|":?><,.%2f;'%5c][=-` bbb
Reply all
Reply to author
Forward
0 new messages