VMware Cloud Community
ChrisInTexas
Contributor
Contributor

Free ESXi Backup Solution for Windows

I have spent the last few days trying to find a free backup solution to the newly free ESXi for windows only enviroments (in particular Windows XP). The solution for me was the following:

1. Installing Windows Services for UNIX (WSFU)

2. Copying the ESXi Server password and group files to Windows

3. Configuring WSFU for accepting ESX Server connections

4. Sharing the Windows folder for NFS compatibility

5. Configuring the ESXi Server to mount the Window NFS Share as Datastore.

6. Setup Backup Script

Attached is the complete steps.

I take NO credit for any of this. This is just a complation of others work formated to suit my needs and felt others could benift from it as I have.

by Jason Mattox from Vizioncore (direct copy of his work, I just added more information to make it work in Windows XP)

(NFS Server port information)

by robink (The backup script)

(ssh on ESXi)

Tags (3)
0 Kudos
522 Replies
johnnymo
Contributor
Contributor

Hi Sanbe,

I am trying your script but i have had no success until now. I have edited all variables that i think are necessary,

but no go, the snapshots are made in all VMs but when its time for the download of the actual files i get a 404 error.

2009-02-26 03:54:45 - Copy VM files to local storage -


GET https://my_url_here/folder/datastore1 unsuccessful : 404 Not Found

GET https://my_url_here/folder/datastore1%20hsone unsuccessful : 404 Not Found

(hsone is one of the VMs)

After this the snapshots are deleted and script ends. I'm no command line or linux expert...

I'm running VMware ESX Server 3i 3.5.0 build-123629, can you help?

TIA

Problem solved... my stupidity. Instead of "[datastore1]" in $DSPath i put "datastore1".

It's all in the script... Thx!

0 Kudos
spex
Expert
Expert

Guten Tag,

ich bin am 02.03.2009 wieder im Haus.

Bei wichtigen Problemen wenden Sie sich bitte an Herrn Dr. Matthias Weger.

Ihre E-Mail wurde nicht weitergeleitet

Danke

Stefan Holzwarth

0 Kudos
shechtl
Contributor
Contributor

-

0 Kudos
ing2k-simone
Contributor
Contributor

I've the same problem with nohup command!

it seems that the nohup command under ESXi only redirect output on nohup.out!

and if i try to run the command with plink.exe, the file nohup.out is not created!

my command is:

plink.exe -pw mypasswd "nohup ./vmfs/volumes/DSiS01_BCK/VCB_Script/ghettoVCB.sh /vmfs/volumes/DSiS01_BCK/VCB_Script/VM_backup_list &"

anyone have a workaround?

0 Kudos
ing2k-simone
Contributor
Contributor

i found a solution with this command

./ghettoVCB.sh VM_backup_list 2>&1 | tee ./logfilename &

0 Kudos
rgarzar
Contributor
Contributor

Hi....

I'm testing this script and I have a little problem. The script its stuck (a week) removing an snapshot from a Windows 2003 guest and I don't want to damage this VM.

If I try to remove the snapshot from the VIC, it doesn't finish (95%). What can I do to cancel the script and remove correctly the snapshot?

Any ideas?

0 Kudos
lamw
Community Manager
Community Manager

There are some instances where snapshots created from the CLI using vimsh will not allow you to remove the snapshot from VIC.

