Quantcast
Channel: VMware Communities : Popular Discussions - VIX API
Viewing all 34639 articles
Browse latest View live

VixMntApi_openDisks returns VIX_E_DISK_NOINIT

$
0
0

Hi,

 

I am using vddk to write code to mount a vmdk file in linux.. When i try opening disks it returns VIX_E_DISK_NOINIT. How to solve this?

 

/Thanks


Problems using vmrun on ESX3.5

$
0
0

Hopefully a quick question because I'm missing something obvious.

 

I am running vmrun version 1.12.1 against an ESX 3.5 Server and am getting partial sucess.

 

If I run:

 

vmrun -T ESX -h http://{ip Address}/sdk -u root list

 

I am prompted for the password then it lists the VM's running as follows.

 

Total running VMs: 3

[ha-datacenter/server:storage2] Client/Client.vmx

""                          ""                     ""

""                          ""                     ""

 

But when I try to list the snapshots using:

 

vmrun -T ESX http://{ip Address}/sdk -u root listSnapshots "[ha-datacenter/server:storage2] Client/Client.vmx"

or

vmrun -T ESX http://{ip Address}/sdk -u root listSnapshots "[server:storage2] Client/Client.vmx"

 

I get the following error.

 

Error: Cannot open VM: [server:storage2] Client/Client.vmx, There was an error in communication.

 

Thanks,

VixVM_Open() returns error "The datastore corresponding to the given datastore path is not found"

$
0
0

In one of our setup, VixVM_Open() API call returns error "The datastore corresponding to the given datastore path is not found."

The returned error code is 38.

 

The specified vmx path as input to VixVM_Open() is of the fornmat "[MyDatastore] MyVM/MyVM.vmx".

We have verified that the datastore "MyDatastore" and the vmx path "[MyDatastore] MyVM/MyVM.vmx" exists and a VM is using this path.

 

We don't suspect any problem with the code, as the same code works in other setups.

 

What can be the possible reasons of VixVM_Open() returning this error?

And where to look for to drill down the root cause?

 

PS: We called VixHost_Connect() API to connect to a vCenter server (5.1) and then used VixVM_Open() API to try to connect to a VM. But the later is returning error.

 

 

Thanks in advance.

VMware-VIX versions for Gentoo Linux

$
0
0

While installing VMware Player from the Gentoo Linux repositories, I was advised also to download directly from VMware, specifically, "VMware-VIX-1.11.4-744019.i386.bundle". I was not able to find this specific version.    However, I did find the one before it and the one after it. someone swore to me that this unique version, and only this one, had to be used for my purpose. Now risking life and limb here, I have to ask, was such a version ever made, and could it be made available somehow? Thanks.


Where and what is the folder d:\build\ob\bora-xxxxx\

$
0
0

Dear Colleagues,

 

This may be a stupid question but I am unable to find a clear and straight answer anywhere.

 

Can someone tell me where I can find this following folder "d:\build\ob\bora-xxxxx\" What is it for?

 

Reason being, I'm trying to find the following file:

 

File: d:\build\ob\bora-621624\bora-vmso...\hgfssharedmem.c Line: 773

Expression: gHgfsSharedMemoryData.mutex

 

I have no idea where to look for this file and what does it do. Could someone explain this to me please?

 

I need this information in order to troubleshoot the following error. I'm not sure how to proceed.

 

========================================

Microsoft Visual C++ Runtime Library

 

Assertion failed!

 

Program: D:\Program Files\Foundstone\FSAssessment.exe

 

File: d:\build\ob\bora-621624\bora-vmso...\hgfssharedmem.c

Line: 773

 

Expression: gHgfsSharedMemoryData.mutex

 

For more information on how your program can cause an assertion failure, see the Visual C++ documentaion on asserts

 

(Press Retry to debug the application - JIT must be enabled)

 

========================================

 

Best regards,

Ian

vmrun to change a host VM's network adapter connection settings

$
0
0

Hello!

 

I have a vSphere vCenter VM running Windows 2008 R2 that is hosting many VMs of varying OSs on several different network VLANs (100, 200, 300, etc). I would like to be able to run a command from a guest VM running Red Hat Enterprise Linux 6.5 to tell vCenter to switch the network adapter settings from one VLAN to another and back again. I have done a lot of investigating, but I have been unable to figure out a way to do it. The closest thing I have found to what I am looking for are the commands below, but they are not working.

 

vmrun -T vc -h 192.168.0.3 -P443 -gu <guestusername> -gp <guestpassword> readVariable "[Datastore Name] RHEL 6.5/RHEL 6.5.vmx" runtimeConfig ethernet0.vnet /dev/vmnet0

 

vmrun -T vc -h 192.168.0.3 -P443 -gu <guestusername> -gp <guestpassword> writeVariable "[Datastore Name] RHEL 6.5/RHEL 6.5.vmx" runtimeConfig ethernet0.vnet /dev/vmnet1

 

