Skip to content

VMware Plugin: Fix for virtual USB devices#2213

Merged
BareosBot merged 6 commits intobareos:masterfrom
sduehr:dev/sduehr/master/fix-vmware-virtualusb
Jun 3, 2025
Merged

VMware Plugin: Fix for virtual USB devices#2213
BareosBot merged 6 commits intobareos:masterfrom
sduehr:dev/sduehr/master/fix-vmware-virtualusb

Conversation

@sduehr
Copy link
Member

@sduehr sduehr commented Mar 17, 2025

The Plugin can now save and recreate VMs with VirtualUSB devices. Note that VirtualUSB devices could disappear when powering on the VM and the USB device is attached to a different running VM, so a warning message will be emitted when such devices are involved.

Additionally, the plugin now detects if attempting to backup a template and emits an appropriate error message in that case, as this is currently not possible.

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Required backport PRs have been created
  • Correct milestone is set
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR

@sduehr sduehr self-assigned this Mar 27, 2025
@sduehr sduehr linked an issue Mar 27, 2025 that may be closed by this pull request
@sduehr
Copy link
Member Author

sduehr commented May 12, 2025

Note: The issue discussed in #2118 is not related to the changes for handling virtual USB devices. However, changes to handle empty changeId were added to this PR.

@sduehr sduehr requested a review from pstorz May 12, 2025 18:28
@arogge arogge linked an issue May 15, 2025 that may be closed by this pull request
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@sduehr sduehr force-pushed the dev/sduehr/master/fix-vmware-virtualusb branch from 78b22b6 to b676e3b Compare June 3, 2025 16:37
sduehr and others added 6 commits June 3, 2025 17:12
The Plugin can now save and recreate VMs with VirtualUSB devices.
Note that VirtualUSB devices could disappear when powering on
the VM and the USB device is attached to a different running VM,
so a warning message will be emitted when such devices are involved.
Currently backing up templates is not possible, because creating a
snapshot of a template is not supported. This fix detects if
trying to backup a template and fails the job with an appropriate error
message.
Added status information about VirtualUSB devices. Also added limitation
note about backup of templates currently not possible.
The plugin now checks if it could successfully retreive the CBT changeId
from the restoreobject and fail the job otherwise.
Under rare circumstances it can happen that the changeId in the backing
information of a snapshotted virtual disk is empty. This should normally
not happen, as it makes subsequent incrementals impossible. Such an
empty changeId is now handled appropriately so that a warning is emitted
if it is empty and when incrementals are attempted the error message was
adapted so that the helper script from
contrib/misc/reschedule_job_as_full
can be used to automatically trigger a full level job in that case.
@BareosBot BareosBot force-pushed the dev/sduehr/master/fix-vmware-virtualusb branch from fb3c422 to 9ba8306 Compare June 3, 2025 17:12
@BareosBot BareosBot merged commit bed28e5 into bareos:master Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VMware restore fails if USB device was attached VMware plugin does not backup VM templates

3 participants