Veeam: Host with uuid <uuid> was not found


Today I saw a new error with Veeam Backup and Replication. The error was:

Host with uuid “<uuid>” was not found

Within the Veeam console it looks like this:

image

After a quick search in the Veeam knowledge base I found the Knowledge base article with KB1063.

To fix this issue from the GUI go to Help – License – Licensed Hosts and revoke the license of the host with the new installation.

You can also remove all the licensed hosts via a MS SQL query on the de SQL Database by running the query below:

delete from [dbo].[HostsByJobs]

The reason for this error was a rebuild of the ESXi host.

Source: http://www.veeam.com/kb1063

Veeam: Move Backup job to a brand new Veeam Backup server


In this post I will show you how to move a Veeam Backup job to a new Veeam Backup server. You can also use this procedure to move the Backup files to a new drive and map the backup files to an existing backup job.

The short version of this procedure is:

  1. Move the backup files to the new Veeam Backup server.
  2. Create a new Backup repository and Import the existing Backup jobs.
  3. Create a new Backup job with exact the same the Virtual Machines. Select the new Backup Repository and map the backup files.
  4. Schedule or Start the backup job from the new Veeam Backup server.
  5. You’ll find the steps to take in detail for step 2 and step 3 below.

Continue reading

Disk Hard disk # has incorrect changed block tracking configuration


Today another Veeam troubleshooting trick. It’s possible that you’ll receive the following error in one of your Veeam Backup Jobs:

Verifying change block tracking:
Disk “Hard disk 1” has incorrect changed block tracking configuration

This is how it looks like in the Veeam Backup console:

image

The procedure which Veeam describes in the solution for this problem works like this:

  1. Shutdown the VM
  2. VM – Edit Settings – Options – General – Configuration Parameters…
  3. Change every item with ctkEnabled to false
  4. Start the VM
  5. Start the Backup Job to see if this is the solution for this problem.
  6. This is how you change the parameter to false:

image

In my case, the above solution did not solve the problem. So I had to troubleshoot the VM. While checking the configuration a noticed that the Disk was configured with the Independent mode enabled. You can change this setting when the VM is powered off. Go to Hardware, select the Hard disk and disable the checkbox by Independent:

image

The setting above can only be changed when the VM is powered off, if you’re using the vSphere client. It’s also possible to change this setting, on-the-fly with PowerCLI. That rimes Winking smile.

You can run the following one-liner to disable the Independent mode:

