VirtualBox 6.1 on Linux Mint Failed to Move VMs between different drives

Discussions related to using VirtualBox on Linux hosts.
tancio
Posts: 8
Joined: 10. Jan 2020, 21:25

Re: [Resolved] Changes to the Default Machine Folder in VirtualBox 6.0

Post by tancio »

Dear all, I've installed VirtualBox 6.1. My host OS is Linux Mint 19.3
I've been trying to move virtual machines but the "move" feature works only if source folder and destination folder are on the same drive.
Every time I try to move a VM from one drive to another drive i get the following error:
"Spostamento della macchina virtuale Win10-Base non riuscito." (Failed to move the virtual machine)
The given path '/home/stefano/VirtualBox VMs/Win10-Base/Snapshots/{49ef75f3-fd87-470b-98bd-ef25ba73de89}.vdi' is an existing file. Delete or rename this file..
Codice di uscita:VBOX_E_FILE_ERROR (0x80BB0004)
Componente: MediumWrap
Interfaccia: IMedium {ad47ad09-787b-44ab-b343-a082a3f2dfb1}

I did many tests using different Virtual Machines but the move command works only if the destination path is on the same disk. It lokks like moving Vms from one drive to another is not supported.
Can anyone help me?
Thanks
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: [Resolved] Changes to the Default Machine Folder in VirtualBox 6.0

Post by scottgus1 »

tancio wrote:the "move" feature works only if source folder and destination folder are on the same drive.
I have a Windows 10 host with 6.1.0. I just moved a 4GB XP guest from the C drive to the F drive, two separate devices.

Moving to another drive is supported.
tancio wrote:The given path '/home/stefano/VirtualBox VMs/Win10-Base/Snapshots/{49ef75f3-fd87-470b-98bd-ef25ba73de89}.vdi' is an existing file. Delete or rename this file.
Your error says Virtualbox is trying to make a file named the same as a file that already exists in the destination. Virtualbox will not overwrite files.

You have to find out what files exist in '/home/stefano/VirtualBox VMs/Win10-Base/Snapshots' and confirm that a move command didn't suddenly fail or have issues earlier. Figure out what should be there and what is there already.

Also, if the post you are about to add onto is marked [anything], like [Resolved], then you should post in a new topic.
tancio
Posts: 8
Joined: 10. Jan 2020, 21:25

Re: [Resolved] Changes to the Default Machine Folder in VirtualBox 6.0

Post by tancio »

Hi, thanks for your replay.
To avoid any possibile error related to older snapshots or files I've just created a brand new Vm called "TEST-VM" with a new empty virtual disk.
Destination path is an empty folder (on a different drive).
The move command failed with the following error:

Spostamento della macchina virtuale TEST-VM non riuscito. (Failed to move Virtual Machine)
The given path '/home/stefano/VirtualBox VMs/TEST-VM/TEST-VM.vdi' is an existing file. Delete or rename this file..
Codice di uscita:VBOX_E_FILE_ERROR (0x80BB0004)
Componente: MediumWrap
Interfaccia: IMedium {ad47ad09-787b-44ab-b343-a082a3f2dfb1}

Thanks
Stefano
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: [Resolved] Changes to the Default Machine Folder in VirtualBox 6.0

Post by scottgus1 »

Very good test, Stefano! Definitely shows there's something wrong.

A few things where your issue could come from:

1. Something is wrong with permissions in '/home/stefano/VirtualBox VMs'

2. Something is wrong with the destination folder and the error message isn't formatted properly.

3. Something is wrong with Virtualbox on Linux hosts.

Could be other issues too. Unfortunately, this is 'Windows Hosts', so the Linux gurus might hang out more in "Linux Hosts'. Please post there with this issue, maybe they have a better idea than a Windows guy like me.
tancio
Posts: 8
Joined: 10. Jan 2020, 21:25

Re: [Resolved] Changes to the Default Machine Folder in VirtualBox 6.0

Post by tancio »

Thank you very much for your help.

...I tryed to move the VDI disk only using the Virtual Media Manager and I got this error:

Spostamento dell'unità di archiviazione dell'immagine del disco /home/stefano/VirtualBox VMs/TEST-VM/TEST-VM.vdi in /mnt/ab27d32b-8025-4677-bb8e-88c2b836449d/VBOX/TEST-VM.vdi non riuscito. (Failed to move the disk image)
Could not move medium '/mnt/ab27d32b-8025-4677-bb8e-88c2b836449d/VBOX/TEST-VM.vdi' (VERR_NOT_SAME_DEVICE).
Codice di uscita:VBOX_E_FILE_ERROR (0x80BB0004)
Componente: MediumWrap
Interfaccia: IMedium {ad47ad09-787b-44ab-b343-a082a3f2dfb1}

