Page 1 of 2
Using VB image/settings from Windows host on Linux host
Posted: 17. May 2011, 19:08
by doktor5000
Hello,
i have a small problem when transferring VMs between hosts.
At school i copied the Virtualbox_VM folder with the settings and snapshots
and the according .vdi file for this VM. Under linux when i try to open the
.vbox file (as importing only seems to support .ova/ovf, not virtualbox VMs itself?)
i get the following error message, after correcting the [windows] path to the .vdi
to where it lies now on the linux host:
[without correcting, the error was the same, only the path to the .vdi was wrong]
Couldn't open virtual machine in /home/shadow/VirtualBox VMs/OPSI-Depotserver/OPSI-Depotserver.vbox.
Medium '/home/shadow/opsidemo_4.0.1.vdi' cannot be closed because it is still attached to 1 virtual machines.
Details:
Error code: VBOX_E_OBJECT_IN_USE (0x80BB000C)
Component: Medium
Interface: IMedium {9edda847-1279-4b0a-9af7-9d66251ccc18}
Callee: IVirtualBox {d2de270c-1d4b-4c9e-843f-bbb9b47269ff}
Callee RC:NS_ERROR_INVALID_ARG (0x80070057)
Some parts i have already translated from german to english, shouldn't matter anyways.
Now the important question: Ho do i de-attach the .vdi from its non-existing VM?
Or, as a workaround, how to i merge the .vdi with its snapshots with VBoxManage,
so that i could recreate a fresh VM and attach the merged .vdi to it?
Thanks in Advance
Re: Using VB image/settings from Windows host on Linux host
Posted: 17. May 2011, 20:14
by doktor5000
Further information:
Code: Select all
$ VBoxManage showhdinfo opsidemo_4.0.1.vdi
UUID: 3810fba1-38d7-404f-b35c-59cd14be6007
Accessible: yes
Logical size: 61440 MBytes
Current size on disk: 3428 MBytes
Type: normal (base)
Storage format: VDI
Format variant: dynamic default
Location: /home/shadow/opsidemo_4.0.1.vdi
What does "Accessible: Yes" mean in this context?
Re: Using VB image/settings from Windows host on Linux host
Posted: 17. May 2011, 20:21
by Perryg
What is/was the version of VirtualBox? both the school and home.
Re: Using VB image/settings from Windows host on Linux host
Posted: 17. May 2011, 21:06
by doktor5000
At school this was VirtualBox 4.0.6 PUEL under Win XP, and at home its VirtualBox 4.0.6 OSE under Mandriva 2010.1.
I may have gotten a little further, at least with the insight that i should have exported the VM at school, so the snapshots
get merged back in the .vdi, and then i could have attached it to a fresh VM.
But is it not possible to detach it from whatever it seems attached to now?
I have read another post, where a user detached a .vdi from a VM, but i don't
have a VM, only the .vdi.
Re: Using VB image/settings from Windows host on Linux host
Posted: 17. May 2011, 21:08
by Perryg
Well all you should have needed to do was to put the entire folder that houses the guest and all of its files in your default folder and double click the *.vbox file in that folder. It should then register it and it should work.
Re: Using VB image/settings from Windows host on Linux host
Posted: 17. May 2011, 23:50
by doktor5000
That was exactly what i have done, maybe my description was not that good. And it does not work.
Is there no way to see why Virtualbox thinks that this .vdi is still attached to ... something?
Something in the xml (.vbox-file) maybe?
Re: Using VB image/settings from Windows host on Linux host
Posted: 18. May 2011, 00:23
by AntonyReynolds
I am seeing the same problem, but going from a Linux host to a Windows host.
I have posted a similar question -
Failed to Open Virtual Machine - Medium Cannot be Closed.
I have done this successfully in the past by copying the whole VM directory between machines and had no problems. So I am at a loss what is wrong this time.
Re: Using VB image/settings from Windows host on Linux host
Posted: 18. May 2011, 00:25
by Perryg
That's a good question. I have not had a failure like you are describing with ver4.*. Now if the guest was in a saved state that might cause this. All of the control files are in the guests folder in ver 4 . As for different hosts I do it all the time and usually it just works. On occasion I need to change a setting but no refusal to register.
Go ahead and post the *.vbox file so I can have a look.
@AnthonyReynolds,
Post your *.vbox file as well. Also was it in a saved state or shutdown.
And can you both post the complete error message with the message info intact.
Re: Using VB image/settings from Windows host on Linux host
Posted: 18. May 2011, 00:34
by AntonyReynolds
Thanks for the response.
From other post
I just moved to a new machine and tried to add an existing VirtualBox. I got the following error.
Code: Select all
Failed to open virtual machine located in
D:/VirtualMachines/OEL6-x64/OEL6-x64.vbox.
Medium 'D:\VirtualMachines\OEL6-x64\OEL6-
x64.vdi' cannot be closed because it is still attached to 1
virtual machines.
The Details box contains:
Code: Select all
Result Code:
VBOX_E_OBJECT_IN_USE (0x80BB000C)
Component:
Medium
Interface:
IMedium {9edda847-1279-4b0a-9af7-9d66251ccc18}
Callee:
IVirtualBox {d2de270c-1d4b-4c9e-843f-bbb9b47269ff}
Callee RC:
E_INVALIDARG (0x80070057)
This is VirtualBox 4.0.8. Image was created under 4.0.6 but I tested it on 4.0.8 before moving it to the new machine.
I have uploaded my VBox file
with a .txt extension to make it upload.
None of my virtual machines were open. All snapshots were of powered down machines, so no memory or register information saved in the snapshots.
Re: Using VB image/settings from Windows host on Linux host
Posted: 18. May 2011, 00:36
by doktor5000
If it would be only a single .vdi file without snapshots, it would be dead simple:
Copy only the .vdi file over and create a fresh VM and attach the .vdi file.
But i need those snapshots, also there is no way AFAICS to merge
the state of the snapshots (or should i say differencing images) back
to the vdi, at least not from the Manager for virtual images, or what
it's called in english. Also with VBoxManage snapshots it seems
only able to restore to the state of the last snapshot, but not to merge
the state since the last snapshot to the .vdi, from my understanding.
Tomorrow i'l try to export the whole appliance, in this process the
snapshots should get merged back with the .vdi and also merged
with the setting, as far as what the documentation says.
In my case the machine was powered off and virtualbox closed when
i copied the whole thing. But at the state of the last snapshot the machine
was online, i think. Also it was not in a saved state.
Re: Using VB image/settings from Windows host on Linux host
Posted: 18. May 2011, 00:53
by Perryg
OK I think I see what might be causing this. Both still have *.iso in the CD/DVD and I bet the second machine does not have this. IIRC I read about this on bugtracker and it is either being worked on or might even be fixed. Search
bugtracker and see if you can find it.
Re: Using VB image/settings from Windows host on Linux host
Posted: 18. May 2011, 01:05
by AntonyReynolds
I tried removing the DVDImages but still got the same problem. (I replace it with "<DVDImages></DVDImages>", "</DVDImages>" and also removed it completely). I also removed the "<SharedFolders>" tag.
Re: Using VB image/settings from Windows host on Linux host
Posted: 18. May 2011, 01:07
by Perryg
Then I have nothing more to suggest. I haven't been able to actually reproduce this myself and while I am sure it is an issue it has come up so rarely that I don't have an answer. You should post this to
bugtracker and let the DEVs have a look at it.
Re: Using VB image/settings from Windows host on Linux host
Posted: 18. May 2011, 01:20
by AntonyReynolds
Thanks for your suggestions.
Re: Using VB image/settings from Windows host on Linux host
Posted: 18. May 2011, 01:43
by AntonyReynolds
I have opened
ticket #8910 for this.