VMware Cloud Community
semura
Contributor
Contributor

ESXi and Cold Virtual-Machine-Backups

Hello,

Before installing and moving from VMWare-Server to ESXi i would like to know this.

The most important thing for me is the backup procedure. On VMWare-Server i only had to shut down the VMs and copy the files located somewhere on the harddisc (i.e. d:\Virtual Machines) to another disk and everything was fine. So now that seems to be different on ESXi.

Question: Is the filesystem accessible (via NFS, CIFS, FTP???) on the ESXi-Server if i want to copy a complete VM to USB or to another Backup-Media? Is this the way to backup a ESXi VM ?

Thanks in advance!

Sebastian

18 Replies
RDPetruska
Leadership
Leadership

Thread moved to ESXi forum.

Reply
0 Kudos
leofonic
Contributor
Contributor

I'm quite new to ESXi myself but maybe i can give you some info.

The filesystem is accessible via VI-Client (datastore browser) or scp (if ssh is enabled). You can copy virtual machine directories this way, it works, but i don't think it is supported. Supported backup methods are VCB (but you need a foundation licence for that), traditional backup from within the virtual machine, and vmkfstools (commandline) to make copies of virtual disks.

NFS-shares can also be used as datastores, so you could copy directly from there if the virtual machines live there, or use an NFS-Datastore as backup space.

Edit: I forgot one method that looks quite good to me: vmware converter can be used to convert ESXi VMs to VMware Workstation VMs and back. Maybe someone could shed some more light on this topic, what method is recommended (or widely used) to backup VMs from free ESXi.

Reply
0 Kudos
wizdude
Contributor
Contributor

there are a few vendor products which permit you to backup without VCB. the one which foremost comes to mind is Veeam Backup

they also have a free "fastscp" program (which is actually a component of veeam backup) that will permit you to do exactly what you do with vmware server. you can shutdown the machine and then use fastscp to copy the VM files out to a local disk and then start the machine back up again.

fastscp is about 50% faster than using just a plain scp.

in order for this to function, however, you will need to enable the ssh service on your ESXi box. there are guides which will show you how to do this.

leofonic
Contributor
Contributor

Hi wizdude,

are you sure about Veeam and fastscp beeing compatible to standalone ESXi without VCB? The statement in their datasheet is:

*

"ESXi support

*

Veeam Backup 2.0 features limited support for ESXi servers through VCB. You can now back up ESXi servers using the VCB option in the backup wizard. File-level recovery is fully supported for guests running on ESXi, while full image restore is only supported to ESX 3.x servers. Once the guest has been restored to an ESX 3.x server, you can then VMotion the restored machine back to the ESXi server. Replication is also supported with ESXi as a source and ESX 3.x as a target."

This sounds to me like you need VCB to backup and Vmotion and ESX to restore, that would be a foundation and a VC licence needed.

I also tried fastscp, but i didn't manage to connect. I looked in their forums and found this:

"Thank you for your interest. No, at the moment FastSCP does not support ESXi." (Posted - 06/16/2008 by Gostev, Veeam Software)

Reply
0 Kudos
wizdude
Contributor
Contributor

you are correct. the current release does not support ESXi unless you are using it via VCB in conjunction with virtualcenter.

you essentially have the following options:

1. shut down the VM and use WinSCP to make a backup of the VM directory in the datastore. (this does work - i've already tested it)

2. shut down the VM and browse to the datastore from within the VI client and copy the files this way.

3. treat the VM like a physical machine and use a product like Shadowcraft Shadow Protect which will take a bare metal snapshot of the entire VM (with incremental capability) and push it out to a NAS or similar.

i personally have production machines using technique 3 above. this is not specific to either ESX or ESXi since it's a VM agent based backup solution.

i also used this same solution in reverse to perform a physical to virtual migration. some of my production VM's were originally physical machines.

Reply
0 Kudos
Dave_Mishchenko
Immortal
Immortal

I also tried fastscp, but i didn't manage to connect. I looked in their forums and found this:

"Thank you for your interest. No, at the moment FastSCP does not support ESXi." (Posted - 06/16/2008 by Gostev, Veeam Software)

Have you enabled SSH?

Reply
0 Kudos
leofonic
Contributor
Contributor

Have you enabled SSH?

Yes ssh is enabled, winscp connects fine.

Reply
0 Kudos
wizdude
Contributor
Contributor

i've also confirmed this. the latest fastscp locks up when trying to connect to an ESXi host. connecting to an ESX host is fine.

winscp appears to be the best alternative at this time.

Reply
0 Kudos
robink
Contributor
Contributor

Here is what I do... Enable ssh and RCLI then modify the attached script to your environment. You will need a second storage system. I setup an old box with Openfiler and a single 500GB drive (don't need redundancy for daily snapshots). Create a large iscsi LUN and attach it to your ESX servers. I called it Snaphosts.

The script will...Create a list of all VMs in a datastore. One by one it will create a snapshot of the VM then copy the static part of the disk to the snapshots iscsi datastore. You can have the script shutdown or not shut down the VMs depending if you are fine with a crash consistent backup or not. Never had a problem with a crash consistent back yet... Once the backup disk is created it removes the snapshot. The backup disks are created as thin disks to save network bandwidth and the backup window. Been doing the same concept on VMWare Server for over a year and it works great. ESXi was a little more tricky to setup but it works great and with ESXi you can remove snapshots without shutting down the guest!

FYI... Still do file level backups on file storage shares/drives/

Good luck..

Reply
0 Kudos
leofonic
Contributor
Contributor

Thanks a lot, i've been searching for a script like this but had not found one that worked with ESXi.

Reply
0 Kudos
robink
Contributor
Contributor

The script I posted yesterday had a few issues as I had only been testing it in a R & D environment. I made a few changes and fixed the errors. I am sure there are better ways to do this but with my limited scripting skills this seems to work.

Notes:

You have pass the ESXi hostname username and password via command line or embed it in a shortcut. Or simply modify the script.

The script is not very smart and will try to copy a second disk regardless if there is one or not.

Reply
0 Kudos
papaloewe
Contributor
Contributor

Hi,

"...Enable ssh and RCLI"

ssh is ok, but how to enable RCLI on my ESXI-Server?

Where to put your script then?

Sorry, I'm just new in ESX-Servers.

Thomas

Reply
0 Kudos
robink
Contributor
Contributor

You have to install RCLI on a XP/2003 computer then run the script from that computer.

Note: This script is a work in progress and might need some tweaks for each environment.

Good luck..

Reply
0 Kudos
coote98
Contributor
Contributor

In the esxbackup.txt file which values need to be modified to get this to work I have entered username password, esxi server and changed datastore but am getting errors please can you help

Reply
0 Kudos
xanderphillips
Contributor
Contributor

I'm testing using that script against an ESXi 4.0 test environment and have come across what appears to be an unhandled exeption. If your vm names contain spaces I don't believe the script handles that. I had a vm named "New Machine" and it was trying to backup "New/New.vmdk" files...

I'd fix the script and re-upload, but I don't know how! :smileygrin:

-Xanderphillips

Reply
0 Kudos
bobg15
Contributor
Contributor

Looking for a way to use vmware-cmd on ESXi. It doesn't appear to be possible. The only way I've found to script the start\stop of vms is VMRUN.exe on a windows machine.

Does anyone know if vmware-cmd is possible on ESXi?

Thanks

Reply
0 Kudos
mkoontz
Contributor
Contributor

I was given this script by a consultant who then quit the project. I am new to ESX and trying to forge ahead. THat said, I am having trouble with the script on 4 sphere ESXI box. We made a conenction between the boxes, but the script ends on the first check of the variables, saying there are missing parameters. Anybody have any idea what we might be doing wrong?

@echo off

SET ESXHOST= 10.1.1.248

SET USER= root

SET PASS= *********

SET DATASTOREPATH=/vmfs/volumes/GWVS1

SET SNAPSHOTPATH=/vmfs/volumes/NFS-VMFS01

c:

cd "c:\program files\vmware\vmware vi remote cli\bin"

if "%3" == "" (

echo.

echo Missing parameters (hostname username password)

echo.

goto end

SET ESXHOST=%1

SET USER=%2

SET PASS=%3

)

echo.

echo ESX: %1 (%TIME%)

echo

Reply
0 Kudos
vMariaL
Enthusiast
Enthusiast

semura wrote:

Hello,

Before installing and moving from VMWare-Server to ESXi i would like to know this.

The most important thing for me is the backup procedure. On VMWare-Server i only had to shut down the VMs and copy the files located somewhere on the harddisc (i.e. d:\Virtual Machines) to another disk and everything was fine. So now that seems to be different on ESXi.

Sebastian

Hey Everyone,

I know that this thread is an old one, however Veeam Backup was mentioned several times, that's why I would like to provide the most recent info on the current situation.

Veeam FastSCP is not available as a standalone product any more. It's functionality was built-in to another completely free and significantly more powerful tool called Veeam Backup Free Edition.

Veeam Backup Free is built for virtualization, it supports VMware and Hyper-V and provides a subset of the functionality of the paid edition, enough for day-to-day VM management. Veeam Backup Free can:

  • Create ad-hoc backups of live VMs without the need to power them off (you can store them to tapes, drives, external USB);
  • Migrate live VMs between host and datastores if even vMotion and vStorage Motion aren't available;
  • Manage your VMs (clone, copy, export VMware VMs and more);

You can download the latest version of free Veeam Backup Free Edition here: http://www.veeam.com/virtual-machine-backup-solution-free.html

Please let me know if any questions will appear or you will need any assistance.

-----

Veeam Community Manager

---- Veeam Community Manager
Reply
0 Kudos