アンチウイルスXML設定ファイル

バックアップのスキャンに使用する予定のアンチウイルスソフトウェアは、AntivirusInfos.xmlファイルで説明されます。 Veeam Backup & Replicationは、マウントサーバーロールが与えられたすべてのマシン上にこの設定ファイルを作成し、そのファイルを%ProgramFiles%\Common Files\Veeam\Backup and Replication\Mount Serviceフォルダに保存します。

セキュアなリストアの間に、Veeam Backup & Replicationはその設定ファイルから設定を読み取り、アンチウイルスを実行してバックアップファイルをスキャンします。ファイルの設定は、次のアンチウイルスソフトウェア向けに既に事前に定義されています。

他のアンチウイルスソフトウェアを使用してマシンデータをスキャンする場合は、このソフトウェアの設定をAntivirusInfos.xmlファイルに追加する必要があります。その設定には、そのアンチウイルスでサポートされているすぐに使える要素および属性と同じ要素および属性が含まれている必要があります。アンチウイルスソフトウェアでコマンドラインインターフェイス(CLI)がサポートされている必要があります。

アンチウイルス設定ファイルに変更を加えた場合、バックアップサーバー上のVeeamサービスを再起動する必要はありません。Veeam Backup & Replicationは、新しい設定で次回のマルウェアスキャンを実行します。

XMLファイル構造

アンチウイルス設定を説明するXMLファイルの構造は次の通りです。