It's look like Virtual Box movevm can't move the VDI image from on drive to a another different drive.

I'll try posting on the "Linux Host" sorry if I missplaced my post.
Regards
Stefano
tancio
Posts: 8
Joined: 10. Jan 2020, 21:25

VirtualBox 6.1 on Linux Mint Failed to Move VMs between different drives

Post by tancio »

Dear all, I've installed VirtualBox 6.1. My host OS is Linux Mint 19.3
I've been trying to move virtual machines but the "move" feature works only if source folder and destination folder are on the same drive.
Every time I try to move a VM from one drive to another drive i get the following error:
"Spostamento della macchina virtuale Win10-Base non riuscito." (Failed to move the virtual machine)
The given path '/home/stefano/VirtualBox VMs/Win10-Base/Snapshots/{49ef75f3-fd87-470b-98bd-ef25ba73de89}.vdi' is an existing file. Delete or rename this file..
Codice di uscita:VBOX_E_FILE_ERROR (0x80BB0004)
Componente: MediumWrap
Interfaccia: IMedium {ad47ad09-787b-44ab-b343-a082a3f2dfb1}

I did many tests using different Virtual Machines but the move command works only if the destination path is on the same disk. It lokks like moving Vms from one drive to another is not supported.

To avoid any possibile error related to older snapshots or files I've just created a brand new Vm called "TEST-VM" with a new empty virtual disk.
Destination path is an empty folder (on a different drive).
The move command failed with the following error:

Spostamento della macchina virtuale TEST-VM non riuscito. (Failed to move Virtual Machine)
The given path '/home/stefano/VirtualBox VMs/TEST-VM/TEST-VM.vdi' is an existing file. Delete or rename this file..
Codice di uscita:VBOX_E_FILE_ERROR (0x80BB0004)
Componente: MediumWrap
Interfaccia: IMedium {ad47ad09-787b-44ab-b343-a082a3f2dfb1}


...I tryed to move the VDI disk only using the Virtual Media Manager and I got this error:

Spostamento dell'unità di archiviazione dell'immagine del disco /home/stefano/VirtualBox VMs/TEST-VM/TEST-VM.vdi in /mnt/ab27d32b-8025-4677-bb8e-88c2b836449d/VBOX/TEST-VM.vdi non riuscito. (Failed to move the disk image)
Could not move medium '/mnt/ab27d32b-8025-4677-bb8e-88c2b836449d/VBOX/TEST-VM.vdi' (VERR_NOT_SAME_DEVICE).
Codice di uscita:VBOX_E_FILE_ERROR (0x80BB0004)
Componente: MediumWrap
Interfaccia: IMedium {ad47ad09-787b-44ab-b343-a082a3f2dfb1}

It's look like Virtual Box movevm can't move the VDI image from on drive to a another different drive.

Thanks
Stefano
tancio
Posts: 8
Joined: 10. Jan 2020, 21:25

Re: VirtualBox 6.1 on Linux Mint Failed to Move VMs between different drives

Post by tancio »

Hi All, unfortunately I have no good news.
I’ve been trying to fix this issue in the last few days.
I even tried to format the destination disk as NTFS or ext4 but every time I try to move the vdi disk Virtual Box return the same error.
Anyone can help me?
Regards Stefano
WFV
Posts: 82
Joined: 7. Mar 2016, 13:28
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: ArchLinux; Fedora; Ubuntu; Win7pro64; WinXP
Contact:

Re: VirtualBox 6.1 on Linux Mint Failed to Move VMs between different drives

Post by WFV »

Have you tried rsync the VirtualBox VMs folder from one drive to the other?
I have no W10 guest experience, only XP and W7 - but moved an Ubuntu guest from a desktop Linux pc to a laptop W10 pc w/o too much trouble, had to do some cli stuff to get the Ubuntu guest to activate on the new host, nothing that isn't covered in the Documentaion
tancio
Posts: 8
Joined: 10. Jan 2020, 21:25

Re: VirtualBox 6.1 on Linux Mint Failed to Move VMs between different drives

Post by tancio »

Hi, unfortunately I can't use rsync, i really need to "Move" the VM's.
I just updated VirtualBox to the latest versione 6.1.2 but the movevm commnd fails to move the VDI image just like before.
Regards.
WFV
Posts: 82
Joined: 7. Mar 2016, 13:28
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: ArchLinux; Fedora; Ubuntu; Win7pro64; WinXP
Contact:

Re: VirtualBox 6.1 on Linux Mint Failed to Move VMs between different drives

Post by WFV »

Copying original from one place to another, then deleting the original is no different than "moving" as far as I know. With rsync preserve the attributes of the original in the copy. No?
tancio
Posts: 8
Joined: 10. Jan 2020, 21:25

Re: VirtualBox 6.1 on Linux Mint Failed to Move VMs between different drives

