• Skip to primary navigation
  • Skip to main content

Inodes

Fractional CTO Consulting

  • Home
  • About Us
  • Contact Us
  • Block Examples
  • Landing Page
  • Pricing Page
  • Show Search
Hide Search

VMware Consolidated Backup

John Ferlito · 23 August 2006 · 9 Comments

The last few months have seen me working at an insane pace at Bulletproof in the lead up to a launch of our latest and greatest product Dedicated Virtual Machine Hosting or DVMH for short. I’ll ramble on a bit more about it after it’s launched but basically it is similar to our existing Managed Dedicated Hosting but running on VMware and with a whole heap of cool features due to the benefits of virtualisation.

Today saw me working with one of these cool features, Consolidated Backup. Basically what this lets you do is have a Windows 2003 server directly plugged into the SAN which can directly see all the VM images sitting in the VMFS LUNs. It then talks to the ESX servers takes a snapshot and makes a copy of it t local disk. Hey presto Disaster Recovery. Well mostly anyway, the restoration aspect isn’t all that crash hot as you’ll see below.

Documentation on performing the backups is a bit scarce. VMware provide some scripts that let you tie it in to some commercial backup products like Legato, Veritas and NetBackup but no real docs on how to do it yourself.

So here are some quick examples. (You can find all these commands in C:Program FilesVMwareVMware Consolidated Backup Framework

Getting a list of VMs on your ESX farm.

PowerShell
vcbVmName.exe -h VC_HOST -u USERNAME -p PASSWORD -s any:

Backing up a VM

PowerShell
vcbMounter.exe -h VC_HOST -u USERNAME -p PASSWORD -a moref:MOREF -r DESTINATION -t fullvm -m san

where MOREF comes from the list you created above and DESTINATION is a local path on your VCB proxy.

You should then strictly unmount it by doing

PowerShell
vcbMounter.exe  -d DESTINATION

but I don’t think this does anymore than delete the files, since the snapshot on the ESX server has already been closed.

The above creates something like this

Plaintext
catalog
MyVM.nvram
MyVM.vmx
scsi0-0-0-MyVM-s001.vmdk
scsi0-0-0-MyVM-s002.vmdk
scsi0-0-0-MyVM-s003.vmdk
scsi0-0-0-MyVM-s004.vmdk
scsi0-0-0-MyVM-s005.vmdk
scsi0-0-0-MyVM.vmdk
unmount.dat
vmware-1.log
vmware-2.log
vmware-3.log
vmware-4.log
vmware-5.log
vmware.log

Mounting a VM image locally

PowerShell
vmmount.exe -d VMDK -cycleId -sysdl LOCATION

VMDK needs to be scsi0-0-0-MyVM.vmdk from above.

You can then unmount it by doing

PowerShell
vmount.exe -u LOCATION

This is nice and easy and really useful means you can now easily backup everything to tape.

Recovery is another matter entirely, apparently in the Beta releases vcbRestore was distributed with Consolidated Backup but in the final release it now only exists on the ESX servers. So you need to move your directory above to one of your ESX boxes. You then do

PowerShell
vcbRestore -h VC_HOST -u USERNAME -p PASSWORD -s DIRECTORY

This will totally replace your existing VM, if you wanted a copy then you should copy the catalog file elsewhere, edit it to change the paths and

PowerShell
vcbRestore -h VC_HOST -u USERNAME -p PASSWORD -s DIRECTORY -a CATALOG

There are a couple more features I haven’t mentioned which you can work out for yourself by using -h. eg File level backups for Windows VMs.

Now all of the above is great but VMware have taken things a step further. With the above if your VM is running VMware Tools the equivalent of a sync is done before the snapshot is taken which effectively gives you slightly better than a crash consistent dump. Though you could still lose some DB data.

So VMware have added some functionality to rectify this. Just before the snapshot is made /usr/sbin/pre-freeze-script or C:Windowspre-freeze-script.bat is run and /usr/sbin/post-thaw-script or C:Windowspost-thaw-script.bat are run afterwards. Taking a snapshot only takes a few minutes so you could use these scripts to stop your database for example.

I highly recommend reading the VMware Consolidated Backup manual for all the extra features I haven’t covered.

Sysadmin Bulletproof, VMware

Reader Interactions

Comments

  1. Ioko says

    29 September 2006 at 8:34 pm

    Hello!

    My environment is 2x IBM 460 ESX 3.0 server, 1x IBM 266 Win2003 Mgmt+VCB server, HP SAN b-series switches, Storage 2x HP EVA5000.

    Issuing:
    vcbmounter.exe -h IP_Addr -u user -p passwd – a ipaddr:X.X.X.X – r c:mntwindows – t fullvm -m san
    to mount test VC machine on VCB proxy there is the output: /simmilar output for any VC machine/
    [2006-09-28 19:48:33.593 ‘App’ 3248 info] Current working directory:
    C:Program
    FilesVMwareVMware Consolidated Backup Framework
    [2006-09-28 19:48:34.140 ‘BaseLibs’ 732 warning] [Vmdb_Unset] Unsetting
    unknown
    path: /vmomi/

    Copying “[test] /windows/windows.vmx”:
    0%=====================50%=====================100%
    **************************************************

    Copying “[test] /windows/windows.nvram”:
    0%=====================50%=====================100%
    **************************************************

    Copying “[test] /windows/vmware-1.log”:
    0%=====================50%=====================100%
    **************************************************

    Copying “[test] /windows/vmware-2.log”:
    0%=====================50%=====================100%
    **************************************************

    Copying “[test] /windows/vmware-3.log”:
    0%=====================50%=====================100%
    **************************************************

    Copying “[test] /windows/vmware-4.log”:
    0%=====================50%=====================100%
    **************************************************

    Copying “[test] /windows/vmware-5.log”:
    0%=====================50%=====================100%
    **************************************************

    Copying “[test] /windows/vmware.log”:
    0%=====================50%=====================100%
    **************************************************

    [2006-09-28 19:48:44.000 ‘BaseLibs’ 2628 warning] [Vmdb_Unset] Unsetting
    unknown
    path: /vmomi/

    [2006-09-28 19:48:56.421 ‘vcbMounter’ 3248 error] Error: Failed to open the disk
    : One LUN could not be opened
    [2006-09-28 19:48:56.421 ‘vcbMounter’ 3248 error] An error occured, cleaning
    up.
    ..
    [2006-09-28 19:48:56.984 ‘vcbMounter’ 3248 warning] Snapshot deletion
    failed. At
    tempting to clean up snapshot database…

    The problem is in “Failed to open the disk: One LUN could not be opened”.

    I found similar /the same/ problem at:
    http://www.vmware.com/community/message.jspa?messageID=474774

    Installation of Secure Path on Windows VCB box was not in help…

    Any ideas, help, etc.?
    Thanks
    Ioakim

    Reply
  2. Ioko says

    30 September 2006 at 1:26 am

    Hello again!

    I found the sollution for my problem!

    The problem was in shared VDisk presentation! I present shared storage to ESX servers as LUN 2 /because they boot from LUN 1/, and presented the same VDisk to VCB as LUN 1 /because VCB machine boots from local storage/. It seems that LUNs have to be the same NUMBERS at ESX server AND VCB proxy!

    Best regards,
    Ioakim

    Reply
  3. Scott Lowe says

    9 March 2007 at 12:59 am

    John,

    Great information, thanks for sharing that. Note that you can also restore VCB backups using VMware Converter:

    http://blog.scottlowe.org/2007/03/06/restoring-vcb-full-backups-with-vmware-converter/

    Ioko,

    Also note that multipathing isn’t supported by VCB–I ran into issues with EMC PowerPath and VCB, so I can only guess that SecurePath would cause the same sorts of issues.

    Take care,
    Scott

    Reply
  4. Matt says

    28 March 2007 at 8:53 am

    Thanks for this, top stuff.
    Readers may also find this info on mounting smb shares useful.
    http://blog.baeke.info/blog/_archives/2006/12/18/2581372.html

    Together you can mount a share and backup to it, then backup the share with your normal backup solution.

    Reply
  5. Fred says

    29 March 2007 at 4:52 pm

    thanks, but could you help me for the problem.
    But I encounter problems when running the these commands.
    The ESX host use the local SCSI disk as the storage and I run this commands in the ESX Host Service Console.

    I run the commands :
    [root@localhost root]# vcbMounter -h localhost -u root -p 123456 -a moref:16 -r /var/log/backup
    [2007-03-29 23:01:46.488 ‘App’ 3076452480 info] Current working directory: /root
    [2007-03-29 23:01:46.548 ‘BaseLibs’ 4570032 warning] [Vmdb_Unset] Unsetting unknown path: /vmomi/

    [2007-03-29 23:01:46.898 ‘vcbMounter’ 3076452480 error] Error: FindHostByName: Cannot search for empty hostname.
    [root@localhost root]# vcbMounter -h localhost -u root -p 123456 -a ipaddr:16.157.66.85 -r /var/log/backup
    [2007-03-29 23:10:57.962 ‘App’ 3076444288 info] Current working directory: /root
    [2007-03-29 23:10:58.019 ‘BaseLibs’ 6642608 warning] [Vmdb_Unset] Unsetting unknown path: /vmomi/

    [2007-03-29 23:10:58.585 ‘vcbMounter’ 3076444288 error] Error: FindHostByName: Cannot search for empty hostname.

    Johnf: I don’t have access to any ESX boxes so I can’t test this. It’s possibly a licensing issue. I’m not sure you can use VCB without a VC.

    Reply
  6. Barrett Sprague says

    26 April 2007 at 7:44 am

    thanks, but could you help me for the problem.
    But I encounter problems when running the these commands.
    The ESX host use the local SCSI disk as the storage and I run this commands in the ESX Host Service Console.

    I run the commands :
    [root@localhost root]# vcbMounter -h localhost -u root -p 123456 -a moref:16 -r /var/log/backup
    [2007-03-29 23:01:46.488 ‘App’ 3076452480 info] Current working directory: /root
    [2007-03-29 23:01:46.548 ‘BaseLibs’ 4570032 warning] [Vmdb_Unset] Unsetting unknown path: /vmomi/

    [2007-03-29 23:01:46.898 ‘vcbMounter’ 3076452480 error] Error: FindHostByName: Cannot search for empty hostname.
    [root@localhost root]# vcbMounter -h localhost -u root -p 123456 -a ipaddr:16.157.66.85 -r /var/log/backup
    [2007-03-29 23:10:57.962 ‘App’ 3076444288 info] Current working directory: /root
    [2007-03-29 23:10:58.019 ‘BaseLibs’ 6642608 warning] [Vmdb_Unset] Unsetting unknown path: /vmomi/

    [2007-03-29 23:10:58.585 ‘vcbMounter’ 3076444288 error] Error: FindHostByName: Cannot search for empty hostname.

    —————————
    Sounds like a name resolution issue. I would check to make sure that DNS is properly configured on the Service Console, specifically the Domain and the “Look for hosts in the following domains” sections.

    -Barrett

    johnf: I don’t have access to VMware to test anymore but I’m pretty sure the vcb stuff requires you to have a fibre SAN. You probably want to use something like vmbu for local backups

    Reply
  7. Craig Borysowich says

    14 August 2007 at 6:43 am

    Has anyone seen any issues with running VCB on the same server as VC?

    Reply
  8. Jorj says

    30 July 2008 at 11:19 pm

    Hello All ,

    I am very new on VMware , we are using ESX 3.5 ,OS version of VCB proxy is Win 2003 server .
    I want to configure the VCB with TSM . So if anybody had worked on this and can provide me document
    How can I implement this in my exisiting environment.
    TSM server verison is 5.5 and as the backup client.

    Thanks……….. Jorj

    Reply
  9. AJ says

    27 September 2008 at 12:26 am

    We have a very large VMware infrastructure and we went with a company called STORServer. They have a VCB agent that backs up VCB to TSM without any work involved. It is very easy gui for me to use and it works perfect. They have a demo you can test out, we did, then bought it! http://www.storserver.com, I recommend it highly.

    Andy

    Reply

Leave a Reply to Craig Borysowich Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Hit the ground running with a minimalist look. Learn More

Copyright © 2025 · Inodes Pty Ltd · Log in

  • Privacy Policy