Get-VM <vmName> | % { Get-HardDisk -VM $_ | Where {$_.Persistence -eq "IndependentPersistent"} | `
% {Set-HardDisk -HardDisk $_ -Persistence "Persistent" -Confirm:$false} }

Disclaimer: this one-liner worked for me in my environment but test this first because I don’t know exactly what the impact is of this change.

Veeam: Module Snapshot poweron failed. Unable to retrieve the current working directory


After performing an Instant Recovery you might get the following error when the VM is trying to power on:

image

After a quick search on the Veeam Forums I found the following topic: http://www.veeam.com/forums/ about the same issue. In this topic I found the following solution to this issue:


Well, finally i get the issue fixed. I think it could be considered a bug. Let me explain.
If i set “F:\” as a vPower NFS destination, the error shows up. But if i set “F:\any_directory”, then all runs perfect!.
Well i write this here to help anybody with the same issue.

So vPowerNFS cannot be pointed directly to the drive letter of a partition. To change this setting you can use registry editor and your mouse, but you can also run the following Powershell script to change this setting:

$vPowerNFSDir = "D:\vPowerNFS\"

if((Test-Path $vPowerNFSDir) -eq $false){
    New-Item $vPowerNFSDir -type directory
}

If((Get-ItemProperty "HKLM:\Software\VeeaM\Veeam Backup and Replication" -name "NFSDefaultRootPath").NFSDefaultRootPath -ne $vPowerNFSDir){
    Set-ItemProperty "HKLM:\Software\VeeaM\Veeam Backup and Replication" -name "NFSDefaultRootPath" -value $vPowerNFSDir
}

if((Get-Service -DisplayName "Veeam Backup Service").Status -eq "Running"){
    Restart-Service -displayname "Veeam Backup Service"
}

if((Get-Service -DisplayName "Veeam vPower NFS Service").Status -eq "Running"){
    Restart-Service -displayname "Veeam vPower NFS Service"
}

The only thing you have to change in this script is the $vPowerNFSDir variable to the correct location of your Veeam Backup & Recovery Server. This script will check if the folder exists, If this is not the case it will create the folder. The next step is to check the Registry key for the correct location. If this is not the case the script will change the Registry for you. The last step is to restart the Veeam Backup Service and the Veeam vPower NFS Service.

Source: http://www.veeam.com/forums/

Veeam: Change Restore points and deleted VMs retention period


If you want to change the amount of restore points and the deleted VMs retention period, you can do this for your backup jobs by hand. But if you need to change a lot of Veeam Backup & Replication Jobs like I needed to do. You can find these settings in the Backup Job properties:

image

If you’re a reader of my blog, you know I like to automate this kind of jobs with Powershell. So I created a function to perform this change for me.

The function:

#requires -pssnapin VeeamPSSnapIn
Function Change-RestorePoints{
<#
.SYNOPSIS
    Change the Backup restore points and deleted VMs retention period
.DESCRIPTION

.NOTES
    Authors: Arne Fokkema
.PARAMETER JobName
    A Backup Job in Veeam Backup & Replication
.PARAMETER RetainDays
    The amount of restore points
.PARAMETER RetainCycles
    The amount of days for Deleted VMs retention period    
.EXAMPLE
    PS> Change-RestorePoints -JobName "Job-01" -RetainDays "21" -RetainCycles "21"
#>
    param(
        [parameter(valuefrompipeline = $true,
            position = 0,
            Mandatory = $true,
            HelpMessage = "Enter a Veeam B&R JobName")]
            $JobName,
        [parameter(valuefrompipeline = $true,
            position = 0,
            Mandatory = $true,
            HelpMessage = "Enter the amount of restore points to keep on disk")]
            $RetainDays,
        [parameter(valuefrompipeline = $true,
            position = 0,
            Mandatory = $true,
            HelpMessage = "Enter a deleted VMs retention period in days")]
            $RetainCycles
    )

    begin{
        $vbrjob = Get-VBRJob  | where {$_.Name -eq $JobName} 
    }
    
    process{
        $options = $vbrjob.GetOptions()
        $options.RetainDays = $RetainDays
        $options.RetainCycles = $RetainCycles
        Write-Host "Changing RetainDays: $($RetainDays) and RetainDays: $($RetainCycles) for job: $($vbrjob.Name)"
        $vbrjob.SetOptions($options)
    }
}

To change a particular job on a Veeam Backup & Replication server you can use the following one-liner:

Change-RestorePoints -JobName "Job-01" -RetainDays "30" -RetainCycles "30"

To change all the jobs on a particular Veeam Backup & Replication Server you can use the following foreach loop:

foreach($job in (Get-VBRJob | Sort Name)){
    Change-RestorePoints -JobName $job.Name -RetainDays "14" -RetainCycles "14"
}

The output will look like this:

image

Veeam: How to change the Job notification settings with Powershell


Today just a quick post about how Powershell can help you change the VM attribute option in Veeam Backup & Replication. Imaging that you have 20 backup jobs and you want or need to change the VM attribute settings. You can do this for every job with 10 mouse clicks or you can do it in five seconds by running the script from this post.

This is the setting I am talking about from the GUI:

image

When you change the “Notes” value to some custom field in you environment, the script will apply this setting for you.

if((Get-PSSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue) -eq $null){
    Add-PSSnapin "VeeamPSSnapIn"
}

$vbrserver = Get-VBRServer | Where {$_.Type -eq "VC"}
Foreach($vbrjob in (Get-VBRJob)){    
    $options = $vbrjob.GetOptions()
    $options.VmAttributeName = "Notes"
    $options.SetResultsToVmNotes = $true
    $vbrjob.SetOptions($options)
}

The first three lines of code checked if the VeeamPSSnapIn is loaded, if this is not the case it will be loaded via the Add-PSSnapin.

  • The backup options will be loaded via the .GetOptions() method.
  • VmAttibuteName is the value which you normally enter in the attribute field.
  • SetResultsToVmNotes is the checkbox to enable this setting.
  • via .SetOptions() method you can apply the new settings.

Veeam: Change the Veeam Storage Optimization with Powershell


In Veeam Backup and Replication you can choose three different types of Storage optimization.

image

See the blog post on the Veeam website for more info: http://www.veeam.com/blog

From @gostev I received the following tip:

Note that storage optimization will not take effect until next full backup. Setting is used for newly created backup storage only.

There is no standard cmdlet to change this settings, so we have to find the property of the Storage optimization settings. With some trial and error I found the stgBlockSize property. This property can be found inside the vbrjob options.

You can view this properties via:

$vbrjob = Get-VBRJob | where {$_.Name -eq "<vbrjobname>"}
$options = $vbrjob.GetOptions()

and via the StgBlockSize property you are able to find the actual value of this setting.

$options.StgBlockSize

I have tried the three options from the screenshot and found the following three values:

    $localtarget = "KbBlockSize1024"
    $lantarget = "KbBlockSize512"
    $wantarget = "KbBlockSize256"

Now we have found the properties we need to change the settings via PowerShell. We can build some scripts.

If you want to change the Storage option to LAN target on all your backup jobs. You can run the following script on your Veeam Backup and Replication server. Don’t forget to change the StgBlockSize value with the variable you want to use.

if((Get-PSSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue) -eq $null){
    Add-PSSnapin "VeeamPSSnapIn"
}

$vbrjobs = Get-VBRJob 

foreach($vbrjob in $vbrjobs){

    #Storage optimization 
    $localtarget = "KbBlockSize1024"
    $lantarget = "KbBlockSize512"
    $wantarget = "KbBlockSize256"

    #Change Job Options
    $options = $vbrjob.GetOptions()
    $options.StgBlockSize = $lantarget

    $vbrjob.SetOptions($options)
}

Or if you want to change just a couple of your jobs, you can use the following script:

if((Get-PSSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue) -eq $null){
    Add-PSSnapin "VeeamPSSnapIn"
}

$vbrjobs = "<Job1>","<Job2>"

foreach($vbrjobname in $vbrjobs){

    #Storage optimization 
    $localtarget = "KbBlockSize1024"
    $lantarget = "KbBlockSize512"
    $wantarget = "KbBlockSize256"

    #Change Job Options
    $vbrjob = Get-VBRJob  | where {$_.Name -eq $vbrjobname} 
    $options = $vbrjob.GetOptions()
    $options.StgBlockSize = $lantarget

    $vbrjob.SetOptions($options)
}

So with the Powershell toolkit for Veeam you can perform every change you want and can do via the GUI. You can expect some more posts about automating Veeam Backup and Replication with Powershell.