VHD: cannot set the file size for 'path' (VERR_INVALID_PARAMETER)

Discussions related to using VirtualBox on Linux hosts.
Post Reply
UltraLuminous
Posts: 8
Joined: 2. Sep 2016, 18:47

VHD: cannot set the file size for 'path' (VERR_INVALID_PARAMETER)

Post by UltraLuminous »

Hey all,

I am trying to create a Windows 10 VM but I get the following error while trying to make a virtual hard disk. I have verified that there is enough space for the file and that the directory is correct, but the error won't go away:

Failed to create the hard disk storage /home/user/VirtualBox VMs/Windows 10/Windows 10.vhd.

Could not create the medium storage unit '/home/hubert/VirtualBox VMs/Windows 10/Windows 10.vhd'.
VHD: cannot set the file size for '/home/hubert/VirtualBox VMs/Windows 10/Windows 10.vhd' (VERR_INVALID_PARAMETER).


Result Code:
VBOX_E_FILE_ERROR (0x80BB0004)
Component:
MediumWrap
Interface:
IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}

Please tell me how I can fix this, it's very frustrating...

Thank you,
Matthew
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: VHD: cannot set the file size for 'path' (VERR_INVALID_PARAMETER)

Post by socratis »

UltraLuminous wrote:VHD: cannot set the file size
What's the size that you're using for the disk? And why a VHD?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
UltraLuminous
Posts: 8
Joined: 2. Sep 2016, 18:47

Re: VHD: cannot set the file size for 'path' (VERR_INVALID_PARAMETER)

Post by UltraLuminous »

Using 20GB. Tried other formats, same thing.
Last edited by socratis on 5. Apr 2017, 22:33, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: VHD: cannot set the file size for 'path' (VERR_INVALID_PARAMETER)

Post by socratis »

First of all, unless you have a specific reason not to, stick with VDI.

Second, try for a change to NOT disturb the defaults. Create another VM which you can later delete along with its files. Does it still complain?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
UltraLuminous
Posts: 8
Joined: 2. Sep 2016, 18:47

Re: VHD: cannot set the file size for 'path' (VERR_INVALID_PARAMETER)

Post by UltraLuminous »

Yes, it still says the same error no matter what size or format I choose.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VHD: cannot set the file size for 'path' (VERR_INVALID_PARAMETER)

Post by mpack »

Stick to VDI. Otherwise this looks like you don't have write permission for that VM folder. That's a host OS problem.
UltraLuminous
Posts: 8
Joined: 2. Sep 2016, 18:47

Re: VHD: cannot set the file size for 'path' (VERR_INVALID_PARAMETER)

Post by UltraLuminous »

I have tried VDI and set the permissions to read and write on that folder. Still doesn't work... I'll try re-installing VirtualBox.

UPDATE: That din't help. Perhaps I have the wrong VBox version?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: VHD: cannot set the file size for 'path' (VERR_INVALID_PARAMETER)

Post by socratis »

I will repeat this once more, just to be clear, because last time I asked you to NOT touch the defaults and your answer was "no matter what size or format I choose". That doesn't go well with "do NOT touch the defaults".

So, create a new VM using the wizard. Do NOT change anything. Do NOT modify the size. Do NOT modify the type.

Type only a VM name: "Win10", no spaces and press "Continue", twice. Press "Create". Press "Continue", twice. Press "Create.

What your host, what's your VirtualBox version? Where did you get VirtualBox from? From the command line post the output of the following:
  • uname -a
    VBoxManage -v
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
UltraLuminous
Posts: 8
Joined: 2. Sep 2016, 18:47

Re: VHD: cannot set the file size for 'path' (VERR_INVALID_PARAMETER)

Post by UltraLuminous »

By the "no matter what I choose" I meant that I did also try the defaults and still had the same result. I have done exactly what you said and still got the same error.

My "uname -a" is:
Linux mint-pc 4.8.0-45-generic #48~16.04.1-Ubuntu SMP Fri Mar 24 12:46:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

My "vboxmanage -v" is:
5.1.18r114002
(a.k.a virtualbox-5.1_5.1.18-114002~Ubuntu~xenial_i386.deb from official downloads page)

I hope I have cleared up any confusion, and that we can now come to a solution to this.
Last edited by socratis on 6. Apr 2017, 13:50, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VHD: cannot set the file size for 'path' (VERR_INVALID_PARAMETER)

Post by mpack »