What you can do is SSH to console (if you're comfortable) and you'll want to search for your VM using the vim-cmd.

1. Locate the VmId for the VM in question, looking at your screenshot I'll assume the name is Windows2003

vim-cmd vmsvc/getallvms | grep -i "Windows2003"

This should return you a single row and the first column will be a numeric value representing the VmId for this virtual machine

2. You will then take that VmId and pass it to the following command to remove the snapshot, I assume you only have 1 snapshot which was created by the backup script? (please double check prior to running)

vim-cmd vmsvc/snapshot.remove [VmId]

You also have the option of committing all snapshots if you have more than one and also if you only have one you can also use the following command:

vim-cmd vmsvc/snapshot.removeall [VmId]

This should commit your snapshot and allow you to completely process it.

=========================================================================

--William

VMware ESX/ESXi scripts and resources at:

0 Kudos
IT_Architect
Enthusiast
Enthusiast

This thread was a fine discussion to hammer several different methods out, with many changes and fixes. The problem with it is, at least separte 4 forks evolved, and changes to each. After reading 26 pages, nobody will have any idea what to do or where to find the most up to date scripts and instructions. There needs to be a new thread that is a summary of this thread, the lists the methods, the advantages and disasdvantages of each approach, and where to find the most current code and instructions for each.

0 Kudos
sanbe
Contributor
Contributor

I´m not in the office until 16.03.2009. Your E-Mail won´t be forwarded. In urgent cases contact "PTD DataCenter" oi-sd-datacenter-mailbox.ptd@siemens.com

With best regards,

Bernd Sandner

Siemens AG

GIO IT SHS 94

Freyeslebenstr. 1

91058 Erlangen, Germany

Tel.: +49 (9131) 7-35210

Fax: +49 (9131) 7-31537

Mobile: +49 (171) 2296136

mailto:sandner.bernd@siemens.com

Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme; Managing Board: Peter Loescher, Chairman, President and Chief Executive Officer; Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Barbara Kux, Hermann Requardt, Siegfried Russwurm, Peter Y. Solmssen; Registered offices: Berlin and Munich, Germany; Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684; WEEE-Reg.-No. DE 23691322

Important notice: This e-mail and any attachment thereof contain corporate proprietary information. If you have received it by mistake, please notify us immediately by reply e-mail and delete this e-mail and its attachments from your system. Thank you.

0 Kudos
peedy
Contributor
Contributor

Amen to that! I'm trying to make heads or tails of all the forks and Im lost.

0 Kudos
lamw
Community Manager
Community Manager

I agree, initially I was just providing a quick script to run a backup, but there were some very interesting feature requests and this thread just started to grow. I have not used the other solutions provided in this thread and I'm not sure what are the pro/con(s) of each and the latest revision of the scripts.

ghettoVCB is kept up-to-date at: http://communities.vmware.com/docs/DOC-8760 and there is also detailed instructions on setting this up in a Windows environment and scheduling backups provided by Raj Perumal

At the end, it's really up to the end user's and their requirements for their environment to decide what is the best solution. I know Veeam Backup is another popular tool that also supports both ESX/ESXi and the free version of ESXi. It would be nice for someone that has used all the tools and provide a small post on the pros/cons but even then that may spawn an even larger post, not mention other 3rd party backup tools that are not free.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

0 Kudos
KBuchanan
Enthusiast
Enthusiast

I'm away from my PC, but I'll post my script. It uses the RCLI and the SDK - both of which ARE SUPPORTED by VMWARE.

My script will backup (clone) from multiple sources and will backup TO multiple targets.

Sure they are many options available...but ultimately, the admin needs to assess the options on THEIR OWN to be sure the scripts work in their environment and meets their own specific requirements.

Kevin Buchanan

Chief Information Officer

Lexington Memorial Hospital

336-238-4286

kbuchanan@lexmem.org

0 Kudos
lamw
Community Manager
Community Manager

You should create a VMTN document on your script and processes, that way it can be easily accessible and kept up-to-date for others to find

FYI - The next revision of ghettoVCB will be using supported APIs/platforms by VMware 😃

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

0 Kudos
StuartLittle
Contributor
Contributor

Hello all,

Firstly thank you to everyone who made these scripts available - they are a god send! I understand the scripts have been developed and have evolved since their first creation and believe the GhettoVCB is the most recent version however I currently use the Esxibackup.pl perl script to backup my VM's and it works great.

The one question I have and was hoping someone could help with was: how or what code do I need to backup a single VM?

At the moment the Esxibackup.pl script creates a snapshot for every powered on VM which is currently 12 servers and backups whatever one I label in the code but I only want to backup a single server without all the snapshots ... the reason I'm asking is because I'm running low on local storage space and won't have enough for all the snapshot's it creates for the 12 servers.

Is there a way I can simply code the script to snapshot and backup a single server please?

Look forward to any help and thanks in advance!

Kind regards,

Stuart

0 Kudos
kchawk
Contributor
Contributor

All of the scripts are great and the repsonse is great. I use this forum as an example when I am trying to get management to use more open source apps and to use the community support model. Anyway, my question is about the supported methods for rcli, is the speed issue wih vifs still an issue or is there another method without using the unsupported console method?

0 Kudos
KBuchanan
Enthusiast
Enthusiast

The RCLI is supported, but the remote console on ESXi isn't. I had a support case e weeks ago. After the tech asked about the problems, they asked if I could start a console with putty. NOW...isn't interesting that they asked if I could start a remote console when SUPPOSEDLY, it isn't supported!?!

I figure they don't want to open the OS on the "free" version...maybe because there is an assumption that the admins will not be trained at a reasonably competent level (compared to an ESX admin). I don't know, that's just my assumption.

That was my first ESXi support case. He didn't asked if I had enabled the remote console...he assumed it.

SO...even though it says it isn't supported, the tech went straight to it!

Kevin Buchanan

Chief Information Officer

Lexington Memorial Hospital

336-238-4286

kbuchanan@lexmem.org

0 Kudos
IT_Architect
Enthusiast
Enthusiast

ghettoVCB is kept up-to-date at: http://communities.vmware.com/docs/DOC-8760 and there is also detailed instructions on setting this up in a Windows environment and scheduling backups provided by Raj Perumal.

Now there's something I can use.

Thanks tons!

0 Kudos
lamw
Community Manager
Community Manager

When you unlock the unsupported ESXi console you'll notice in red that it's called Tech Support Mode:

From http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=1003677&sl...

Tech Support Mode provides a command-line interface that can be used to diagnose and repair VMware ESXi hosts. Tech Support Mode should only be used at the request of VMware technical support.

When you have issues with ESXi, VMware support may be using the Tech Support Mode to help troubleshoot issue. It's unsupported in the fact that user's should not be opening up the console and using it as they have in the past with the full Service Console in the classic ESX.

As you may or may not be aware, RCLI read/write operations currently works in ESXi 3.5u3, this was done inadvertently while fixing an internal VMware API bug. Either in a future release or patch update, the RCLI will only have read access if you're using the free version of ESXi. This is important to note when the fix is out and the backup solution that uses the RCLI may no longer function unless you're paying for an ESXi license.

In terms of the speed of the RCLI, it's well known by VMware and hopefully performance will be fixed in a future release.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

0 Kudos
fahrer
Contributor
Contributor

Does this effect creating snapshots and shutdowns of vms over the rcli?

0 Kudos
lamw
Community Manager
Community Manager

Yes, those are consider write operations, any changes to the system using the RCLI are considered write operations. Per the ESX vs ESXi comparison chart, it looks like you'll need at least the Foundation license to allow both r/w operations. This is actually something we're still investigating and hopefully sales will be able to give us a definitive answer, I've heard from various sources that there might be an API license for ESXi because Foundation by default provides vCenter and not all users may need or want to run vCenter. I can update once we get a definitive answer, but from that document it looks like you need at least the Foundation to have full access to the RCLI.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

0 Kudos