VeraCrypt with Windows built-in system image creator (0x80070001)

I was trying to set up my Windows machine to create a system disk backup image to a VeraCrypt mounted drive. Windows seems not to like the way VeraCrypt mounts drives, it complains about not finding a proper backup device and giving error code 0x80070001.

A detailed behavior is explained more here: https://sourceforge.net/p/veracrypt/discussion/technical/thread/fb84dd7b/

This might be a driver compatibility issue with VeraCrypt drivers and Windows.

Fortunately, this issue seems to appear only when using the graphical interface of Windows Backup and Restore. When using the backend tool, which is 'wbadmin', the backup process goes smoothly without giving errors.

So the workaround here is to use the command prompt instead. The equivalent default command when creating a system drive image is:

wbadmin start backup -allcritical -backupTarget:X: -quiet
(admin privileges needed)

Where "x" is destination drive that will hold the backed-up image.

You can type 'wbadmin /?' to get more info and the syntax.

Similar situation can be found here:

How to back up to a VeraCrypt container using Windows 10 built-in tools?
Background: I am running Windows 10 Pro 1709. My C: drive is encrypted with BitLocker. I have an ASUS RT-AC55U with an 8TB HDD attached to its USB 3.0 port. My goal is to use part of that HDD as an

I've tested this with both, a local encrypted drive, and a network attached storage using SMB that contains an encrypted file container, and it works fine in both cases.

Update:

At the end of the backup process, Windows reports that the volumes were successfully backed-up, but gives the error code "0x8004230f".

This might prevent the image restoration process since Windows considers the backup process a failure.

This is fine for me, since all I need is the .vhdx files that are created for each partition when creating a system image, so I won't be using the Restore Windows Image tool anyway.

I hope someone finds this helpful.

Update 2:

There is a much better way to do this if the only goal is to create a .vhdx disk image of a running system, use Sysinternal disk2vhd utility.