Is there a way for a host to read files within virtual machines?
So you can get the informations using vmrun command then i think vmware-cmd command will help to set variables which can reflect inside the vmx file. Also vmx file is inside the ESX server only so you can shutdown the VM and edit the vmx file then you can register the VM using vmware-cmd command.
Thanks,
I don't think thats possible with ESX.
Hi,
In ESX server, "vmrun" command will work to copy the files from virtual machine to ESX host. So after copying the files you can read it from ESX host. To get vmrun command in ESX, you have to install VIX-perl toolkit(Vmware-vix-1.6.2-127388) in ESX host which is downloadable from vmware site.
Thanks,
Thanks, I did download the VIX and I am able to read the file using vmrun. Unfortunately, the command options under vmrun to write to a vmx file are disabled for an ESX host. What I was attempting to do was read some registry keys from a guest (which I can do with vmrun) and then write them to the annotations field in the vmx file. (cannot do this)
Does anyone know any work around for this? 😕
So you can get the informations using vmrun command then i think vmware-cmd command will help to set variables which can reflect inside the vmx file. Also vmx file is inside the ESX server only so you can shutdown the VM and edit the vmx file then you can register the VM using vmware-cmd command.
Thanks,
Thanks, I'm executing the vmrun command from a guest windows VM. I copy the necessary files from other virtual machines using vmrun, but now I do not have the info on a host to write to the vmx file. I can SSH to the host and run the vmware-cmd commands to write to the vmx file, but unfortunately I am unable to automate the process.
Looks like I can pass the vmware-cmd to the host using plink... Thanks for the help! Very much appreciated!
I would like to clarify with the automation process. Are you trying the automation from guest machine? then i think some remoteCLI will help you but you can automate this from host itself(using vmrun and vmware-cmd commands).
Thanks,
Yes, I am attempting the automation from a guest, but only because the VIX installer I had access to was for a Windows based machine. Would I need to install VIX on the host to automate this from the host itself?
Hi,
Yes you have to install VIX on ESX before automate from host.
Thanks,
Looks like that will be the best option. I have been tinkering with the rCLI on Windows. Unfortunately the vmware-cmd.pl seems to support a limited command set versus what is available using vmware-cmd on the service console itself. Writing annotations from the rCLI does not seem to be possible. I'm surprised that there is no easy way to read annotations from a guest, similar to how the IP address and hostname appear in the VIC.
Hi,
You can try vmware-vim-cmd command to get ipaddress and other details but without ipaddress you can communicate with VMs using vmrun command. Actually I have automated the process to copy file from host to guest and run my application in guest and copy the files from guest to host without get any IP address details but i think its possible to get that info.
Thanks,