Hi,
is there any way to read a vmx file of a vm while this one is running ? The system is vSphere 5.5
Regards Wolfgang
//edit
Please mention: I want to do this with a running vm. The file is locked and I can't access it.
Browse to the datastore the VM is running in and copy and paste the .vmx into another folder. You should then be able to download it.
SSH into ESXi host,
navigate to VM folder
vi <vm>.vmx
this should allow you to read it.
PowerCli to vcenter/host (connect-vihost)
navigate (cd) to vmstores:vcenter_server\cluster\datastore\vmfolder
get-content filename.vmdk > export_location
Have you every tried it ? This won't work because the file is locked. That's the reason why I wrote while running.
Browse to the datastore the VM is running in and copy and paste the .vmx into another folder. You should then be able to download it.
Yes I have tried it.
Your question is can we read it, yes we can read it the way I have asked you to do.
along with that, you can also modify it if you wish, changes which you are making won't come in effect while VM is running. When you reboot it, all the changes you made in VMX file will be effective.
That's strange I get since years and different versions the same message, when I am connected via ssh to the ESXi:
"server.vmx" Device or resource busy
there is no difference if I try cat, vi, oder cp.
I think you are trying this with <vm>.vmx.lck file
this will give you that message for sure.
Perfect ! This worked. I never thought about the "mouse" version. This would not be a way to automate something, but I helps! Thanks.
I'm sorry I don't take the lck file.
which version ESXi host you are using?
I have taken following from ESXi 6.0
Works for me
I get message like yours if I try that with lck file.
Alternatively, you can use your browser to connect to your host, then browse datastores and finally, vmx file you want.
This is working, I tried it.
Sounds interesting but till now I almost did nothing with PowerCli. I just had a look at this, but it seem's not to be tested in a short time.
I have version 5.5 and this year we won't upgrade to 6. But good to know it will work with the newest one.
Thanks! Seems to work. I just was able to copy one vmx file from the datastore via PowerCli.