VBoxManage Error (VERR_NOT_SUPPORTED) while converting to RAW - amazon-web-services

I'm trying to convert VMDK obtained from AWS to RAW but VBoxManage fails and throws back to "VERR_NOT_SUPPORTED" error!
Is there any solution?
Environment:
CentOS 6.5
VBoxManage 4.3.8r92456
[root#dhcp-xxx-xx-xx-xx Disks]# **VBoxManage clonehd downloadedImage.vmdk foo.img --format RAW**
VBoxManage: error: Could not get the storage format of the medium '/home/swapniku/Documents/Disks/downloadedImage.vmdk' (VERR_NOT_SUPPORTED)
VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component Medium, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of file VBoxManageDisk.cpp

Found the root cause. VBoxManage fails to identify latest versions of VMDK. So I used qemu-img to convert VMDK to RAW. I hope this helps!

Related

VirtualBox 5.1.34: error on Ubuntu 17.10 when I tried to start a VM

I tried to execute this tutorial:
https://docs.docker.com/get-started/part4/#set-up-your-swarm
but when I execute this command
docker-machine create --driver virtualbox myvm1
I had this error:
Starting "myvm1"...
(myvm1) Check network to re-create if needed...
(myvm1) Creating a new host-only adapter produced an error: /usr/bin/VBoxManage hostonlyif create failed:
(myvm1) 0%...
(myvm1) Progress state: NS_ERROR_FAILURE
(myvm1) VBoxManage: error: Failed to create the host-only adapter
(myvm1) VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
(myvm1) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
(myvm1) VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg*)" at line 94 of file VBoxManageHostonly.cpp
(myvm1)
(myvm1) This is a known VirtualBox bug. Let's try to recover anyway...
Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue

VirtualBox File Conversion Error: VMDK to VDI Clonehd Error

I'm trying to convert VMDK to VDI by clonehd, and I'm getting the following errors:
"VBoxManage.exe: error: Invalid medium storage format '.vdi'"
Try to run
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" clonehd "VMHDD.vmdk" "VMHDD.vdi" --format vdi

VM in virtualbox is already locked for a session (or being unlocked)

