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
spex
Expert
Expert

Guten Tag,

ich bin am 15.06.2009 wieder im Haus.

Bei wichtigen Problemen wenden Sie sich bitte an Herrn Herbert Bachmann.

Ihre E-Mail wurde nicht weitergeleitet

Danke

Stefan Holzwarth

0 Kudos
Cellolein
Contributor
Contributor

Ich bin bis einschließlich 17.06.09 nicht im Hause. E-Mails werden nicht bearbeitet oder weitergeleitet. In dringenden Angelegenheiten wenden Sie sich bitte an meinen Kollegen Herrn Venker. Email: venker@schmitz-werke.com Telefon: +49 2572 927 0. Über unsere Telefonzentrale werden Sie an Herrn Venker weitergeleitet.

Mit freundlichen Grüßen,

Marcel Ruholl

Schmitz-Werke GmbH + Co. KG

Abteilung EDV

Hansestrasse 87

48282 Emsdetten - Germany

fon: +49 (0) 2572 927-198

fax: +49 (0) 2572 927-9198

mailto:MRuholl@Schmitz-Werke.com

http://www.schmitz-werke.com

KG, Sitz Emsdetten, Amtsgericht Steinfurt HRA 3133

Komplementärin: C.H. Schmitz Beteiligungsges. mbH

Sitz Emsdetten, Amtsgericht Steinfurt HRB 3612

Geschäftsführer: Justus Schmitz

Diese E-Mail ist revisionssicher archiviert.

This e-mail is legal audit proof archived.

0 Kudos
sanbe
Contributor
Contributor

I´m not in the office until 17.06.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

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
Argyle
Enthusiast
Enthusiast

When it comes to NFS on Windows take a look at the Release Candidate for Windows 2008 R2. It can be downloaded for free. There is a new NFS option called "Unmapped UNIX User Access".

"An Unmapped UNIX User option is now available for NFS shared folders. Windows servers can be used for storing NFS data without creating UNIX-to-Windows account mapping. Mapped user accounts use standard Windows security identifiers (SIDs) and unmapped users use custom NFS SIDs."

More info:

What's New in Services for NFS in Windows Server 2008 R2

http://technet.microsoft.com/en-us/library/dd540762(WS.10).aspx

Services for NFS Step-by-Step Guide for Windows Server 2008 R2

http://technet.microsoft.com/en-us/library/dd758767(WS.10).aspx

0 Kudos
bones_79
Contributor
Contributor

.

0 Kudos
AlbertWT
Virtuoso
Virtuoso

Thanks for the reply argyle. we don't have the license to implement Win2008 R2 yet though. But it is good to know that such feature does exist.

Kind Regards,

AWT

/* Any kind of comment or input would be greatly appreciated */
0 Kudos
jllopezg
Contributor
Contributor

Hello everybody,

I am trying to do the backup of a esxi with this script, it is working perfecty, but I need to backup the vm´s with rdp too.

I have tried the ghettoVCBg2.pl without success.

Anybody has the code to add to the script to backup the vm´s ignoring the rdp?

Thanks a lot for yor help!

Regards.

Jose

0 Kudos
tranceking
Contributor
Contributor

Is there a modification where we can backup other vmdk in a vm and skipping only rdm disk instead of skipping the whole vm.

This will make the script very usefull

0 Kudos
mennouth
Contributor
Contributor

Ok i finaly got the script to run using VMwares new version of the RCLI,only to get prompted on the creation of the snapshots that the version is restricted

in the vi client it says that i m running version 3.5.0 build 158874 I am presuming this is the version after they locked the RCLI down to read only. so i did a little digging and it seams that there is anouther way to create the snapshots using vm vix 1.6 so i could schedual a few diffrent jobs one to go in and make the snapshot using the VIX api and the other to go in and copy the files using the RCLI then execute anouther script to open up the VIX api and remove the snapshot on the server in question.

I use windows NT backup for all but one of the servers on the that way i can have incrimental backups, and i would use it on the exchange server, however there is a major issue with using the enhanced backup built in with exchange on a VMware platform. which leaves me hunting for a script.

the question i have is there anyone willing to help woddle my way through the code to set it up.

0 Kudos
banthorpe
Contributor
Contributor

ok - so I have recently downloaded your script to get it to work. However, I have only uncommented 1 VM name in the array (see below), but the script still copies the snaps of all running VMs as opposed to just those specified in the array?

my $DSPath = "[ESXIDMZ01_1]"; #Datastore name on ESX Host, example

my @VMNames;

$VMNames[0] = "C2C"; #Uncomment the next lines if you like to backup more vm's

#$VMNames[1] = "";

#$VMNames[2] = "";

#$VMNames[3] = "";

#$VMNames[4] = "";

#$VMNames[5] = "";

#$VMNames[6] = "";

#$VMNames[7] = "";

#$VMNames[8] = "";

#$VMNames[9] = "";

my $RCLIPath = "C:/PROGRA1/VMware/VMWARE2"; #VI Remote CLI Path (Windows: Use ONLY Short Folder Names!!!!)

my $DestPath = "f:/esxidmz01/";

0 Kudos
banthorpe
Contributor
Contributor

OK got it all working now Smiley Happy

However, I am trying to backup a VM where the disks are thinly provisioned. So when it takes the snap and then does the backup it has to expand the file to it's full size and I end up with 3 VMDK files:

test.vmdk, test-flat.vmdk and test-000001.vmdk