The readVariable command appears to execute successfully, but produces 0 bytes of data, and the writeVariable command gives an error stating that the operation is not supported. Is vmrun able to perform a switch between a VM's network connections or am I going to need to use a different approach? The reason I need to have a command to run instead of simply going into the guest VM's setting in vCenter and selecting the custom network from the drop down is so that the development and testing team can execute a script at will instead of being given administrative privileges.

How to show VM console?

$
0
0

Hi All,

 

I want to show VM console to users, can yo u let me know how can i generate token and pass the token & show the VM Console? Also,could you share any sample web page if available to show the console.

 

Thanks

VMLoginInGuest issue

$
0
0

Hello!

 

I tried to automate some operation on Windows VM. I used function VixVM_LoginInGuest with build-in user name "Administrator", but VIX reported error 3015 ("Authentication failure or insufficient permissions in guest operating system"). If VIX_ADMINISTRATOR_USER_NAME is used instead then I get error 3019 ("Guest operations are not allowed for administrative user on this virtual machine"). Meanwhile I may create another administrator account with name "Admin" and this function works. What are the prerequests for VixVM_LoginInGuest for using "Administrator" as user name?

 

Thanks,

 

Andrey


mapped drives when launching from vix

$
0
0

Hi all,

        I'm using the VIX COM api to start up a vmware workstation 6.0.3 image and revert it to a named snapshot and log in. The snapshot has a mapped drive pointing to a folder on the host OS. When I manually start up vmware workstation and revert the image to the snapshot, I can see the mapped drive in windows explorer and with the command prompt. However, when i use vix to open the image, the mapped drive is not available through the command prompt, although it is visible with windows explorer. Since I'm trying to run a batch script off the mapped drive, this is causing real problems, has anyone seen a similar problem?

 

host OS = Windows Vista Business SP1

guest OS = Windows Server 2003 x64.

Where to download VIX API 1.6.1 ?

$
0
0

Hi,

 

i've read about the release of the new VIX API 1.6.0 and 1.6.1 but where to download the new release ?

I did not find the release in the usual download loaction.

 

 

 

Regards,

 

Christian Prochnow

DHCP Server Lease Time

$
0
0

 

I noticed that the dhcp lease time inside my VM is set to 30 minutes.  Where/how can I adjust the time to increase the lease time?

 

 

thanks,

 

 

Rod

 

 

"Invalid user name or password for the guest OS" error in vmrun runProgramInGuest Operation

$
0
0

 

Hi all,

 

 

i have this script

 

 

"%ProgramFiles(x86)%\vmware\VMware VIX\vmrun.exe" -T ws revertToSnapshot "C:\_virtual-machines\vmware virtual machines\windows xp hry\windows xp hry.vmx" "testovani instalace 3"

"%ProgramFiles(x86)%\vmware\VMware VIX\vmrun.exe" -T ws start "C:\_virtual-machines\vmware virtual machines\windows xp hry\windows xp hry.vmx"

"%ProgramFiles(x86)%\vmware\VMware VIX\vmrun.exe" -T ws -gu user -gp aaaa copyFileFromHostToGuest "C:\_virtual-machines\vmware virtual machines\windows xp hry\windows xp hry.vmx" E:\lgo\software\tes4-oblivion-isles\_actual\Output\lgooblivionshiveringislesczech100.exe c:\temp\lgooblivionshiveringislesczech100.exe

"%ProgramFiles(x86)%\vmware\VMware VIX\vmrun.exe" -T ws -gu user -gp aaaa runProgramInGuest "C:\_virtual-machines\vmware virtual machines\windows xp hry\windows xp hry.vmx" -activeWindow -interactive c:\temp\lgooblivionshiveringislesczech100.exe /silent

 

 

all operations is ok but last operation is write this error message: Invalid user name or password for the guest OS

 

 

i am not understand this. if you see for console output:

 

 

E:\lgo\software\tes4-oblivion-isles\_actual&gt;"C:\Program Files (x86)\vmware\VMware VIX\vmrun.exe" -T ws

+ -gu user -gp aaaa copyFileFromHostToGuest "C:\_virtual-machines\vmware virtual machines\windows+

+ xp hry\windows xp hry.vmx" E:\lgo\software\tes4-oblivion-isles\_actual\Output\lgooblivionshiveringisl+

esczech100.exe c:\temp\lgooblivionshiveringislesczech100.exe

 

 

E:\lgo\software\tes4-oblivion-isles\_actual&gt;"C:\Program Files (x86)\vmware\VMware VIX\vmrun.exe" -T ws

+ -gu user -gp aaaa runProgramInGuest "C:\_virtual-machines\vmware virtual machines\windows xp hr+

y\windows xp hry.vmx" -activeWindow -interactive c:\temp\lgooblivionshiveringislesczech100.exe /silent

 

 

Error: Invalid user name or password for the guest OS

 

 

first guest operation is run ok and second with same username and password not run for username and password problems

 

 

