<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Globalization - creating non-english language VM in vSphere SDK for Perl Discussions</title>
    <link>https://communities.vmware.com/t5/vSphere-SDK-for-Perl-Discussions/Globalization-creating-non-english-language-VM/m-p/2661709#M2723</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I am trying to create a VM with French language words.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;vSphere Client allowing and creating fine, but I am getting below error with Perl API call.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Failed to Create virtual machine "fenêtres" due to&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SOAP Fault:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;----&lt;/P&gt;&lt;HR originaltext="------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Fault string:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Error returned by expat parser: unclosed token&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;while parsing SOAP envelope&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;at line 2, column 3&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;while parsing HTTP request for method createVm&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;on object of type vim.Folder&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;at line 1, column 0&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Fault detail: InvalidRequestFault .&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;Failed to Create virtual machine "fenêtres" due to&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;SOAP Fault:&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;/DIV&gt;&lt;P&gt;----&lt;/P&gt;&lt;HR originaltext="------" /&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;Fault string:&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;Error returned by expat parser: unclosed token&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;while parsing SOAP envelope&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;at line 2, column 3&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;while parsing HTTP request for method createVm&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;on object of type vim.Folder&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;at line 1, column 0&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;Fault detail: InvalidRequestFault .&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Do we have to set any language related parameters ?&lt;BR /&gt;For connection i set default local to "en_US" to connect non-english vCenter.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Apr 2015 10:17:04 GMT</pubDate>
    <dc:creator>mpr4ul</dc:creator>
    <dc:date>2015-04-15T10:17:04Z</dc:date>
    <item>
      <title>Globalization - creating non-english language VM</title>
      <link>https://communities.vmware.com/t5/vSphere-SDK-for-Perl-Discussions/Globalization-creating-non-english-language-VM/m-p/2661709#M2723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I am trying to create a VM with French language words.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;vSphere Client allowing and creating fine, but I am getting below error with Perl API call.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Failed to Create virtual machine "fenêtres" due to&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SOAP Fault:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;----&lt;/P&gt;&lt;HR originaltext="------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Fault string:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Error returned by expat parser: unclosed token&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;while parsing SOAP envelope&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;at line 2, column 3&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;while parsing HTTP request for method createVm&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;on object of type vim.Folder&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;at line 1, column 0&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Fault detail: InvalidRequestFault .&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;Failed to Create virtual machine "fenêtres" due to&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;SOAP Fault:&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;/DIV&gt;&lt;P&gt;----&lt;/P&gt;&lt;HR originaltext="------" /&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;Fault string:&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;Error returned by expat parser: unclosed token&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;while parsing SOAP envelope&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;at line 2, column 3&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;while parsing HTTP request for method createVm&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;on object of type vim.Folder&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;at line 1, column 0&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV id="cke_pastebin" style="position: absolute; top: -574px; width: 1px; height: 959px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"&gt;&lt;P&gt;Fault detail: InvalidRequestFault .&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Do we have to set any language related parameters ?&lt;BR /&gt;For connection i set default local to "en_US" to connect non-english vCenter.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2015 10:17:04 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-SDK-for-Perl-Discussions/Globalization-creating-non-english-language-VM/m-p/2661709#M2723</guid>
      <dc:creator>mpr4ul</dc:creator>
      <dc:date>2015-04-15T10:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Globalization - creating non-english language VM</title>
      <link>https://communities.vmware.com/t5/vSphere-SDK-for-Perl-Discussions/Globalization-creating-non-english-language-VM/m-p/2661710#M2724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I think the problem is the ComplexType object doesn't encode_utf8 like it does for SimpleTypes.&amp;nbsp; It gets to the property with characters that should be encoded and doesn't. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can sort of force it yourself.&amp;nbsp; I have an example below using &lt;STRONG&gt;Rename_Task()&lt;/STRONG&gt;.&amp;nbsp; Should be the same issue in your &lt;STRONG&gt;CreateVM_Task()&lt;/STRONG&gt; call.&amp;nbsp; If you're using someone else's script, you'll probably have to wrap the potential french accent characters in encode_utf8.&amp;nbsp; You could patch up VICommon.pm.&amp;nbsp; If that's something you think you need to do, let me know.&amp;nbsp; Should be able to just do it for the 'string-like' properties during serialization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will probably get a warning message from LWP about the content header length (I did).&amp;nbsp; I'm guessing there's something in the HTTP header content-length calculation missing in the VICommon.pm as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;$ perl test.pl --username=administrator --password=* --server=172.16.2.10 --oldvmname=test --newvmname=fenêtres&lt;/P&gt;
&lt;P&gt;Content-Length header value was wrong, fixed at /Library/Perl/5.18/LWP/Protocol/http.pm line 190.&lt;/P&gt;
&lt;P&gt;# VM was renamed to 'fenêtres' in the vSphere Client UI&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;#!/usr/bin/perl&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;# Created by Reuben Stump (&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.virtuin.com/"&gt;http://www.virtuin.com&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;use strict;&lt;/P&gt;
&lt;P&gt;use warnings;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;use VMware::VIRuntime;&lt;/P&gt;
&lt;P&gt;use Encode qw(encode_utf8);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;my %opts = (&lt;/P&gt;
&lt;P&gt;&amp;nbsp; oldvmname =&amp;gt; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; type =&amp;gt; "=s",&lt;/P&gt;
&lt;P&gt;&amp;nbsp; required =&amp;gt; 1,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; },&lt;/P&gt;
&lt;P&gt;&amp;nbsp; newvmname =&amp;gt; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; type =&amp;gt; "=s",&lt;/P&gt;
&lt;P&gt;&amp;nbsp; required =&amp;gt; 1,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; },&lt;/P&gt;
&lt;P&gt;);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Opts::add_options(%opts);&lt;/P&gt;
&lt;P&gt;Opts::parse();&lt;/P&gt;
&lt;P&gt;Opts::validate();&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Util::connect();&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;my ($old_name, $new_name, $vm);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;$old_name = Opts::get_option('oldvmname');&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;$new_name = encode_utf8(Opts::get_option('newvmname'));&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;$vm = Vim::find_entity_view(&lt;/P&gt;
&lt;P&gt;&amp;nbsp; view_type =&amp;gt; 'VirtualMachine',&lt;/P&gt;
&lt;P&gt;&amp;nbsp; properties =&amp;gt; ['name'],&lt;/P&gt;
&lt;P&gt;&amp;nbsp; filter =&amp;gt; { 'name' =&amp;gt; $old_name }&lt;/P&gt;
&lt;P&gt;);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;die "Failed to find vm '$old_name'" unless $vm;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# Rename VM&lt;/P&gt;
&lt;P&gt;$vm-&amp;gt;Rename(newName =&amp;gt; $new_name);&lt;/P&gt;

&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2015 13:56:29 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-SDK-for-Perl-Discussions/Globalization-creating-non-english-language-VM/m-p/2661710#M2724</guid>
      <dc:creator>stumpr</dc:creator>
      <dc:date>2015-04-15T13:56:29Z</dc:date>
    </item>
  </channel>
</rss>