if I blow away the VM and then copy everything back from the backup location it tells me that the test.vmdk is an invalid file. any ideas what is going on here?

0 Kudos
cincinnerdi
Contributor
Contributor

This is an automated response to email sent to scott.ledyard@nerdsonsite.com

I am out of town presently, but will be checking messages once each day.

In the event of an emergency, please contact my backup eNerd, Jeremy Laughlin at 859-380-8983 or jeremy.laughlin@nerdsonsite.com.

Or contact our dispatch (please mention your a client, if you are) at 1-877-696-3737.

Scott Ledyard

513-708-7682

0 Kudos
Cellolein
Contributor
Contributor

Ich bin bis einschließlich 02.10.09 nicht im Hause. E-Mails werden nicht bearbeitet oder weitergeleitet. In dringenden Angelegenheiten wenden Sie sich bitte an meinen Kollegen Herrn Venker. Email: venker@schmitz-werke.com Telefon: +49 2572 927 0. Über unsere Telefonzentrale werden Sie an Herrn Venker weitergeleitet.

Mit freundlichen Grüßen,

Marcel Ruholl

Schmitz-Werke GmbH + Co. KG

Abteilung EDV

Hansestrasse 87

48282 Emsdetten - Germany

fon: +49 (0) 2572 927-198

fax: +49 (0) 2572 927-9198

mailto:MRuholl@Schmitz-Werke.com

http://www.schmitz-werke.com

KG, Sitz Emsdetten, Amtsgericht Steinfurt HRA 3133

Komplementärin: C.H. Schmitz Beteiligungsges. mbH

Sitz Emsdetten, Amtsgericht Steinfurt HRB 3612

Geschäftsführer: Justus Schmitz

Diese E-Mail ist revisionssicher archiviert.

This e-mail is legal audit proof archived.

0 Kudos
cincinnerdi
Contributor
Contributor

This is an automated response to email sent to scott.ledyard@nerdsonsite.com

I am out of town presently, but will be checking messages once each day.

In the event of an emergency, please contact my backup eNerd, Jeremy Laughlin at 859-380-8983 or jeremy.laughlin@nerdsonsite.com.

Or contact our dispatch (please mention your a client, if you are) at 1-877-696-3737.

Scott Ledyard

513-708-7682

0 Kudos
Krede
Enthusiast
Enthusiast

Is enabling the service console the only way to make scripted backups on Free ESXi 4 U1 hosts?

Is there any problemes related to enabling the service console?

Regards

Christian

0 Kudos
DSTAVERT
Immortal
Immortal

Enabling SSH or running from the local CRON.

It is possible to have anything affect the stability of the host. Running anything extra is a potential issue. Generally proven to be OK although some have disabled it again.

-- David -- VMware Communities Moderator
0 Kudos
KBuchanan
Enthusiast
Enthusiast

Want VMware going to disable console write access? I'm pretty certain there was a written statement about it. They had mistakenly opened the write access on the free version.

Kevin Buchanan

Chief Information Officer

Lexington Memorial Hospital

Lexington, NC 27293

Ofc: 336-238-4286

Fax: 336-238-4587

0 Kudos
lamw
Community Manager
Community Manager

The few current available backup solutions (scripted) with conjunction with ESXi (free version) requires the unlocking of the unsupported busybox console, also known as Tech Support mode which is generally used with VMware Support. One such script is which requires the script to exist one one of the accessible VMFS/NFS volumes, the actual execution must be done within this console (don't get confused with Service Console from classic ESX, it's not the same). As David mentioned earlier, you can setup the scheduling of the script either locally or remotely but the script must exists on a volume that busybox console can access and most importantly, you need to SSH to the system to execute the script.

If you purchase a licensed version of ESXi, then the various tools that you can use increase and some great backup solutions are like Veeam Backup and Replicate or VMware vDR/VCB

Hopefully this clears things up

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

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
lamw
Community Manager
Community Manager

You're getting confused with unsupported busybox console versus the API hiccup by VMware during the release of ESXi 3.5u2/u3 where the internal VMware API was accidentally unlocked for both read/write access which allowed users to take advantage of the VI API to perform both read/write operations, the question here is different and not related. More can be found here: http://vmetc.com/2009/03/31/esxi-u4-ends-free-version-read-and-write-access-from-the-rcli/

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

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
dacrusher
Contributor
Contributor

Sorry for the newbie question that may have been posted somewhere in this 35 page post. The information here has been really helpful, but it appears that I seem to be one that can't get the script to work properly on a windows xp machine- possibly because of the version (ESXi 4) but when I run the script, I get the following errors:

2009-12-06 13:44:16 -


Copy VM files to local storage -


2009-12-06 13:44:20 -


Copy File: Parent DirectoryGET https://10.10.100.151/f

older/sysvmit/Parent%20Directory?dsName=iSCSIDataStore unsuccessful : 404 Not Fo

und

Error: File can not be downloaded to C:/Test/sysvmit/Parent Directory.

2009-12-06 13:44:25 -


Copy File: Windows7 Base Image-flat.vmdkGET https://10

.10.100.151/folder/sysvmit/Windows7%20Base%20Image-flat.vmdk?dsName=iSCSIDataSto

re unsuccessful : 500 Internal Server Error

Error: File can not be downloaded to C:/Test/sysvmit/Windows7 Base Image-flat.vm

dk.

Aside from these 2 files, the rest seem to download successfully..although they are all very small.

Any insight would be greatly appreciated!!

Thanks in advance!!

0 Kudos