lamw / lamw/vmware-scripts

guestOpsManagement.pl copyfromguest issue

Open
#16 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Perl
Stars
951
Forks
504
PR merge metrics
No merged PRs in 30d

Description

When I use "guestOpsManagement.pl --server vcenter --username x --password y --operation copyfromguest --vm name --guestusername z --guestpassword zz --filepath /home/user/test.txt"

I get the following messages:
Validating guest credentials in name ...
Successfully validated guest credentials!
Downloading file "/home/user/test.txt" from guest ...
Received download URL: https://IP:443/guestFile?id=97&token=string
Downloading file: "test.txt"

Use of unintialized value $contents in print at ./guestOpsManagment.pl line 668.

The resulting test.txt file is empty.

In looking at the code 668 is using the result of the get($url) contained in $contents. When I use a browser to go the the URL that was provided, I do see the contents so the URL appears correct. Not being a PERL guy (gasp), I'm not sure how to resolve this issue.

Thoughts?
Pete

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with guestOpsManagment.pl around line 668 and reproduce the copyfromguest command from the issue. Inspect the result returned by get($url) and compare it with the browser-accessible download URL. Done means the downloaded test.txt contains the guest file contents and the uninitialized-value warning is gone.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.