<Antiviruses>
  <!--Symantec-->
  <AntivirusInfo Name='Symantec' IsPortableSoftware='false' ExecutableFilePath='Veeam.Backup.Antivirus.Scan.exe' CommandLineParameters='/p:%Path%' RegPath='HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\symcscan' ServiceName='symcscan' ThreatExistsRegEx='Threat\s+found' IsParallelScanAvailable='false'>
     <ExitCodes>
        <ExitCode Type='Success' Description='No threats detected'>0</ExitCode>
        <ExitCode Type='Error' Description='Invalid command line argument'>1</ExitCode>
        <ExitCode Type='Error' Description='Antivirus scan was completed with errors'>2</ExitCode>
        <ExitCode Type='Error' Description='Antivirus scan was canceled'>4</ExitCode>
        <ExitCode Type='Infected' Description='Virus threat was detected'>3</ExitCode>
     </ExitCodes>
  </AntivirusInfo>
  <!--Eset-->
  <AntivirusInfo Name='Eset File Security' IsPortableSoftware='true' ExecutableFilePath='%ProgramFiles%\ESET\ESET File Security\ecls.exe' CommandLineParameters='%Path% /clean-mode=None /no-symlink' RegPath='' ServiceName='' ThreatExistsRegEx='threat\s*=\s*["'](?!is OK["'])[^"']+["']' IsParallelScanAvailable='false'>
     <ExitCodes>
        <ExitCode Type='Success' Description='No threats detected'>0</ExitCode>
        <ExitCode Type='Infected' Description='Virus threat was detected'>1</ExitCode>
        <ExitCode Type='Warning' Description='Some files were not scanned'>10</ExitCode>
        <ExitCode Type='Infected' Description='Virus threat was detected'>50</ExitCode>
        <ExitCode Type='Error' Description='Antivirus scan was completed with errors'>100</ExitCode>
     </ExitCodes>
  </AntivirusInfo>
  <AntivirusInfo Name='ESET Antivirus' IsPortableSoftware='true' ExecutableFilePath='%ProgramFiles%\ESET\ESET Security\ecls.exe' CommandLineParameters='%Path% /clean-mode=None /no-symlink' RegPath='' ServiceName='' ThreatExistsRegEx='threat\s*=\s*["'](?!is OK["'])[^"']+["']' IsParallelScanAvailable='false'>
     <ExitCodes>
        <ExitCode Type='Success' Description='No threats detected'>0</ExitCode>
        <ExitCode Type='Infected' Description='Virus threat was detected'>1</ExitCode>
        <ExitCode Type='Warning' Description='Some files were not scanned'>10</ExitCode>
        <ExitCode Type='Infected' Description='Virus threat was detected'>50</ExitCode>
        <ExitCode Type='Error' Description='Antivirus scan was completed with errors'>100</ExitCode>
     </ExitCodes>
  </AntivirusInfo>
  <!--Windows Defender-->
  <AntivirusInfo Name='Windows Defender' IsPortableSoftware='false' ExecutableFilePath='%ProgramFiles%\Windows Defender\mpcmdrun.exe' CommandLineParameters='-Scan -ScanType 3 -File %Path% -DisableRemediation -BootSectorScan' RegPath='HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinDefend' ServiceName='WinDefend' ThreatExistsRegEx='Threat\s+information' IsParallelScanAvailable='false'>
     <ExitCodes>
        <ExitCode Type='Success' Description='No threats detected'>0</ExitCode>
        <ExitCode Type='Error' Description='Antivirus scan was completed with errors'>2</ExitCode>
        <ExitCode Type='Infected' Description='Virus threat was detected'>2</ExitCode>
     </ExitCodes>
  </AntivirusInfo>
 <!--Kaspersky Security-->
  <AntivirusInfo Name='Kaspersky Security' IsPortableSoftware='false' ExecutableFilePath='kavshell.exe' CommandLineParameters='scan %Path%' RegPath='HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\KAVFS' ServiceName='kavfs' ThreatExistsRegEx='' IsParallelScanAvailable='false'>
     <ExitCodes>
        <ExitCode Type='Success' Description='No threats detected'>0</ExitCode>
        <ExitCode Type='Warning' Description='There were processing errors for some files'>-82</ExitCode>
        <ExitCode Type='Warning' Description='Some files were not scanned'>-83</ExitCode>
        <ExitCode Type='Warning' Description='Some files were corrupted'>-84</ExitCode>
        <ExitCode Type='Error' Description='Operation timed out'>2</ExitCode>
        <ExitCode Type='Error' Description='Antivirus scan was canceled'>1</ExitCode>
        <ExitCode Type='Error' Description='Service process is not running'>-2</ExitCode>
        <ExitCode Type='Error' Description='Access denied'>-3</ExitCode>
        <ExitCode Type='Error' Description='Object not found'>-4</ExitCode>
        <ExitCode Type='Error' Description='Invalid syntax'>-5</ExitCode>
        <ExitCode Type='Error' Description='Invalid operation'>-6</ExitCode>
        <ExitCode Type='Error' Description='Service does not exist'>-7</ExitCode>
        <ExitCode Type='Error' Description='Service disabled'>-8</ExitCode>
        <ExitCode Type='Error' Description='Service logon failure'>-9</ExitCode>
        <ExitCode Type='Error' Description='Unable to create file'>-10</ExitCode>
        <ExitCode Type='Error' Description='Invalid command line argument'>-11</ExitCode>
        <ExitCode Type='Error' Description='Invalid password'>-12</ExitCode>
        <ExitCode Type='Error' Description='Cannot create report file'>-85</ExitCode>
        <ExitCode Type='Error' Description='License is invalid'>-301</ExitCode>
        <ExitCode Type='Error' Description='Antivirus bases are corrupted'>-236</ExitCode>
        <ExitCode Type='Infected' Description='Infected object was detected'>-80</ExitCode>
        <ExitCode Type='Infected' Description='Possibly infected object was detected'>-81</ExitCode>
     </ExitCodes>
  </AntivirusInfo>
</Antiviruses>

 

XMLファイルには、次の要素が含まれています。

  • Antiviruses。この要素は、アンチウイルス設定を含むファイルをカプセル化します。
  • AntivirusInfo。この要素は、アンチウイルスソフトウェアを説明します。
  • ExitCodes。この要素は、Veeam Backup & Replicationでスキャンの結果に表示されるメッセージをカプセル化します。
  • ExitCode。この要素は、Veeam Backup & Replicationでスキャンの結果に表示されるメッセージの件名と本文を説明します。

AntivirusInfo

要素の属性は次の通りです。

属性

説明

名前

アンチウイルスの名前を指定します。Veeam Backup & Replicationでは、リストアセッションログにこの名前が表示されます。

IsPortableSoftware

アンチウイルスソフトウェアがポータブルかどうかを示します。

  • この属性をTrueに設定すると、Veeam Backup & Replicationはアンチウイルスソフトウェアをポータブルとして扱います。セキュアなリストアを実行する前に、Veeam Backup & Replicationはアンチウイルスの実行可能ファイルが存在するかどうか確認します。ファイルへのパスは、ExecutableFilePath属性によって指定されます。
  • この属性をFalseに設定すると、Veeam Backup & Replicationはアンチウイルスソフトウェアを非ポータブルとして扱います。セキュアなリストアを実行する前に、Veeam Backup & Replicationは、アンチウイルスのレジストリキーが存在するかどうか、およびアンチウイルスサービスが実行されているかどうかを確認します。
    このキーは、RegPath属性によって指定されます。サービス名は、ServiceName属性によって指定されます。

ExecutableFilePath

アンチウイルスの実行可能ファイルへのパスを指定します。

CommandLineParameters

スキャン中に実行するアンチウイルスコマンドを指定します。アンチウイルスが指定されたコマンドをサポートしていることを確認してください。たとえば、ESETのコマンドリストについては、こちらのESET KBの記事を参照してください。

%Path%変数は、この属性に必要です。セキュアなリストアの間に、Veeam Backup & Replicationは、この変数を、マウントしたディスクを含むフォルダへのパス(C:\VeeamFLR\<machinename>)に置き換えます。

ServiceName

アンチウイルスサービスの名前を指定します。そのサービスがデータのスキャンを担当する必要があります。この属性値は、IsPortableSoftware = TrueおよびExecutableFilePathが指定されている場合は空文字列にできます。

RegPath

アンチウイルスサービスのレジストリキーを指定します。この属性値は、IsPortableSoftware = TrueおよびExecutableFilePathが指定されている場合は空文字列にできます。

ThreatExistsRegEx

正規表現を指定します。正規表現とは、検索パターンを形成する一連の文字です。Veeam Backup & Replicationは、指定された正規表現がないかアンチウイルスの出力メッセージを検索します。出力メッセージが表現と一致すると、Veeam Backup & Replicationは検出された脅威をユーザーに通知します。

注:この属性を適切に指定するには、正規表現言語を十分に理解している必要があります。正規表現言語の詳細については、Microsoftのドキュメントを参照してください。

IsParallelScanAvailable

アンチウイルスが複数のジョブを実行し、マウントされたディスクのファイルを同時にスキャンしているかどうかを示します。

この属性をTrueに設定すると、Veeam Backup & Replicationはアンチウイルスをロックして、現在のリストアセッションのスキャンを実行します。スキャンが完了するまで、アンチウイルスはセキュアなリストアが有効な他のセッションを利用できなくなります。

アンチウイルスロックのタイムアウトのデフォルト値は24時間です。この期間を過ぎてもスキャンが完了していない場合、Veeam Backup & Replicationは、リストアウィザードで指定された通りに他のリストアセッションを終了します。つまり、リストアセッションを中止するか、マシン(またはディスク)を制限付きでリストアします。

注:レジストリキーを使用して、ロックのタイムアウトを変更できます。詳細については、Veeamサポートにお問い合わせください。

アンチウイルスのCLIで複数のスキャンジョブがサポートされていない場合は、この属性をFalseに設定します。

ExitCode

要素の属性は次の通りです。

属性

説明

種類

Veeam Backup & Replicationでスキャンの結果に表示されるメッセージの件名を次の中から指定します。

  • 成功
  • Infected
  • 警告
  • エラー

説明

Veeam Backup & Replicationでスキャンの結果に表示されるメッセージの本文を指定します。

 

 

ヒント

Veeam PowerShellを使用して、バックアップインフラストラクチャの他のマウントサーバー間でXML設定ファイルを配布できます。詳細については、「Veeam PowerShellリファレンス」の「Copy-VBRAntivirusConfigurationFile」セクションを参照してください。

関連トピック

セキュアリストアのしくみ