Skip to content

Commit

Permalink
vmware: Fix bareos_vadp_dumper VMDK File creation
Browse files Browse the repository at this point in the history
Before, the value of length attribute of the changed block tracking query
result was used as disk size when bareos_vadp_dumper called the VDDK function
VixDiskLib_Create to create VMDK files on restore with localvmdk=yes. But
this value is not the real disk size in all cases, so the VMDK was too
small.

With this fix, the VMDK files are created with the correct size.
  • Loading branch information
sduehr committed May 28, 2021
1 parent c5307fd commit 1c190f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/vmware/vadp_dumper/bareos_vadp_dumper.cc
@@ -1,7 +1,7 @@
/*
BAREOS® - Backup Archiving REcovery Open Sourced
Copyright (C) 2014-2020 Bareos GmbH & Co. KG
Copyright (C) 2014-2021 Bareos GmbH & Co. KG
Copyright (C) 2015-2015 Planets Communications B.V.
This program is Free Software; you can redistribute it and/or
Expand Down Expand Up @@ -881,7 +881,7 @@ static inline bool process_disk_info(bool validate_only, json_t* value)

if (create_disk && !validate_only) {
do_vixdisklib_create(DISK_PARAMS_KEY, vmdk_disk_name, value,
rdie.absolute_disk_length);
rdie.phys_capacity * VIXDISKLIB_SECTOR_SIZE);
do_vixdisklib_open(DISK_PARAMS_KEY, vmdk_disk_name, value, false, true,
&write_diskHandle);

Expand Down

0 comments on commit 1c190f5

Please sign in to comment.