Vagrant: Hyper-V: Virtual hard disk files must be uncompressed and unencrypted and must not be sparse. (0xC03A001A).

Created on 10 Oct 2019  ยท  6Comments  ยท  Source: hashicorp/vagrant

vagrant init roboxes/alpine310
vagrant up

results in

vagrant up                                                                                                           Bringing machine 'default' up with 'hyperv' provider...
==> default: Verifying Hyper-V is enabled...
==> default: Verifying Hyper-V is accessible...
==> default: Importing a Hyper-V instance
    default: Creating and registering the VM...
An error occurred while executing a PowerShell script. This error
is shown below. Please read the error message and see if this is
a configuration error with your system. If it is not, then please
report a bug.

Script: import_vm.ps1
Error:

Import failed. Import task failed to copy file from 'C:\Users\deroser\.vagrant.d\boxes\roboxes-VAGRANTSLASH-alpine310\1.9.36\hyperv\Virtual Machines\318757F7-A2BB-4F93-B76D-4DA3AA9D78BA.vmgs' to 'C:\ProgramData\Microsoft\Windows\Hyper-V\Planned Virtual Machines\76D0956B-50B4-4C57-85C8-BB0825535E0D.vmgs': The requested operation could not be completed due to a virtual disk system limitation.  Virtual hard disk files must be uncompressed and unencrypted and must not be sparse. (0xC03A001A).

Error Code: 32768
Cause: Failed

Vagrant version:

2.2.5

Host operating system:

Windows Version 1903 (OS Build 18362.456)

Guest operating system:

ANY (Tried the following)

  • roboxes/debian9
  • roboxes/alpine310
  • etherframe/alpine64

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "roboxes/alpine310"
end

Debug output

https://gist.github.com/RobertDeRose/babf9d1f0a586e20b195d7724bbe6f76

Expected behavior

A new VM to be created using Hyper-V

Actual behavior

An Error

Steps to reproduce

vagrant init roboxes/alpine310
vagrant up
waiting-reply

Most helpful comment

@briancain Sorry I thought I closed this, thanks again for the help

All 6 comments

Hi @RobertDeRose - Does it happen with all vagrant boxes you have tried, or only those specifically? Have you also at any time tried to compress or encrypt your hard drive? And have you moved where your VAGRANT_HOME directory is, or is it the default? Also are you using WSL, or something like Powershell or CMD.exe?

@briancain Now that you mention it, damn my Harddrive is Compressed. I didn't understand the error message in relationship to my own setup. I thought it meant that the hard disk image was compressed, which sounded like Vagrant failed to decompress the image from the box.

Let me see if I can disable hard drive compression just for the VAGRANT_HOME or if I have to disable it for the entire drive.

@briancain Well I tried to reproduce the issue, but instead all I get is a nice BSOD from Windows now.

I've decided to just remove Vagrant all-together and return to using Docker for my needs. :(

Closing this issue since I'm assuming the error is a result of the hard drive being compressed or encrypted as the error mentions. If you find this was the result of a bug in Vagrant feel free to re-open this issue or open a new one. Thanks!

@briancain Sorry I thought I closed this, thanks again for the help

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings