Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9002529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:34:58+00:00 2026-06-16T00:34:58+00:00

Say I have 2 physical ESXs which are both headed by a vSphere Server.

  • 0

Say I have 2 “physical” ESXs which are both headed by a vSphere Server. What I am trying to do is to run a script which would upload a file to a specified VM. So basically, I use the VIFS.pl script provided by the VMWare community, the documentation of which is available here : http://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.vcli.ref.doc%2Fvifs.html and the code source is here : http://communities.vmware.com/docs/DOC-10774 .

The source code is pretty simple, it simply uses the http_put_file() function from the VIExt module, and this function actually fails for me, since I get an Error 500, the log of which is here (I got it by printing $resp->as_string()) :

do_put() function

sub do_put {
   my ($local_source, $remote_target, $datacenter) = @_;
   my ($mode, $dc, $ds, $filepath) = VIExt::parse_remote_path($remote_target);
   # bug 322577
   if (defined $local_source  and -d $local_source) {
      VIExt::fail("Error: File to be uploaded cannot be a folder.");
   }

   # bug 266936
   unless (-e $local_source) {
      VIExt::fail("Error: File $local_source does not exist.");
   }

   my $resp = VIExt::http_put_file($mode, $local_source, $filepath, $ds, $datacenter);
   # bug 301206
   print $resp->as_string();   # => Trace
   if ($resp && $resp->is_success) {
      print "Uploaded file $local_source to $filepath successfully.\n";
   } else {
      print "Failed to upload !";
   }
}

** Trace **

# vSphere server : @192.168.20.2
# Datastore : nfs
# Datacenter : dc
# Target VM name : target_vm
# Target filename : VM.txt

>> perl vifs --server 192.168.20.2 --username root  --password root -p "/tmp/foo.txt" "[nfs] target_vm/VM.txt" -Z "dc"

HTTP/1.1 500 Internal Server Error
Connection: close
Date: Thu, 6 Dec 2012 10:32:30 GMT
Content-Length: 0
Content-Type: text; charset=plain
Client-Date: Thu, 06 Dec 2012 11:32:53 GMT
Client-Peer: 192.168.20.2:443
Client-Response-Num: 9
Client-SSL-Cert-Issuer: /C=US/ST=California/L=Palo Alto/O=VMware, Inc./CN=localhost.localdom CA 26fc6343/emailAddress=ssl-certificates@vmware.com
Client-SSL-Cert-Subject: /C=US/ST=California/L=Palo Alto/O=VMware, Inc./OU=VMware vCenter Server Certificate/emailAddress=ssl-certificates@vmware.com/CN=localhost.localdom/unstructuredName=1352217590,031bd875,564d7761726520496e632e
Client-SSL-Cipher: AES256-SHA
Client-SSL-Socket-Class: IO::Socket::SSL
Client-SSL-Warning: Peer certificate not verified

Failed to upload !

Please not that I checked the value of all the variables passed as argument in the http_put_file function, they are all correct.

If someone ever experienced this problem, would be much appreciated…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:34:59+00:00Added an answer on June 16, 2026 at 12:34 am

    I know some VMware, but have admittedly never tried to do what you’re doing here, but I do have a thought to share with you.

    If I’m not mistaken, your physical ESX host (192.168.20.2) is trying to place a file onto your VM (target_vm). Since that communication is happening over port 443

        Client-Peer: 192.168.20.2:443
    

    I’m guessing that the VMware certificates that are perhaps on your VM do not match the domain that those VM’s have been added to (or they are not added to a domain). The certificates look to be from ‘localhost.localdom’:

        CN=localhost.localdom
    

    If you don’t have a certificate authority in your domain already, perhaps you can quickly create a self-signed certificate for your domain and place it in the appropriate certificate store. You also might want to try some of those other API calls like:

        --listds | -S
    

    Maybe they won’t require SSL to connect since it’s not going over HTTPS? That might validate that the certificates are, indeed, causing your problem?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have a SSI script that uses exec, or a PHP script that
I have a program which simulates a physical system that changes over time. I
Lets say I have two separate databases, X and Y, on the same physical
Let's say I have a file located at C:\foo\bar.js and I want to include
I have a server which supports web sockets. Browsers connect to my site and
Lets say we have 5 tables Fact_2011 Fact_2010 Fact_2009 Fact_2008 Fact_2007 each of which
Say I have the following tables: GearType : snowboard/helmet/shoes/whatever GearModel : which describes the
We have IIS6 running on a 64-bit Windows 2003 server with 32Gb physical RAM.
Lets say have this immutable record type: public class Record { public Record(int x,
Say I have a select box eg <div data-bind='visible: someProp'> <select class=selectSubWidgets data-bind='options: subWidgets,optionsText:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.