Skip to content

VMware plugin does not backup VM templates #2118

@Signum

Description

@Signum

Bareos component version

24.0.1~pre19.3e3a7a6a2-19

Steps to reproduce

  1. Create a template in VMware.

  2. Use the Debian 12 packages.

  3. Create a job:

Job {
    Name = "vm-debian12template"
    JobDefs = "VmwareJob"
    FileSet = "vm-debian12template_fileset"
}
  1. Create a fileset:
FileSet {
  Name = "vm-debian12template_fileset"

  Include {
    Options {
         Signature = XXH128
         Compression = LZ4
    }
    Plugin = "python"
             ":module_name=bareos-fd-vmware"
             ":dc=Tierheim Neukirchen:folder=/Template"
             ":vmname=debian12template"
             ":vcserver=vc1.tierheim-neukirchen.de"
             ":vcuser=bareos@vsphere.local"
             ":vcpass=wjPMXLDeJ54diKDaSs3kKgkOy4Pb4C167LbJu76t"
             ":vcthumbprint=809ef8bf3527dbe551b9f17ac366491e"
  }
}

Expected results

VM template is backed up successfully.

Actual results

A traceback of the Python plugin occurs and the backup fails.

Apparently it tries to create a snapshot of the template. AFAIK you cannot create snapshots of VM templates.

Environment

- OS: `Debian 12`
- component: `VMware vCenter Server 8.0.3.00400`

Relevant log output

12-Jan 23:58 bareos-dir JobId 18041: No prior Full backup Job record found.
12-Jan 23:58 bareos-dir JobId 18041: No prior or suitable Full backup found in catalog. Doing FULL backup.
13-Jan 00:26 bareos-dir JobId 18041: Version: 24.0.1~pre19.3e3a7a6a2 (08 January 2025) Debian GNU/Linux 12 (bookworm)
13-Jan 00:26 bareos-dir JobId 18041: Start Backup JobId 18041, Job=vm-debian12template.2025-01-12_23.58.04_01
13-Jan 00:26 bareos-dir JobId 18041: Connected Storage daemon at bareos-dr.tierheim-neukirchen.de:9103, encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
13-Jan 00:26 bareos-dir JobId 18041:  Encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
13-Jan 00:26 bareos-dir JobId 18041: Connected Client: bareos-fd at localhost:9102, encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
13-Jan 00:26 bareos-dir JobId 18041:  Handshake: Immediate TLS 
13-Jan 00:26 bareos-dir JobId 18041:  Encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
13-Jan 00:26 bareos-sd JobId 18041: Using just in time reservation for job 18041
13-Jan 00:26 bareos-dir JobId 18041: Using Device "JustInTime Device" to write.
13-Jan 00:26 bareos-fd JobId 18041: Connected Storage daemon at bareos-dr.tierheim-neukirchen.de.org:9103, encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
13-Jan 00:26 bareos-fd JobId 18041:  Encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
13-Jan 00:27 bareos-fd JobId 18041: Extended attribute support is enabled
13-Jan 00:27 bareos-fd JobId 18041: ACL support is enabled
13-Jan 00:27 bareos-sd JobId 18041: Version: 24.0.1~pre19.3e3a7a6a2 (08 January 2025) Debian GNU/Linux 12 (bookworm)
13-Jan 00:27 bareos-fd JobId 18041: Fatal error: bareosfd: Traceback (most recent call last):
  File "/usr/lib/bareos/plugins/BareosFdWrapper.py", line 69, in handle_plugin_event
    return bareos_fd_plugin_object.handle_plugin_event(event)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/bareos/plugins/bareos-fd-vmware.py", line 1066, in handle_plugin_event
    return self.start_backup_job()
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/bareos/plugins/bareos-fd-vmware.py", line 506, in start_backup_job
    return self.vadp.prepare_vm_backup()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/bareos/plugins/bareos-fd-vmware.py", line 1462, in prepare_vm_backup
    if not self.create_vm_snapshot():
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/bareos/plugins/bareos-fd-vmware.py", line 2194, in create_vm_snapshot
    pyVim.task.WaitForTask(self.create_snap_task)
  File "/usr/local/lib/python3.11/dist-packages/pyVim/task.py", line 155, in WaitForTask
    raise info.error
pyVmomi.VmomiSupport.vmodl.fault.NotSupported: (vmodl.fault.NotSupported) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) [],
   msg = 'The operation is not supported on the object.',
   faultCause = <unset>,
   faultMessage = (vmodl.LocalizableMessage) []
}

13-Jan 00:27 bareos-fd JobId 18041: Version: 24.0.1~pre19.3e3a7a6a2 (08 January 2025) Debian GNU/Linux 12 (bookworm)


### Relevant traces output

_No response_

### Anything else?

_No response_

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions