I would like to know how I can export a VM(directory structures) after SSH? The issue is that the login on ESXi is lost. But we can ssh on the vm which was created on it. On ESXi we would have created an ova file.
Here is an action plan for exporting a Guest Machine using vSphere Client ->
Open your vSphere client.
Turn off the VM you want to back-up.
Delete and consolidate any snapshots you may have.
Highlight the VM in the left pane.
Click File — Export OVF Template.
Give your export a name, location to export to and whether you want it in single file or multi file mode.