Deprecated: Return type of WP_Theme::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-includes/class-wp-theme.php on line 554

Deprecated: Return type of WP_Theme::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-includes/class-wp-theme.php on line 595

Deprecated: Return type of WP_Theme::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-includes/class-wp-theme.php on line 535

Deprecated: Return type of WP_Theme::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-includes/class-wp-theme.php on line 544

Deprecated: Return type of WP_REST_Request::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-includes/rest-api/class-wp-rest-request.php on line 960

Deprecated: Return type of WP_REST_Request::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-includes/rest-api/class-wp-rest-request.php on line 980

Deprecated: Return type of WP_REST_Request::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-includes/rest-api/class-wp-rest-request.php on line 992

Deprecated: Return type of WP_REST_Request::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-includes/rest-api/class-wp-rest-request.php on line 1003

Deprecated: Return type of WP_Block_List::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-includes/class-wp-block-list.php on line 151

Deprecated: Return type of WP_Block_List::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-includes/class-wp-block-list.php on line 175

Deprecated: Return type of WP_Block_List::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-includes/class-wp-block-list.php on line 164

Deprecated: Return type of WP_Block_List::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-includes/class-wp-block-list.php on line 186

Deprecated: Return type of WP_Block_List::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-includes/class-wp-block-list.php on line 138

Deprecated: Return type of WP_Block_List::offsetExists($index) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-includes/class-wp-block-list.php on line 75

Deprecated: Return type of WP_Block_List::offsetGet($index) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-includes/class-wp-block-list.php on line 89

Deprecated: Return type of WP_Block_List::offsetSet($index, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-includes/class-wp-block-list.php on line 110

Deprecated: Return type of WP_Block_List::offsetUnset($index) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-includes/class-wp-block-list.php on line 127

Deprecated: Return type of WP_Block_List::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-includes/class-wp-block-list.php on line 199

Deprecated: Return type of iThemesSecurity\Lib\Lockout\Execute_Lock\Context::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-content/plugins/better-wp-security/core/lib/lockout/execute-lock/abstract-context.php on line 60

Deprecated: Return type of iThemesSecurity\Lib\Lockout\Execute_Lock\Context::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-content/plugins/better-wp-security/core/lib/lockout/execute-lock/abstract-context.php on line 66

Deprecated: Return type of iThemesSecurity\Lib\Lockout\Execute_Lock\Context::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-content/plugins/better-wp-security/core/lib/lockout/execute-lock/abstract-context.php on line 72

Deprecated: Return type of iThemesSecurity\Lib\Lockout\Execute_Lock\Context::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-content/plugins/better-wp-security/core/lib/lockout/execute-lock/abstract-context.php on line 76

Deprecated: Return type of iThemesSecurity\Lib\Lockout\Execute_Lock\Context::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-content/plugins/better-wp-security/core/lib/lockout/execute-lock/abstract-context.php on line 56

Deprecated: Return type of ITSEC_Lib_Distributed_Storage_Cursor::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-content/plugins/better-wp-security/core/lib/class-itsec-lib-distributed-storage.php on line 578

Deprecated: Return type of ITSEC_Lib_Distributed_Storage_Cursor::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-content/plugins/better-wp-security/core/lib/class-itsec-lib-distributed-storage.php on line 585

Deprecated: Return type of ITSEC_Lib_Distributed_Storage_Cursor::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-content/plugins/better-wp-security/core/lib/class-itsec-lib-distributed-storage.php on line 606

Deprecated: Return type of ITSEC_Lib_Distributed_Storage_Cursor::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-content/plugins/better-wp-security/core/lib/class-itsec-lib-distributed-storage.php on line 613

Deprecated: Return type of ITSEC_Lib_Distributed_Storage_Cursor::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home2/ninjasbl/public_html/wp-content/plugins/better-wp-security/core/lib/class-itsec-lib-distributed-storage.php on line 620

Notice: spl_autoload_register(): Argument #2 ($do_throw) has been ignored, spl_autoload_register() will always throw in /home2/ninjasbl/public_html/wp-content/plugins/google-publisher/ClassAutoloader.php on line 27

Deprecated: Automatic conversion of false to array is deprecated in /home2/ninjasbl/public_html/wp-content/plugins/better-wp-security/core/modules.php on line 119

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /home2/ninjasbl/public_html/wp-includes/class-wp.php on line 173

Warning: Cannot modify header information - headers already sent by (output started at /home2/ninjasbl/public_html/wp-includes/class-wp-theme.php:9) in /home2/ninjasbl/public_html/wp-includes/feed-rss2-comments.php on line 8
Comments on: vRealize Orchestrator Appliance – Guest File Operations Part 1 – (Copying a file to guest VM) http://2ninjas1blog.com/vrealize-orchestrator-appliance-guest-file-operations-part-1-copying-a-file-to-guest-vm/ 2 Ninjas! 1 Blog! Thu, 06 Oct 2016 13:39:24 +0000 hourly 1 https://wordpress.org/?v=5.8.7 By: Ferdinando Simonetti http://2ninjas1blog.com/vrealize-orchestrator-appliance-guest-file-operations-part-1-copying-a-file-to-guest-vm/#comment-12 Thu, 06 Oct 2016 13:39:24 +0000 http://2ninjas1blog.com/?p=570#comment-12 In reply to Nick Colyer.

Of course (sigh), my solution comes with two caveats:
– first of all, file size limit for uploads from the desktop to the Orchestrator appliance is 2Mb. Yes, Mb.
– And you cannot invoke this VRO workflow as a Resource Action from VRA, because there is no field type “mime attachment” in VRA yet.

Best regards

]]>
By: Nick Colyer http://2ninjas1blog.com/vrealize-orchestrator-appliance-guest-file-operations-part-1-copying-a-file-to-guest-vm/#comment-11 Tue, 04 Oct 2016 14:51:54 +0000 http://2ninjas1blog.com/?p=570#comment-11 In reply to Ferdinando Simonetti.

