how can i load any file to virtual machine using java api
How to upload file into Guest OS on VMware:How to Upload File to Guest Operating System on VMware | DoubleCloud => Private Cloud + Publi...
How to download file from GOS on VMware:How to Download File from Guest Operating System on VMware | DoubleCloud => Private Cloud + P...
If you have any doubt/issue related to this, please post on above blog posts
How to upload file into Guest OS on VMware:How to Upload File to Guest Operating System on VMware | DoubleCloud => Private Cloud + Publi...
How to download file from GOS on VMware:How to Download File from Guest Operating System on VMware | DoubleCloud => Private Cloud + P...
If you have any doubt/issue related to this, please post on above blog posts
i used this program but i got this error
Exception in thread "main" java.lang.IllegalArgumentException: Local file path points to a directory: C:\temp1\guest\
at org.doublecloud.vi.vmware.guest.GuestFileDirector.uploadFile(GuestFileDirector.java:183)
at org.doublecloud.vi.vmware.guest.samples.GuestDownloadFile.main(GuestDownloadFile.java:38)
i create this folder C:\temp1\guest\ in my laptop and create c:\\temp in vm
any idea about this problem
are you sure you are specifying directory paths the way shown in code? double backward slash is required.
fd.uploadFile(
"C:\\temp\\guest\\steveproxy.jar"
,
"c:\\temp\\steveproxy.jar"
);
fd.uploadFile(
"C:\\temp1\\guest\\"
,
"c:\\temp\\"
);
Also please check what is the uploadFile() method signature i.e. What is source path & what is destination path.
If you resolve above 2 stuffs, code should go through.
thank u very much it work
but is there any way to determine the source and destination file at the time of programming work or not
When we are uploading file from one location to other,
>we should have source location (i.e. the file location that you want to upload)
>destination location (i.e. what is the location where you want to upload in VM)
I wanted you to check the uploadFile() method argument sequence so that you can specify appropriate file location while calling this method. I wanted you to make sure you specify correct argument sequence.
Is there any example can u give for understanding this idea
com.vmware.vim25.mo.ServiceInstance.ServiceInstance(URL url, String username, String password, boolean ignoreCert)
Above method (ServiceInstance) we call in order to login. What is the argument sequence from left to right ::: 1. URL 2. String username 3. String password 4. boolean ignoreCert
Now if we pass 2nd argument as "password" then call is going to fail as password is 3rd argument & username is 2nd.
In the same way I wanted you to check the argument sequence for "uploadFile()" method so that you will not go wrong while calling this method.