Post by tancio »

The movemv command should preserve virtual machine configuration and properties,expecially if you have snapshots or multi attached vdi images.
Manually moving files when using multi attached images or advanced storage features will result in unusable vdi image.
The only way I found to manually move the vm in the above scenario is to export the machine and import it back. However multi attached disk functionality will not be preserved (and you will need extra disk space).
Regards
WFV
Posts: 82
Joined: 7. Mar 2016, 13:28
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: ArchLinux; Fedora; Ubuntu; Win7pro64; WinXP
Contact:

Re: VirtualBox 6.1 on Linux Mint Failed to Move VMs between different drives

Post by WFV »

Ok, I've had no issues preserving the entire

Code: Select all

/home/me/VirtualBox VMs
directory nor appliances via rsync and often times use it to reverse overwrite when a guest goes sideways. Always across multiple drives. This includes Windows guests on Linux host, and as mentioned moving a Linux guest from a Linux desktop host to a Windows laptop host (via an external drive even...) of course on the Windows host rsync was no longer part of the process, but it was used to put the Linux guest on an external drive formatted NTFS so the Windows host (laptop) could read it and worked... there were several other steps involved resurrecting the Linux guest on the Windows host machine.
I've never used

Code: Select all

vboxmanage movevm
to do this. Perhaps yours is a production environment in which case I can provide no further assistance.
tancio
Posts: 8
Joined: 10. Jan 2020, 21:25

Re: VirtualBox 6.1 on Linux Mint Failed to Move VMs between different drives

Post by tancio »

WFV wrote:Ok, I've had no issues preserving the entire

Code: Select all

/home/me/VirtualBox VMs
directory nor appliances via rsync and often times use it to reverse overwrite when a guest goes sideways. Always across multiple drives. This includes Windows guests on Linux host, and as mentioned moving a Linux guest from a Linux desktop host to a Windows laptop host (via an external drive even...) of course on the Windows host rsync was no longer part of the process, but it was used to put the Linux guest on an external drive formatted NTFS so the Windows host (laptop) could read it and worked... there were several other steps involved resurrecting the Linux guest on the Windows host machine.
I've never used

Code: Select all

vboxmanage movevm
to do this. Perhaps yours is a production environment in which case I can provide no further assistance.
Hi, thanks for your help.
The solution you are suggesting is fine and working, however I'm stil wondering why a simple movevm is not working when different drive are involved, Not even if I try to move a simple VM based on an empty VDI image.
I'm currently using multiple Windows 10 VMs and, in order to optimize disk space usage, I created a base Windows 10 VDI disk (multi attached image type) and each VM use an incremental VDI image.
The movevm commands works fine and preserve all the above relations only if source disk and destination are on the same partition.
In the next days I'll make some more tests to find out what's going on...
Thank you for your help.
Regards
Stefano
Stasher
Posts: 1
Joined: 22. Jan 2020, 16:09

Re: VirtualBox 6.1 on Linux Mint Failed to Move VMs between different drives

Post by Stasher »

This function's never worked for me too. Every time I tried to move my VM I got "Failed to move the virtual machine ...". I ran it from GUI and from console - the same result. First time I tried it was years ago and now, with 6.1.2 it still doesn't work. I'm afraid that tradition may break after this topic :)

My VM is Linked Clone of another VM and has several snapshots. I have move error with moving a snapshot file. I use ArchLinux x64 as host system. When I run it from GUI I have:
Failed to move the virtual machine XXXXX.
The given path '/XXX/XXXX.vdi' is an existing file. Delete or rename this file..
Result Code:
VBOX_E_FILE_ERROR (0x80BB0004)
Component:
MediumWrap
Interface:
IMedium {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}.
When I run from console I have:
$ vboxmanage movevm "XXXXXX" --type basic --folder "/xxx/xxxx/xxxx/"
0%...
Progress state: VBOX_E_INVALID_OBJECT_STATE
VBoxManage: error: Move VM failed
VBoxManage: error: The given path '/xxx/xxx/xxxx/xxxxx/xxxxx/{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}.vdi' is an existing file. Delete or rename this file.
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium
VBoxManage: error: Context: "RTEXITCODE handleMoveVM(HandlerArg*)" at line 390 of file VBoxManageMisc.cpp
Schaffstein
Posts: 13
Joined: 5. Mar 2018, 14:33

Re: VirtualBox 6.1 on Linux Mint Failed to Move VMs between different drives

Post by Schaffstein »

I am having the same issue with Windows host and guest (Win10 Pro).
A move works only on the same drive. So it is not only a Linux problem.
The move feature from the GUI starts does create the necessary folders (VM, Logs, Snaphots) and copies the files but eventually aborts at the end when the original files are supposed to be deleted.
Post Reply