-2

Here is my situation right now,
I have a server in a datacenter with some VMs on it which I sold as VPS,
Right now the DataCenter has suspended my server because of hack attempt by one of my VMs.
They gave me an FTP account which points to the root of ESXi Server ( I can see etc,mnt,home) and asked me to backup my VMs so the wipe the server.
The problem is I don't know where my machines files are (VMDK files I suppose? ).
Please help me because my time before the server getting wiped is running out.
Thanks.
P.S: I only have FTP access, Nothing Else.

  • 4
    FYI: Reselling virtual machines on ESXi is against the license agreement. – JohnD Jan 22 '14 at 17:26
  • 1
    How exactly did the people at the DC give you access to your ESXi box? Did they login to ESXi? Did they boot it into a Linux live CD? What did they do? – MikeyB Jan 22 '14 at 17:27
  • 6
    Are you 100% sure they gave you FTP access to the ESXi host, and not to one of the VMs on it? To my knowledge there is no built-in FTP server in ESXi, and I don't personally see a datacenter going to the trouble to upload/run static binaries on an ESXi install to provide this access. – jlehtinen Jan 22 '14 at 17:27
  • @jlehtinen - you are correct – Chopper3 Jan 22 '14 at 17:29
  • 1
    When all this is said and done, try and sort out a backup plan/DRP before you get back into the VPS business. – Aaron Copley Jan 22 '14 at 17:39
6

The default location is /vmfs/volumes/

From vmware documentation:

Determining the location of all your virtual machine files:

From the Command Line

To determine the location of all your virtual machine files from the command line: Log into the VMware ESX/ESXi host as the root user. For more information on VMware ESX Service Console, see Unable to connect to an ESX host using Secure Shell (SSH) (1003807). For more information on VMware ESXi Technical Support Mode, see Tech Support Mode for Emergency Support (1003677). For more information on VMware ESXi 4.1 - 5.0 Technical Support Mode, see Using Tech Support Mode in ESXi 4.1 and ESXi 5.0 (1017910).

Type vmware-cmd -l to list the location of the configuration files for the virtual machines registered on an ESX host. Type vim-cmd vmsvc/getallvms to list the location of the configuration files for the virtual machines registered on an ESXi host. Record the location of the .vmx file (configuration file) for the virtual machine you are troubleshooting. For example:

/vmfs/volumes/46b2f3eb-ced4c7d8-c1d2-111122223333/vm1/vm1.vmx

If the virtual machine is not registered on the ESX host and you want to search its configuration file, run this command and press Enter:

find / -name "*.vmx"

The results of step 4 list all virtual machine configuration files. Search the results for the name of a virtual machine file you are interested in locating. The results also list the path to the directory where these files are located. By viewing the configuration file of a virtual machine you can tell where all of its associated files, including .vmdk files, are located. If a file is not in the same directory as the configuration file the complete path is shown in the configuration file. For example, a second hard disk may have an entry such as the one shown below:

scsi0:1.present = "true"
scsi0:1.fileName = "/vmfs/volumes/46b2f3ea-980a1c90-3333-00112233bb44/diskStore/secondHardDisk.vmdk"
| improve this answer | |
  • Thanks for your answer, please refer to the comment I have made above. – Sam Jan 22 '14 at 17:16
  • Sounds like it's not mounted. Which makes sense if you're in some sort of Live environment without native VMFS support. You will need a login shell in order to install the necessary tools, or have the Datacenter support assist you further. – Aaron Copley Jan 22 '14 at 17:39
5

They're in datastores, which are mounted under /vmfs/ in an ESXi server.

| improve this answer | |
  • Thanks for your answer, But there's no such a directory at root. bin boot dev etc home lib mnt nfs opt power proc root run sbin sys tmp usr var – Sam Jan 22 '14 at 17:16
  • That's weird. Can you provide the output of this command? esxcli storage filesystem list – Gabriel Talavera Jan 22 '14 at 17:20
  • "I only have FTP access" – JohnD Jan 22 '14 at 17:23
  • 1
    Try the nfs folder. If the esxi host was set up to use nfs they may be in there. Additionally is the server booted right now off of a live cd of some kind? If it is and the storage is remote from the esxi host the filesystem where the VM's are stored may not be visible. – Nick Pappin Jan 22 '14 at 17:28
  • @NickPappin ESXi places NFS mounts in the /vmfs/volumes folder – jlehtinen Jan 22 '14 at 17:31
0

Without having more details it's hard to say how to access your vm files. Being that the vendor has only provided FTP access, which may or may not have root access to the host, is a problem. Based on my experience with VMWare there isn't a home directory or mnt directory on the root of the drive but this may be a difference between versions.

The answers from Shane and Gabriel regarding the path /vmfs is correct. Under the /vmfs/volumes folders you should find your datastores that the host can access. Again with FTP access this may not be visible as the vendor could have limited your access. Chances are your VM isn't the only one on the host and they are limiting your security, or pointing you to another server for the FTP. I'd contact the vendor to have them either export the files to an FTP location for you or find another method of connecting to the host. As a side note, if they export the files for you make sure they at least get the .vmdk and the .vmx, not just the .vmdks.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.