Hello,
Background:
I am using VirtualBox 4.2.8 on CentOs 6, hosting several linux VMs.
The problem:
Every time when I export a VM and the target disk gets full the exported VM is stuck. It can't be started again even if I delete the resulting file and free up a lot of space (Error: Locking of attached media failed) .
The only way to unstuck it is to restart the hosting machine which is pain because I have to restart all the other VMs.
I've tried to kill the VBoxManage process that is exporting the file but it didn't help..
Using lsof I can see the VBoxSVC is holding the disk file and the exported file.
Is there a way to unlock the media (restart VBoxSVC?) without stopping the other VMs?
VM stuck when exporting VM and target drive is full
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: VM stuck when exporting VM and target drive is full
So, you mean that the export task locks up and also locks up the media?
It would probably be best if you raised this as a ticket on BugTracker. It sounds like something that should be fixed easily.
As a workaround, and assuming that you are not moving VMs to a different vendor, you can copy VirtualBox VMs around simply by copying the VM folder. In fact this is the preferred method. See Howto: Move a VM.
It would probably be best if you raised this as a ticket on BugTracker. It sounds like something that should be fixed easily.
As a workaround, and assuming that you are not moving VMs to a different vendor, you can copy VirtualBox VMs around simply by copying the VM folder. In fact this is the preferred method. See Howto: Move a VM.
Re: VM stuck when exporting VM and target drive is full
Thanks,
Yup seems that the export task locks up the media and we need a way to unlock it.
I export the VM and then import it to another host with some changed parameters ( mac address, vm name etc) so just moving around probably won't suits my needs. Also the exported file is quite smaller than the original file which helps me to store the files and transfer them.
Yup seems that the export task locks up the media and we need a way to unlock it.
I export the VM and then import it to another host with some changed parameters ( mac address, vm name etc) so just moving around probably won't suits my needs. Also the exported file is quite smaller than the original file which helps me to store the files and transfer them.
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: VM stuck when exporting VM and target drive is full
If you run "ps -aux | grep VirtualBox", does it still reference the guest and does it also have a PID?
If so try killing that one service and see if you can start it again.
If so try killing that one service and see if you can start it again.
Re: VM stuck when exporting VM and target drive is full
Yup I kill this process but it doesn't change anything. As I said the files are locked by VBoxSVC.
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: VM stuck when exporting VM and target drive is full
You can stop and start the service, I just don't know what it will do to the still running guests.
sudo /etc/init.d/vboxdrv stop followed with sudo /etc/init.d/vboxdrv start after a few seconds to allow the stop to finish. ( monitor the process to see when it stops )
sudo /etc/init.d/vboxdrv stop followed with sudo /etc/init.d/vboxdrv start after a few seconds to allow the stop to finish. ( monitor the process to see when it stops )