cannot restore vm machine

56 views
Skip to first unread message

jesse

unread,
Jun 21, 2023, 10:59:05 PM6/21/23
to bareos-devel
hi
when i try to restore a vm machine from backup,bareos return the following errors:

Bareos-fd JobId 1816: Fatal error: Bareosfd: Traceback (most recent call last):
File "/usr/lib64/Bareos/plugins/BareosFdWrapper.py", line 57, in handle_plugin_event
return Bareos_fd_plugin_object.handle_plugin_event(event)
File "/usr/lib64/Bareos/plugins/BareosFdPluginVMware.py", line 841, in handle_plugin_event
return self.start_restore_job()
File "/usr/lib64/Bareos/plugins/BareosFdPluginVMware.py", line 534, in start_restore_job
return self.vadp.prepare_vm_restore()
File "/usr/lib64/Bareos/plugins/BareosFdPluginVMware.py", line 1247, in prepare_vm_restore
if not self.create_vm():
File "/usr/lib64/Bareos/plugins/BareosFdPluginVMware.py", line 1677, in create_vm
self.add_disk_devices_to_vm(transformer.disk_device_change_delayed)
File "/usr/lib64/Bareos/plugins/BareosFdPluginVMware.py", line 2749, in add_disk_devices_to_vm
WaitForTask(reconfig_task)
File "/usr/local/lib/python3.6/site-packages/pyVim/task.py", line 155, in WaitForTask
raise info.error
pyVmomi.VmomiSupport.vim.fault.InvalidDeviceSpec: (vim.fault.InvalidDeviceSpec) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = "Invalid configuration for device '0'.",
faultCause = ,
faultMessage = (vmodl.LocalizableMessage) [],
property = 'VirtualDisk.capacityInKB',
deviceIndex = 0
}



the metadata can be restored and i can see the vm in vcenter,but  the vmdk file can not be restored. 

Bruno Friedmann

unread,
Jun 22, 2023, 10:34:33 AM6/22/23
to bareos-devel
Hi we have actually a PR1486 which is opened, fixing last round of discovered bugs.
Maybe you want to path and try this code 


This is a compatible 22.1.x+ version

jesse

unread,
Jun 24, 2023, 8:09:01 PM6/24/23
to bareos-devel
I used PR1486 to overwrite the vmware plugin files, but it still doesn't work.The error is absolutely the same as the above:(

Bruno Friedmann

unread,
Jun 26, 2023, 3:47:40 AM6/26/23
to bareos-devel
You should then prepare yourself to try a restore with the option localvmdk=yes as documented.
also try to raise the debug level on the fd before to have a better trace.

Check the version of pyVmomi used.

Bug as this doesn't look to a development problem (which is the purpose of this list), I would just to move to bareos-users ML to get maybe more help.
Message has been deleted

jesse

unread,
Jun 26, 2023, 9:28:22 AM6/26/23
to bareos-devel

jesse
21:25 (现在) 
收件人 bareos-devel
localvmdk=yes option works fine and the vmdk file was restored to my fd client successfully.
but when I copy the vmdk file to the specified  vcenter folder manualy, this file still can not be recognized by the vm machine.
The above error occurs when:
1. I restore the vm machine to another datastore or folder and rename the vm machine
2. I delete the original vm  machine and want to restore the vm machine to the same location as before.

But ,when I execute the restore option with no args, the restore is OK.That is ,the original vm machine exists and the will be overwritten by the restore.

Bruno Friedmann

unread,
Jun 27, 2023, 8:44:03 AM6/27/23
to bareos-devel
I'm not sure I understand fully the problem

is the restored vmdk a valid system when inspected with guestfish for example ?

To understand your cases, we need the whole joblog and maybe with a raised debug level.
Reply all
Reply to author
Forward
0 new messages