Ssh – ESXi 4.1.0 build-260247 best way to get VM off

sftpsshvmware-convertervmware-esxi

I'm having a hard time copying a VM from my ESXi 4 … I never tried to copy a VM because I always did the backup inside the VM but now I want to retire this server and need to get a final full backup.

What I tried so far:
1. Using vCenter "Browse Datastore": this is really slow and just keeps aborting after 20-30 hours (the VM has two flat disks which grew to about 200 GB each and with maybe ~40 GB real data inside).
2. Using VMware converter: this works for other (smaller) machines on the same host-server, but the specific VM hangs on "retrieving data".
3. Copying sftp-server binary to /sbin. This enables me to connect with ssh-fs to the ESXi, but transfer only works for small files (<10MB) with larger files I only get "Connection closed by server with exitcode 139" (no other usefull information in client/server log file, tried via veeam-fastscp, winscp, filezilla …).

Has anyone another idea to get a backup of this VM?

Best Answer

Follow these steps -

1) ssh as root to your ESXi 4 host

2) cd to the datastore containing your vm eg. cd /vmfs/volumes/datastore

3) compress the VM, make sure it is powered down

    tar czvf  myoldvm.tgz  myoldvm/

This will significantly reduce the size.

4) scp myoldvm.tgz to your backup server. Make sure you run scp in background mode.

5) Once you need to use the VM, simply uncompress it on the other end and add it to the inventory of your new host.

Related Topic