Page 1 of 2

Code E_INVALIDARG (0x80070057) during clonehd

Posted: 24. Nov 2013, 16:53
by actiononmail
Hi

I have Windows 7 as a Host and Ubuntu 12.04 as a guest with 8GB of vdi. However now all the space on the guest is utilized and unfortunately Ubuntu unable to boot further :cry: So I am trying to clone the VDI to more size one;which I have created.

But my luck is very bad and now I am facing error under Windows 7 command prompt during cloning.

Code: Select all

c:\Users\akashbh>VBoxManage clonehd c:\Users\akashbh\vbox_vm\my_ubuntu\my_ubuntu.vdi c:\Users\akashbh\vbox_vm\my_ubuntu\new_my_ubuntu.vdi

VBoxManage.exe: error: Failed to create the VirtualBox object!
VBoxManage.exe: error: Code E_INVALIDARG (0x80070057) - One or more arguments are invalid (extended info not available)
VBoxManage.exe: error: Most likely, the VirtualBox COM server is not running or failed to start.
Please help as all my work is in VDI :x

Thanks

Re: Code E_INVALIDARG (0x80070057) during clonehd

Posted: 24. Nov 2013, 17:43
by Perryg
Why not just resize the Ubuntu drive?
viewtopic.php?f=24&t=50661
I always suggest making a backup of the original VDI before doing anything like this.

Re: Code E_INVALIDARG (0x80070057) during clonehd

Posted: 24. Nov 2013, 18:15
by actiononmail
Thanks for the reply but the problem is not command rather the Error. I am getting same error with modifyhd. A bit googling suggests that the VirtualBox Dashboard should be opened;but I have already tried that.

Code: Select all

c:\Users\akashbh\VirtualBox VMs\my_ubuntu>VBoxManage modifyhd my_ubuntu.vdi --resize 15360
VBoxManage.exe: error: Failed to create the VirtualBox object!
VBoxManage.exe: error: Code E_INVALIDARG (0x80070057) - One or more arguments are invalid (extended info not available)
VBoxManage.exe: error: Most likely, the VirtualBox COM server is not running or failed to start.

Re: Code E_INVALIDARG (0x80070057) during clonehd

Posted: 24. Nov 2013, 18:32
by actiononmail
HI,

Problem solved!! May this also helps other users. I have changed the compatibility of Command Prompt from Windows 7 to Windows XP and re-execute the command; and it works like charm.
Must be a stupid bug of Virtual Box or windows.

8)

Re: Code E_INVALIDARG (0x80070057) during clonehd

Posted: 12. Nov 2014, 16:40
by Duanehebert
I'm having this exact problem. How do you change the compatibility of command prompt? I'm running windows 7. I have a shortcut to launch cmd.exe so that I can run it as admin but it tells me I can't change the compatibility of this command because it's an internal windows command.

Re: Code E_INVALIDARG (0x80070057) during clonehd

Posted: 12. Nov 2014, 17:22
by mpack
Red herring alert. This was one of those occasions where the guys solution makes no sense, but he's happy so why contradict him.

In most causes the user is typing an invalid argument, just like the error says.

The correct syntax is given in the user manual. However, in many cases the error is to enter a new disk size which is smaller than the existing disk - resize does not allow drive size to be shrunk. The size entered should be absolute, not relative to current size.

The next favorite error is to apply the command to an unsupported format, e.g. VMDK or a fixed size (non dynamic) disk. Only dynamic VDI and dynamic VHD are supported, and I wouldn't trust the latter.