host: windows vista ultimate english x64 sp2

guest: windows xp professional sp3

vmproduct: vmware workstation 7 rtm

 

 

Any idea for this problem?

thanks for any help

 

 

michal zobec

 

 

C# api to do: vmrun copyFileFromHostToGuest - not working.

$
0
0

Hi All,

 

We are trying to run a simple call to copyFileFromHostToGuest    - to a Windows 2008 Server.

 

We hit a snag where we are probably populationg the wrong values in the command-line:

 


E:\Program Files\VMware\VMware VIX>vmrun -T esx -h https://ipaddresshere/sdk -g u  Administrator -gp password$1 -u root -p anotherpass$1 copyFileFromHostToGuest  "[ha-datacenter/GuestMachines] Win2K8-1/Win2K8-1.vmx"  /home/administrator/Desktop  /vmfs/volume/4ec2e3e3-89c45348-1907-001372587064/GuestMachines/LogFileforDA.txt
Error: A file was not found


We can't see to write the correct  syntax of source/destination and so we fail.
I'd appreciate any suggestion on how to put the right syntax to make this call work.
Thanks for any help on this,
-Sup.

vix API C# not able read the CPU utilization and memory usage

$
0
0

iam automating the report of the VI server utlilization. Need help to get the CPU ustilization of the server, IP host of the server list and memeory usage of the VI server. I gone through all the documents i not able get proper help for this. Would someone please provide sample code C# function to do these thing.

 

Thanks in advance

IP Adress changing after reverting a snapshot of virtual machine

$
0
0

Hi!

 

In my scenario I use a virtual machine with installed Windows 7. Network is configurated by Bridged connection.

When I revert to my default snapshot and get an ip address of the virtual machine I begin copy files to a shared folder (which address I compute with ip address).

After few seconds virtual machine changes its ip address and path to the shared folder becomes invalid.

I suppose that it happens because virtual machine needs some time to refresh its ip address after reverting.

I tried to use commands ipconfig /release and ipconfig /renew right after virtual machine reverting, but it didn't work.

 

Is the any ways to force ip address changin, or any way to wait it programmaticaly. Unfortanly we can't use static ip addresses and bridged connection looks as the best way in our envirement.

 

 

Thaks! :)


is there any certain command not available when using vmrunprograminguest?

$
0
0

I tried to use vmrunprograminguest command to change the ip address of a virtual machine.and I write a shell to perform it, as followed

sed -i "s/IPADDR.*/IPADDR=123.123.234.1/g" /etc/sysconfig/network-scripts/ifcfg-eth0

sed -i "s/PREFIX.*//g" /etc/sysconfig/network-scripts/ifcfg-eth0

sed -i "s/NETMASK.*/NETMASK=255.255.0.0 /g" /etc/sysconfig/network-scripts/ifcfg-eth0

/etc/init.d/network restart

and i also tried vmrun,like  vmrun -gu root -gp 123456 runProgramInGuest "E:\\redhat\\Red Hat Enterprise Linux 6.vmx" /bin/bash /root/ipchange.sh

the problem is that the first four line is executed perfectly well, but the network cannot restart. and no error code is returned.

similar problem occured when i try to run other command like start arpd as a background service.

looking forward to your help.

procedure for execute APIs in vmware server

$
0
0

 

hi

 

 

i am installing vmware server in fedora 8. what is the procedure used for execute the APIs.

 

 

Logging into guest VM failing with error 3015

$
0
0

 

The VIX API call LoginInGuest fails with error code 3015 (<![endif]><![if gte mso 9]><![endif]><![if gte mso 10]>

/* Style Definitions */
table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

Authentication failure or insufficient

permissions in guest operating system). I have checked the user anme and password being used is correct.

 

 

 

 

 

VIX version: 1.6.2

 

 

Guest is running UBuntu 10.04 on ESXi 4 Update 1 (Build 20811)

 

 

 

 

 

Thanks in advance.

 

 

Error: The specified service provider was not found

$
0
0

hi all,

 

I just installed vix 1.6.2 and ran the vmrun which gave me the error "Error: The specified service provider was not found"

 

details:

vmware workstation 6.5.1

trying to connect to workstation named "Ubuntu" using vix

 

command ran:

 

c:\Program Files\VMware\VMware VIX> vmrun -T ws  snapshot "C:\U

sers\\Documents\Virtual Machines\Ubuntu\Ubuntu.vmx" mySnapshot

Error: The specified service provider was not found

 

 

the error occurs if i run any command using vmrun

 

can anyone please help me solve this?

VIX Cross Platform C#

$
0
0

I'm trying to assess my options for using the VIX API for an upcoming project.  I'd really like to use C#, however my application must be able to run on windows/linux/solaris.  I know that Mono supports all of these platforms, however it only has limited support for using COM.

 

Has anybody used VIX with C# under a non-Windows platform?  If so how did you go about it?

 

Thanks!

Viewing all 34639 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>