Very cool. Thank you for sharing!

]]>
By: Ferdinando Simonetti http://2ninjas1blog.com/vrealize-orchestrator-appliance-guest-file-operations-part-1-copying-a-file-to-guest-vm/#comment-10 Tue, 04 Oct 2016 14:49:51 +0000 http://2ninjas1blog.com/?p=570#comment-10 In reply to Nick Colyer.

Hello Nick, it turned out that was my fault… again. 🙁
Now it’s working, I modified the workflow this way:

Input PARAMETERS:
localFile (MimeAttachment) – let the user choose the file inside his PC
vroFileName (string) – let the user choose the file name on VRO
Input ATTRIBUTES:
vroPath (string) – taken from a Configuration Item on the Orchestrator
vroFile (MimeAttachment)

Scriptable Action:

var vroFile = localFile;
vroFile.write(vroPath,vroFileName);

]]>
By: Nick Colyer http://2ninjas1blog.com/vrealize-orchestrator-appliance-guest-file-operations-part-1-copying-a-file-to-guest-vm/#comment-9 Tue, 04 Oct 2016 14:28:41 +0000 http://2ninjas1blog.com/?p=570#comment-9 In reply to Ferdinando Simonetti.

Could you use winscp or something else to move the file from your desktop to the orchestrator server?

]]>
By: Ferdinando Simonetti http://2ninjas1blog.com/vrealize-orchestrator-appliance-guest-file-operations-part-1-copying-a-file-to-guest-vm/#comment-8 Mon, 03 Oct 2016 15:20:07 +0000 http://2ninjas1blog.com/?p=570#comment-8 Hi Nick, hi Amy.
Thanks to you we’re now able to upload files (even binary ones) from VRO to guest VM.
The next step will be… transferring a (binary, maybe quite large) file *from* my desktop *to* VRO appliance.
Created a simple workflow taking an input parameter “localFile” (type string), with a “scriptable task” built like this

System.log(“localFile: ” + localFile);
var mimeAttachment = new MimeAttachment(localFile);
System.log(mimeAttachment.mimeType);
mimeAttachment.write(“”, “mybeautifulfile.iso”);

The workflow fails with these log entries:

[2016-10-03 16:16:08.031] [I] localFile: h:\iso\MARIADB-GALERA.ISO
[2016-10-03 16:16:08.041] [I] application/octet-stream
[2016-10-03 16:16:08.046] [E] Permission denied on directory ‘/var/lib/vco/app-server/bin’

I’d rather avoid giving rwx permissions on /var/lib/vco/app-server/bin directory, so I created /var/lib/vco/app-server/bin/uploads directory, gave it rwx permissions, added it to js-io-rights.conf, restarted both VRO services and modified the script this way:

If the first parameter of the mimeAttachment.write function is “something else” (I tried with “uploads”, “uploads/”, “/uploads”, “/uploads/”) then my workflow fails with

[2016-10-03 17:13:00.791] [I] localFile: h:\iso\MARIADB-GALERA.ISO
[2016-10-03 17:13:00.831] [I] application/octet-stream
[2016-10-03 17:13:00.836] [E] Error in (Workflow:Copy of copyFileToGuest / Scriptable task (item1)#4) Wrapped java.lang.NullPointerException

Given that the API explorer for mimeattachment.write is quite cryptic (at least for me), what am I doing wrong?
Of course I tried to reference the previously created /vcofiles directory (that has the correct permissions and references in js-io-rights.conf) but I keep getting NullPointerException.

Thanks in advance
Best regards
A confused italian

]]>