Here's a more subtle but still typical sequence :-
  1. User applies resize command.
  2. User starts guest and notices that the guest OS still reports the old size (user has not read the user manual or the FAQ and doesn't understand that he next needs to increase the partition size, and/or can't do this if snapshots have been used.
  3. Thinking that command didn't work, user drops out of VM and runs the command again. Since the previous attempt did work, new size being entered is now equal to the previous size, hence user gets an INVALID_ARG error.
  4. User comes onto VirtualBox forums and reports the INVALID_ARG error, neglecting to mention steps 1 and 2.
  5. Forum directs user to RTFM.

Re: Code E_INVALIDARG (0x80070057) during clonehd

Posted: 12. Nov 2014, 17:31
by Duanehebert
I'm trying to convert a dynamic sized disk to a fixed size. I'm using the post here viewtopic.php?f=1&t=11882&start=15

Step one: Disconnect from any VM's it's connected to
VBoxManage modifyvm WinXP --hda none
Step two: Remove the disk from the media registry
VBoxManage closemedium disk /path/to/disk.vdi
Step three: Clone the Disk (with the clone set as a fixed type)
VBoxManage clonehd disk1.vdi disk1a.vdi --format VDI --variant Fixed
Step four: Connect the new disk to the VM (automagically registeres the disk)
VBoxManage modifyvm WinXP --hda /path/to/disk1a.vdi
I get the same error on any of these.

I'm using 4.3.12.

Re: Code E_INVALIDARG (0x80070057) during clonehd

Posted: 12. Nov 2014, 17:34
by mpack
Duanehebert wrote:I'm trying to convert a dynamic sized disk to a fixed size.
Why on earth would you want to do that?

Re: Code E_INVALIDARG (0x80070057) during clonehd

Posted: 12. Nov 2014, 17:49
by Duanehebert
What difference does that make? None of the VBoxManage calls in the sample that I sent you work. All with the same error.


But since you asked. We have Linux guests that we use to build our software on that platform. Using the same tools (Qt) to build our projects takes 12-15 minutes on the VM and < 3 minutes on local windows or ~4 minutes on a local install of Fedora. We're looking to improve this build time.

Re: Code E_INVALIDARG (0x80070057) during clonehd

Posted: 12. Nov 2014, 17:58
by mpack
You won't improve build time by switching to fixed size disks. The fixed disk format is identical to the dynamic format. The only difference is when the blocks are allocated (up front vs on demand).

There is a small performance hit in the early part of the lifetime of a VM when the disk is growing a lot. However, the disk can't grow at that rate for long (frequent snapshots aside), so that overhead disappears very quickly. Fixed disks of course have the same performance hit, but they pay it in advance (including for blocks that dynamic might never allocate). Plus of course large fixed size disks can lead to host congestion, which makes everything on the host suffer, including the VMs. If you try to avoid that by reducing the size of the guest drive, then all you do is move the congestion problem to the guest.

But, in direct answer to your question, INVALID_ARG means what it says, though from here I can't tell you which of your commands is invalid. You would have to be more specific - give more details.

Re: Code E_INVALIDARG (0x80070057) during clonehd

Posted: 12. Nov 2014, 18:08
by Duanehebert
Ok, thanks for that. You've saved me some time.

But for the original question, none of the calls in that link worked. What is causing this?

We've had some problems with VirtualBox recently where Fedora kernel updates would break the VirtualBoxAdditions in 4.3.12. I've tried installing Virtual Box 4.3.16, 4.3.17 and 4.3.18 but for each of these, when I install I can't launch the guests. I get the same error.

Re: Code E_INVALIDARG (0x80070057) during clonehd

Posted: 12. Nov 2014, 18:14
by Perryg
Excluding why you would or would not want to do this, it is important that you either use the absolute path to the vdi or be in the location of the vdi when running the commands. It also matters if you have added the VirtualBox directory that has VBoxManage to the hosts environmental varible. If you have not then being in the directory that that has the vdi you would need to use the absolute path to VBoxManage.

Re: Code E_INVALIDARG (0x80070057) during clonehd

Posted: 12. Nov 2014, 18:14
by mpack
Please pick one command, and be explicit about the exact error.

Re: Code E_INVALIDARG (0x80070057) during clonehd

Posted: 12. Nov 2014, 18:41
by Duanehebert
See my initial post.

Re: Code E_INVALIDARG (0x80070057) during clonehd

Posted: 12. Nov 2014, 18:49
by Perryg
I read your original post and suggested the possible cure for your issue/s. Have you tried it?

Oh and you issue with the additions not working properly after a kernel upgrade is probably due to missing dkms package to keep the external modules in sync after an upgrade.