Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
"get VM off"... Are you trying to permanently move the virtual machine or are you interested in obtaining a regular backup of the contents within? –  ewwhite Feb 15 '13 at 15:52
    
The VM is our zimbra box, but we already migrated everything to hosted exchange, so the VM is powered off and I only want to retreive it from the ESXi before it is getting permanently deleted for purpose of archiving. I want to have the full VM/VHDs to later power on the VM (on my workstation for example) when there'll be a need for some reason. –  s1lv3r Feb 15 '13 at 15:58
    
Is your ESXi host going away or hurting for space? If not, just remove the VM from inventory but not disk. Then if you need to power it on later it's a simple matter of adding it back to inventory. –  TheCleaner Feb 15 '13 at 16:00
    
The ESXi is going to be shutdown, too. That's the reason I somehow need to get a backup of the VM. It's also hosted in a remote datacenter, so there will be no way to have physically access to the HDD's or plug-in a USB harddisk or something ... –  s1lv3r Feb 15 '13 at 16:03

3 Answers 3

up vote 1 down vote accepted

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.

share|improve this answer
    
tar: cannot store file 'Zimbra/Zimbra_5-flat.vmdk' of size 177167400960, aborting ... I guess tar has a size limit, and the vhd is to large? –  s1lv3r Feb 15 '13 at 16:15
1  
... used vmkfstools to convert the vhd to 2gb sparse format, now tar worked fine and scp did also. Thank you very much! –  s1lv3r Feb 15 '13 at 16:25

I would export the VM as an OVF file if you intend to preserve or move it and need a portable format. You can run this via the vSphere client interface and copy to your local workstation's disk...

An OVF package captures the state of a virtual machine or vApp into a self-contained package. The disk files are stored in a compressed, sparse format.

Also see: How to export a VMWare ESXi 5 VM into a file to restore it later?

share|improve this answer
    
I never saw this option in vSphere. Is it also available with ESXi 4.1? –  s1lv3r Feb 15 '13 at 16:35
    
Yes. Select the powered-off VM, then choose the File -> Export -> Export OVF Template option. –  ewwhite Feb 15 '13 at 16:38

How about using Veeam Zip (free) and take a one time backup of it? It is pretty quick and will compress it as well. You can them dump that one file wherever.

http://www.veeam.com/free-microsoft-hyper-v-server-backup.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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