joshpond Posted February 17, 2014 Share Posted February 17, 2014 Hi All, Just after people's opinion on how to "backup" ESXi VMs? Not a true backup as it isn't offsite but I just want a copy so that if the DataStore drive dies I can put a new datastore in, create the unRaid VM again and copy them off that. Do I just copy the vmdk and vmx files or use something like Veeam if it works with ESXi Free version? Thanks Josh Quote Link to comment
overbyrn Posted February 17, 2014 Share Posted February 17, 2014 Hi All, Just after people's opinion on how to "backup" ESXi VMs? Not a true backup as it isn't offsite but I just want a copy so that if the DataStore drive dies I can put a new datastore in, create the unRaid VM again and copy them off that. Do I just copy the vmdk and vmx files or use something like Veeam if it works with ESXi Free version? Thanks Josh You could do worse than to check out ghettoVCB. Takes a bit of time to setup, but once you have it configured, it's largely set it and forget it. https://communities.vmware.com/docs/DOC-8760 Trilead VM Explorer is an alternative to Veeam. http://www.trilead.com/ Quote Link to comment
joshpond Posted February 17, 2014 Author Share Posted February 17, 2014 Thanks, ghettovcb looks good with a lot of functionality. Trilead isn't too bad to, I'll have check them both out. Josh Sent by tapatalk Quote Link to comment
BobPhoenix Posted February 17, 2014 Share Posted February 17, 2014 I just boot my VMs with an Acronis True Image CD image. Then I image the HDD. I don't have the VM settings but for unRAID it is very easy to setup. With 5.0 I have 3GB mem, 2GB VMDK and pass through M1015 card. I use USB pass through for the unRAID flash drive. So it takes me about a minute to setup from scratch. NOTE I just have my VMDK as a copy of my flash drive so I don't really use True Image for that. I have some Windows VMs that I backup with True Image. So if I was having to restore from a datastore crash: I would first setup my Windows VM. Restore the HDD image of the Windows VM. Create a 2GB VMDK for unRAID but attach to Windows VM as second drive. Boot up Windows VM and format VMDK, run MakeBootable.bat and copy unRAID flash drive to VMDK. Then attach VMDK and flash drive to new VM and am back in business. I know that sounds like a lot but it is nothing to setup a VMDK from scratch for unRAID since all configuration files are on the flash drive anyway. The super.dat and config folder files are updated on the flash drive not the VMDK so a copy of the config folder from flash to VMDK takes care of setting up after a datastore crash. The longest part of the restore process is getting the Windows VMDK boot drive copied back from the backed up image. Once that is done it is usually just a half hour or so. And no I didn't have a datastore crash but I did switch from one datastore HDD to another and removed original. Quote Link to comment
RyC Posted February 18, 2014 Share Posted February 18, 2014 I believe Veeam doesn't work with the free version of ESXi anyway Sent from my iPad using Tapatalk HD Quote Link to comment
joshpond Posted February 18, 2014 Author Share Posted February 18, 2014 Have ghetto vcb a run and I'm happy with it for backups. Just have to try restoring when I get a chance. Sent by tapatalk Quote Link to comment
deionmann Posted February 19, 2014 Share Posted February 19, 2014 Ghetto vcb is the way to go IMO, then just get plink on your windows machine and make a batch script for it to run automatically. It takes a little bit of tinkering but the result of automated ESXi backups for free cant be beat. http://www.sohoadvisers.com/tutorials/vmware-esxi/automate-esxi-backups Sent from my SCH-I605 using Tapatalk Quote Link to comment
joshpond Posted February 20, 2014 Author Share Posted February 20, 2014 Just found one thing, have to install on the datastore. Thought it might survive a reboot but then remembered that ESXi loads into memory. Josh Quote Link to comment
kaiguy Posted February 24, 2014 Share Posted February 24, 2014 Since I haven't seen a guide for setting up ghettoVCB on these forums, I'm going to write up how I did it. Stay tuned. And here it is. Quote Link to comment
joshpond Posted February 24, 2014 Author Share Posted February 24, 2014 Hey nice write up! I'm sure it will help others. I think from my testing that if nfs is enabled like your guide it doesn't matter what the VM_BACKUP directory is set to at the start. If the nfs is not set up then it will go to that directory. Anyone who knows better can correct me but that's what I've found. I also don't plan on backing up unraid VM. I'm going to test mine with plop should be easy enough to just recreate the vm. If my esxi goes down, I'd have to boot unraid bare metal, copy off to another pc, install esxi then import vm. Too much hassle. If I do backup unraid vm then probably just to my desktop. Josh Sent by tapatalk Quote Link to comment
kaiguy Posted February 24, 2014 Share Posted February 24, 2014 Hey nice write up! I'm sure it will help others. I think from my testing that if nfs is enabled like your guide it doesn't matter what the VM_BACKUP directory is set to at the start. If the nfs is not set up then it will go to that directory. Anyone who knows better can correct me but that's what I've found. I also don't plan on backing up unraid VM. I'm going to test mine with plop should be easy enough to just recreate the vm. If my esxi goes down, I'd have to boot unraid bare metal, copy off to another pc, install esxi then import vm. Too much hassle. If I do backup unraid vm then probably just to my desktop. Josh Are you backing up to a separate datastore then? I was considering doing that as well for simplicity, but when my Norco's backplane fried my drives, it fried all the drives on the same backplane, which were all my datastore drives. I'm opting to backup to unRAID to have that additional layer of redundancy. Ideally, however, I'd backup to a completely separate box. One of these days I'd love to get my hands on an HP Microserver and have that be my backup destination. Perfect for that other unRAID key I have laying around, or for trying out ZFS. Quote Link to comment
joshpond Posted February 24, 2014 Author Share Posted February 24, 2014 I'm backing up to unRaid, not a datastore. Mainly to protect against datastore failure. That's why I don't backup unRaid. I could but getting the VM backoff it isn't worth the hassle. I don't have another server, part of the reason for running ESXi otherwise I would have baremetal unRaid and another server to run all the other VMs. Josh Quote Link to comment
joshpond Posted February 25, 2014 Author Share Posted February 25, 2014 Any idea how to restore? I've mounted the NFS from unRaid which gets picked up fine. I've run ghettoVCB and with a dryrun seems fine, run the proper commands and it clones/restores. There are two files that get created in the folder, the vmx and the virtual disk. However it shows as Unknown (invalid) and I can't start. If i remove that I can't select the vmx and click add to inventory. Thanks Josh Quote Link to comment
kaiguy Posted February 25, 2014 Share Posted February 25, 2014 Haven't tried a restore yet. What about mounting unRAID as an NFS datastore via VSphere, then use the datastore browser to move the files to the physical datastore? Or WinSCP? Quote Link to comment
joshpond Posted February 25, 2014 Author Share Posted February 25, 2014 I can mount the nfs share a data store and browse the files. I'm just trying to use the ghettoVCB-restore. Testing with my other backup but if it doesn't work I'll try a direct copy. I'll post a few things once I get it working if you want to add to your guide. Josh Sent by tapatalk Quote Link to comment
joshpond Posted February 25, 2014 Author Share Posted February 25, 2014 Okay can't seem to use the ghettoVCB-restore to restore the VM. I've: 1) nfs mounted the share with the VM backups 2) run the ghettoVCB command and it copies the files - however: It comes up with invalid and I can't start the VM. I've then tried copying the files, the .vmx and the .vmdk and then started it. Copied it by downloading the files from unRaid (not part of ESXi yet) to my desktop and then uploading to the new Datastore. So far that seems to work but I'm not sure if it introduces any major issues. Issues so far are: 1) It gets a new MAC address (since I use my router to set static IP addressess based on MAC this changes things but is an easy fix) 2) It was an Ubuntu VM and had to do a file rebuild on boot up, didn't quite catch it all as it was quick but I'm guessing since the hardrive changed it mention fschk and rebuild. I'm currently trying a Windows 7 VM. Just a lot larger so waiting for it to copy. Trying to copy from the mounted nfs share (unRaid) directly to the datastore via the cp -a cli command with nohup. Josh Quote Link to comment
kaiguy Posted February 25, 2014 Share Posted February 25, 2014 Well that's unfortunate. You didn't get the "Did you copy or move this VM?" prompt when you fired it up the first time? So far I've only copied/moved machines within the datastore browser, so I wonder if it preserves some sort of state when used. I'll try a restore a few different ways today as well and share my results. Quote Link to comment
kaiguy Posted February 25, 2014 Share Posted February 25, 2014 I had success using the datastore browser to restore the backup. Create an NFS datastore mount (if not persistent), go into the machine folder, pick the backup folder you want, right-click and copy. Go into other datastore, right-click and paste. Rename folder, right-click on .vmk and Add to Inventory. I think its much easier than going through the process of creating a restore config file, running the dry runs, executing the script, etc. Though there may be some configurations in which the backup being thin provisioned, changing the format, and so on that may cause issues? Though if restoring multiple machines the datastore browser method would require much more interaction. I updated my guide accordingly. Quote Link to comment
joshpond Posted February 26, 2014 Author Share Posted February 26, 2014 How big was the vm and what provisioning did you back it up as? My VMs were created as lazy zeroed and backed up as thick zero (not eager). I tried copying like you said but it just didn't work. It finished in about 3 seconds and the vmdk didn't show up. I'm copying via the cli but a 350gb vmdk had taken over twelve hours. Josh Sent by tapatalk Quote Link to comment
kaiguy Posted February 26, 2014 Share Posted February 26, 2014 I think the original provision was thick lazy zeroed and the backup was thin. It was a small VM. I'll try with my 300GB Ubuntu server. Quote Link to comment
Helmonder Posted February 26, 2014 Share Posted February 26, 2014 I use VEAM (free) and backup to the array.. The only thing is that you cannot backup the unraid vm that way (well you could, but without the data it would be useless), not a problem however since unraid will still boot from its usb stick if you just disable esxi.. Quote Link to comment
kaiguy Posted February 26, 2014 Share Posted February 26, 2014 I use VEAM (free) and backup to the array.. The only thing is that you cannot backup the unraid vm that way (well you could, but without the data it would be useless), not a problem however since unraid will still boot from its usb stick if you just disable esxi.. I recently looked at Veeam. This is what it states on their download page after registration: Note: Free vSphere Hypervisor (free ESXi) is not supported. vSphere Essentials or higher license level required. Quote Link to comment
joshpond Posted February 27, 2014 Author Share Posted February 27, 2014 Okay, the copy and paste method worked and the VM does start up again so all good. I might try thin provisioning as that might be better and quicker. To copy a 350GB win7 VM from the nfs/unraid share to the datastore (Raid 0 HDD) took about 4 hours. Josh Quote Link to comment
kaiguy Posted February 27, 2014 Share Posted February 27, 2014 Awesome! Glad to hear it! So the guide is good as is, then? Quote Link to comment
joshpond Posted February 27, 2014 Author Share Posted February 27, 2014 Guide is excellent and spot on. You could mention that for me at least 350gb vm took about 4 hours. Thanks Josh Sent by tapatalk Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.