Try copying any file into the VM folder. Do you have write permission?

Please confirm that you are not creating a fixed size drive.

Oh, and just for fun it would be nice to see the free space reported by the host for the target folder, i.e. "'/home/hubert/VirtualBox VMs/Windows 10/".

Also of interest would be free RAM on the host.

I would like you to report the error message you get when VDI is used. As far as I can see that error string only exists in the VHD code, meaning you couldn't possibly get it for other disk container types.
sierrahotel
Posts: 3
Joined: 11. Apr 2017, 21:21
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: Windows 8.1

Re: VHD: cannot set the file size for 'path' (VERR_INVALID_PARAMETER)

Post by sierrahotel »

I've had a similar problem. In summary, details later.

Creating a fixed disk using vboxmanager or GUI tools on linux fails (host 32 bit manjaro, an Arch variant so doubly unsupported, I know, I know!, version 5.1.18r114002, 64 bit hardware architecture, running Windows 8.1 32 bit guest).

An error of some sort is always given no matter what the size parameter, details are given of which section of code finds the size parameter objectionable when run from the command line, I'll try to provide examples later.

Using dynamic disks with the same parameters works fine. Applies to vdi and vhd. Also applies to other vboxmanage commands that manipulate disks that have a fixed disk parameter, as well as just fixed disk creation.

However, dual booting into Windows 10 32 bit on the same machine and calling VBoxManage.exe will create a fixed disk just fine. That can then be used by the linux VMs.

Bye for now,
Simon

edit: added .exe file extension, clarity
Last edited by sierrahotel on 12. Apr 2017, 00:56, edited 3 times in total.
sierrahotel
Posts: 3
Joined: 11. Apr 2017, 21:21
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: Windows 8.1

Re: VHD: cannot set the file size for 'path' (VERR_INVALID_PARAMETER)

Post by sierrahotel »

OK, here's something to start with...

Linux (as above) cli and result:

Code: Select all

[simon@dell-t3400-manjaro ~]$ vboxmanage createmedium disk --filename page.vdi --size 1540 --format vdi --variant fixed
0%...
Progress state: VBOX_E_FILE_ERROR
VBoxManage: error: Failed to create medium
VBoxManage: error: Could not create the medium storage unit '/home/simon/page.vdi'.
VBoxManage: error: VDI: setting image size failed for '/home/simon/page.vdi' (VERR_INVALID_PARAMETER)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium
VBoxManage: error: Context: "RTEXITCODE handleCreateMedium(HandlerArg*)" at line 450 of file VBoxManageDisk.cpp
Linux GUI trying to copy an existing fixed disk to a partition with room and permissions gives a popup containing:

Failed to create the hard disk storage /run/media/simon/Slow Store/Windows 8_copy.vdi.
Could not create the clone medium '/run/media/simon/Slow Store/Windows 8_copy.vdi'.
VDI: setting image size failed for '/run/media/simon/Slow Store/Windows 8_copy.vdi' (VERR_INVALID_PARAMETER).
Result Code: VBOX_E_FILE_ERROR (0x80BB0004)
Component: MediumWrap
Interface: IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}


The filesystems were mounted as follows (partitions containing home directory for cli attempt, and 'Slow Store' for GUI attempt):

Code: Select all

/dev/sda4 on / type ext4 (rw,noatime,discard,data=ordered)
/dev/sdb9 on /run/media/simon/Slow Store type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
edit: mount output
sierrahotel
Posts: 3
Joined: 11. Apr 2017, 21:21
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: Windows 8.1

Re: VHD: cannot set the file size for 'path' (VERR_INVALID_PARAMETER)

Post by sierrahotel »

Anyone been able to reproduce this?

Worth filing a bug report?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: VHD: cannot set the file size for 'path' (VERR_INVALID_PARAMETER)

Post by socratis »

sierrahotel wrote:Creating a fixed disk using vboxmanager or GUI tools on linux fails (host 32 bit manjaro, an Arch variant so doubly unsupported, I know, I know!
sierrahotel wrote:Worth filing a bug report?
With the Arch port, most probably. I would ask for verification in their support site first.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
k_w_a
Posts: 1
Joined: 28. Sep 2017, 00:13

Re: VHD: cannot set the file size for 'path' (VERR_INVALID_PARAMETER)

Post by k_w_a »

Exactly the same errors on Xubuntu 16.04 32-bit & Ubuntu 14.04 32-bit , VirtualBox 5.1.22
Post Reply