My VM in virtualbox can not start due to this error, I don't want to destroy it and reinstall it again, anyway to recover it ?
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["modifyvm", "319fcce3-e8ff-4b6f-a641-3aee1df6543f", "--natpf1", "delete", "ssh"]
Stderr: VBoxManage: error: The machine 'centos64_c6402_1454036461345_59755' is already locked for a session (or being unlocked)
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports
VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 493 of file VBoxManageModifyVM.cpp
Running this on the command line unlocked the VM:
vboxmanage startvm <vm-uuid> --type emergencystop
Where <vm-uuid> is the number in the error message: Command: ["modifyvm", "<vm-uuid>" [...]. After that I was able to control the VM (start, halt, etc).
Using Virtualbox 4.1 on Ubuntu.
Having the same issue I found that there was a process running actually locking the vm:
501 79419 79323 0 2:18PM ?? 0:39.75 /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless --comment default --startvm 1d438a2e-68d7-4ba2-bef9-4ea162913c1b --vrde config
Make sure you don't have a process stuck trying to start the vm:
ps -ef | grep -i "vbox"
I found this answer from #Gonzalez very interesting.
vboxmanage startvm <vm-uuid> --type emergencystop
The only problem with that it shut down the current instance of my VM, so instead of using modifyvm you can use controlvm if the current vm is running.
For example:
VBoxManage modifyvm <vm_name> --natpf1 "guestssh,tcp,,22,,2222"
VBoxManage modifyvm <vm_name> --natpf1 delete "guestssh"
Become:
VBoxManage controlvm <vm_name> natpf1 "guestssh,tcp,,22,,2222"
VBoxManage controlvm <vm_name> natpf1 delete "guestssh"
Full documentation Here
https://www.virtualbox.org/manual/ch08.html#vboxmanage-controlvm
For me I had to kill the VboxHeadless.exe process in task manager. I also had to ensure CMD prompt was opened in Administrative mode.
sudo pkill -9 VBox kills everything running related to vbox
In Windows Task Manager, I ended any tasks related to Virtual Box (you can see they start with a V in Task Manager like Vbox Headless.exe, etc). Once I did that, I was able to get this error to go away (the above 'vboxmanage startvm ...etc...' solutions here did not work for me).
If you have a settings window open for that box in the VirtualBox GUI, you may run into this error. Just close the settings window and try again.
I've encounter the same error message today:
>me#myhost:~$ ps -ef | grep -i "vbox"
me 3064 1 0 08:51 ? 00:00:00 /usr/lib/virtualbox/VBoxXPCOMIPCD
me 3089 1 0 08:51 ? 00:00:00 /usr/lib/virtualbox/VBoxSVC --auto-shutdown
me 3126 3089 27 08:51 ? 00:00:39 /usr/lib/virtualbox/VBoxHeadless --comment RHEL5 64-bit desktop --startvm e5c598d8-1234-4003-a7c1-b9d8af15dfe7 --vrde config
me 3861 3415 0 08:53 pts/1 00:00:00 grep --color=auto -i vbox*
Gergely's answer solves it perfectly. It turned out that I've a crontab set at reboot to boot the virtual machine, which initiated the three VBox process shown above
me#myhost:~$ crontab -l
#reboot me /usr/bin/vboxmanage startvm "RHEL5 64-bit desktop" --type headless
The only option that worked for me was to kill all the processes matching ps axl|grep -i vbox.
In my case, the apparent cause was a USB ethernet adapter that had been removed after suspending the machine. In my case,
vboxmanage startvm <vm-uuid> --type emergencystop
did not help. Instead, I received the confusing message that
VBoxManage: error: The machine 'xyzzy' is not locked by a session
The true error was revealed by running
vboxmanage startvm <vm-uuid> --type gui
which returned
VBoxManage: error: Nonexistent host networking interface, name 'en9: USBPlug' (VERR_INTERNAL_ERROR)
Changing the network configuration to a different network adapter solved the issue.
This is because You reallocated the memory set for Virtual Box
What you have to do to fix is: Restart The PC

`gcloud compute copy-files`: network error when copying files

When I am trying to copy a file from my Windows local to google compute engine (Rhel 6), using gcloud command I am getting network error as given below:
Fatal: Network error: Connection timed out
ERROR: (gcloud.compute.copy-files) [C:\Program Files\Google\Cloud SDK\google-clo
ud-sdk\bin\sdk\scp.EXE] exited with return code [1].
Here is the command I used -
C:\Program Files\Google\Cloud SDK\java>gcloud compute copy-files --plain test.txt [userid#DEST_instance:~/directory_name] --zone us-central1-f
Could anyone point out what is causing this error?

VirtualBox VM doesn't restart after blackout

I can't make my VirtualBox VM manually restart after a blackout (it was running before the power went off).
This is the error I get:
vbox#chebasti:~/VirtualBox VMs/DockerRegistry$ VBoxHeadless --startvm "DockerRegistry" -e "TCP/Ports=4444"
Oracle VM VirtualBox Headless Interface 4.0.4
(C) 2008-2011 Oracle Corporation
All rights reserved.
Error: failed to start machine. Error message: UUID {20afee16-bf06-43c4-ab02-770106ce3498} of the medium '/home/vbox/VirtualBox VMs/DockerRegistry/ubuntu-14.04-server-amd64-disk1.vdi' does not match the value {4c6a8bcb-3766-4581-9f45-0de031c65c95} stored in the media registry ('/home/vbox/.VirtualBox/VirtualBox.xml')
I already tried to search the error online and tried to follow different instructions but none worked.
You can find the output of VBoxManage showvminfo DockerRegistry --details here (I did not pasted it here because it is very long).
The output of VBoxManage showhdinfo ubuntu-14.04-server-amd64-disk1.vdi is:
vbox#chebasti:~/VirtualBox VMs/DockerRegistry$ VBoxManage showhdinfo ubuntu-14.04-server-amd64-disk1.vdi
UUID: 4c6a8bcb-3766-4581-9f45-0de031c65c95
Accessible: no
Access Error: UUID {20afee16-bf06-43c4-ab02-770106ce3498} of the medium '/home/vbox/VirtualBox VMs/DockerRegistry/ubuntu-14.04-server-amd64-disk1.vdi' does not match the value {4c6a8bcb-3766-4581-9f45-0de031c65c95} stored in the media registry ('/home/vbox/.VirtualBox/VirtualBox.xml')
Logical size: 0 MBytes
Current size on disk: 0 MBytes
Type: normal (base)
Storage format: VDI
Format variant: dynamic default
In use by VMs: DockerRegistry (UUID: 952200e9-db58-420a-8fe1-ef49523def3d)
Location: /home/vbox/VirtualBox VMs/DockerRegistry/ubuntu-14.04-server-amd64-disk1.vdi
UPDATE
I don't know if it is of any use but here you are the output of VBoxManage showhdinfo \{4d495022-b596-47c0-8f38-f16c6c5d7f63\}.vdi:
vbox#chebasti:~/VirtualBox VMs/DockerRegistry/Snapshots$ VBoxManage showhdinfo \{4d495022-b596-47c0-8f38-f16c6c5d7f63\}.vdi
UUID: 4d495022-b596-47c0-8f38-f16c6c5d7f63
Accessible: yes
Logical size: 0 MBytes
Current size on disk: 564 MBytes
Type: normal (differencing)
Storage format: VDI
Format variant: differencing default
In use by VMs: DockerRegistry (UUID: 952200e9-db58-420a-8fe1-ef49523def3d)
Location: /home/vbox/VirtualBox VMs/DockerRegistry/Snapshots/{4d495022-b596-47c0-8f38-f16c6c5d7f63}.vdi
Auto-Reset: off
I just had this problem with my boot2docker VM after running low on power on my macbook.
$ boot2docker start -v
Using virtualbox driver
2014/09/04 18:00:42 executing: VBoxManage showvminfo boot2docker-vm --machinereadable
2014/09/04 18:00:42 executing: VBoxManage startvm boot2docker-vm --type headless
Waiting for VM "boot2docker-vm" to power on...
VBoxManage: error: UUID {0caf9f04-5159-403a-828c-0dd9be68e1a0} of the medium '/Users/-/VirtualBox VMs/boot2docker-vm/boot2docker-vm.vmdk' does not match the value {07ad4be9-d2d0-4ac5-bb8a-e992e816ed19} stored in the media registry ('/Users/-/Library/VirtualBox/VirtualBox.xml')
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Medium, interface IMedium
What seemed to fix it for me was to "boot2docker stop", remove the .vmdk from VirtualBox Storage settings, run this command (mentioned in http://www.vleeuwen.net/2012/10/virtualbox-uuid-mismatch):
VBoxManage closemedium disk ~/VirtualBox\ VMs/boot2docker-vm/boot2docker-vm.vmdk
then reattach the disk and "boot2docker start".
Just leaving a reply for future (unlucky) people.
I couldn't find a solution and even on the VirtualBox forum anybody could help me. I reinstalled the machine.