lamw / ghettoVCB

ghettoVCB
MIT License
1.29k stars 363 forks source link

ghettoVCB fails to make backup of VM containing special character(s) in VM name. #160

Open yh113 opened 5 years ago

yh113 commented 5 years ago

Hello, Thank you so much for such an easy-to-use backup script. I found ghettoVCB fails to make backup in case VM name has a special character "+". I guess some other characters may cause the same error. Regards,

WeWin55 commented 5 years ago

HI, I can confirm this problem with the characters [ and ] in vm names. VMware ESXi 6.5.0 build-10884925 GhettoVCB-version: 2019_01_06

bisi-sysadmin commented 5 years ago

could we please have details of how it fails? I have a failure scenario I am attempting to troubleshoot and I have "-" in the vm name. The failure is "Snapshot timed out, failed to create snapshot: "ghettoVCB-snapshot-2019-06-08" for imap-plus-1". It takes 15.20 minutes for the failure to ocur.

There are no pre-existing snapshots of the VM. Backup works fine when the VM is powered off.

So, is this symptomatic of the error?

Any other place to look for troubleshooting help?

IdefixRC commented 1 year ago

Hi, I have the same issue and a hard time figuring out what is going on as there is no detail (debug enabled).

2023-04-21 08:23:04 -- debug: getVMDKs() - TrueNAS.vmdk###50:
2023-04-21 08:23:04 -- info: Initiate backup for TrueNAS
2023-04-21 08:23:04 -- info: Creating Snapshot "ghettoVCB-snapshot-2023-04-21" for TrueNAS
2023-04-21 08:23:04 -- debug: Waiting for snapshot "ghettoVCB-snapshot-2023-04-21" to be created
2023-04-21 08:23:04 -- debug: Snapshot timeout set to: 900 seconds
2023-04-21 08:23:04 -- debug: Waiting for snapshot creation to be completed - Iteration: 0 - sleeping for 60secs (Duration: 0 seconds)
2023-04-21 08:24:05 -- debug: Waiting for snapshot creation to be completed - Iteration: 1 - sleeping for 60secs (Duration: 30 seconds)
2023-04-21 08:25:05 -- debug: Waiting for snapshot creation to be completed - Iteration: 2 - sleeping for 60secs (Duration: 60 seconds)
2023-04-21 08:26:05 -- debug: Waiting for snapshot creation to be completed - Iteration: 3 - sleeping for 60secs (Duration: 90 seconds)
2023-04-21 08:27:05 -- debug: Waiting for snapshot creation to be completed - Iteration: 4 - sleeping for 60secs (Duration: 120 seconds)
2023-04-21 08:28:05 -- debug: Waiting for snapshot creation to be completed - Iteration: 5 - sleeping for 60secs (Duration: 150 seconds)
2023-04-21 08:29:06 -- debug: Waiting for snapshot creation to be completed - Iteration: 6 - sleeping for 60secs (Duration: 180 seconds)
2023-04-21 08:30:06 -- debug: Waiting for snapshot creation to be completed - Iteration: 7 - sleeping for 60secs (Duration: 210 seconds)
2023-04-21 08:31:06 -- debug: Waiting for snapshot creation to be completed - Iteration: 8 - sleeping for 60secs (Duration: 240 seconds)
2023-04-21 08:32:06 -- debug: Waiting for snapshot creation to be completed - Iteration: 9 - sleeping for 60secs (Duration: 270 seconds)
2023-04-21 08:33:06 -- debug: Waiting for snapshot creation to be completed - Iteration: 10 - sleeping for 60secs (Duration: 300 seconds)
2023-04-21 08:34:06 -- debug: Waiting for snapshot creation to be completed - Iteration: 11 - sleeping for 60secs (Duration: 330 seconds)
2023-04-21 08:35:07 -- debug: Waiting for snapshot creation to be completed - Iteration: 12 - sleeping for 60secs (Duration: 360 seconds)
2023-04-21 08:36:07 -- debug: Waiting for snapshot creation to be completed - Iteration: 13 - sleeping for 60secs (Duration: 390 seconds)
2023-04-21 08:37:07 -- debug: Waiting for snapshot creation to be completed - Iteration: 14 - sleeping for 60secs (Duration: 420 seconds)
2023-04-21 08:38:07 -- info: Snapshot timed out, failed to create snapshot: "ghettoVCB-snapshot-2023-04-21" for TrueNAS
2023-04-21 08:38:07 -- debug: Removing /vmfs/volumes/TrueNAS/00_Backup/TrueNAS/TrueNAS-2023-04-21_07-46-47
2023-04-21 08:38:07 -- debug: Removing /vmfs/volumes/TrueNAS/00_Backup/TrueNAS/TrueNAS-2023-04-20_12-20-43
2023-04-21 08:38:07 -- info: Backup Duration: 15.05 Minutes
2023-04-21 08:38:07 -- info: ERROR: Unable to backup TrueNAS due to snapshot creation!

2023-04-21 08:38:07 -- debug: VM_OK:0, VM_FAILED:1, VMDK_FAILED:0
2023-04-21 08:38:07 -- info: ###### Final status: ERROR: All VMs failed! ######

2023-04-21 08:38:07 -- debug: Succesfully removed lock directory - /tmp/ghettoVCB.work

Any help would be highly appreciated!

Update: it looks like it works with another VM. I will need to figure out why it works with some and not with others.... Will update once I have more clarity

lamw commented 1 year ago

Yup, you may want to see if the VM has had any old snapshots or that it couldn't be consolidated or potentially even on a datastore that doesn't have enough space. Since the snapshot can't be created, there's no much more the script can do and you'll need to investigate your env

IdefixRC commented 1 year ago

Yes, found the issue for the vm I used for testing. It had a passthrough device hence snapshots are not possible.

Works on all other VMs now. 👍

On Fri, 21 Apr 2023, 22:12 William Lam, @.***> wrote:

Yup, you may want to see if the VM has had any old snapshots or that it couldn't be consolidated or potentially even on a datastore that doesn't have enough space. Since the snapshot can't be created, there's no much more the script can do and you'll need to investigate your env

— Reply to this email directly, view it on GitHub https://github.com/lamw/ghettoVCB/issues/160#issuecomment-1517899088, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHZZ4EMIBMDAGBDU2GDSMTXCKIWFANCNFSM4GQ5QXZQ . You are receiving this because you commented.Message ID: @.***>