Problem with clone a virtual machine VBOX_E_FILE_ERROR

Discussions related to using VirtualBox on Linux hosts.
Post Reply
mofo
Posts: 3
Joined: 16. Jul 2022, 12:36

Problem with clone a virtual machine VBOX_E_FILE_ERROR

Post by mofo »

Hallo,
at first any Informations:

The host is openSUSE Leap" VERSION="15.3" and the guest is Windows 10.

VBoxManage showvminfo W10_2021_07 --details

Code: Select all

Name:                        W10_2021_07 
Groups:                      / 
Guest OS:                    Windows 10 (64-bit) 
UUID:                        5fe5fdfa-f3ff-4414-9824-9434418b73d7 
Config file:                 /home/vbox/W10_2021_07/W10_2021_07.vbox 
Snapshot folder:             /home/vbox/W10_2021_07/Snapshots 
Log folder:                  /home/vbox/W10_2021_07/Logs 
Hardware UUID:               ca91be21-2569-41e8-ae65-60efb9c8786a 
Memory size:                 4096MB 
Page Fusion:                 disabled 
VRAM size:                   128MB 
CPU exec cap:                100% 
HPET:                        disabled 
CPUProfile:                  host 
Chipset:                     piix3 
Firmware:                    BIOS 
Number of CPUs:              2 
PAE:                         enabled 
Long Mode:                   enabled 
Triple Fault Reset:          disabled 
APIC:                        enabled 
X2APIC:                      disabled 
Nested VT-x/AMD-V:           disabled 
CPUID Portability Level:     0 
CPUID overrides:             None 
Boot menu mode:              message and menu 
Boot Device 1:               HardDisk 
Boot Device 2:               DVD 
Boot Device 3:               Not Assigned 
Boot Device 4:               Not Assigned 
ACPI:                        enabled 
IOAPIC:                      enabled 
BIOS APIC mode:              APIC 
Time offset:                 0ms 
RTC:                         local time 
Hardware Virtualization:     enabled 
Nested Paging:               enabled 
Large Pages:                 disabled 
VT-x VPID:                   enabled 
VT-x Unrestricted Exec.:     enabled 
Paravirt. Provider:          Default 
Effective Paravirt. Prov.:   HyperV 
State:                       powered off (since 2022-07-16T08:33:19.000000000) 
Graphics Controller:         VBoxVGA 
Monitor count:               1 
3D Acceleration:             disabled 
2D Video Acceleration:       disabled 
Teleporter Enabled:          disabled 
Teleporter Port:             0 
Teleporter Address:           
Teleporter Password:          
Tracing Enabled:             disabled 
Allow Tracing to Access VM:  disabled 
Tracing Configuration:        
Autostart Enabled:           disabled 
Autostart Delay:             0 
Default Frontend:             
VM process priority:         default 
Storage Controller Name (0):            SATA 
Storage Controller Type (0):            IntelAhci 
Storage Controller Instance Number (0): 0 
Storage Controller Max Port Count (0):  30 
Storage Controller Port Count (0):      2 
Storage Controller Bootable (0):        on 
SATA (0, 0): /home/vbox/W10_2021_07/W7_2016_05_orig-cl4.vdi (UUID: 3dde3a68-6ac1-413d-ba9a-ee398f1a011d) 
SATA (1, 0): /home/.config/VirtualBox/VBoxGuestAdditions_6.1.28.iso (UUID: 80407d8e-7425-4bf8-9453-d156c47d8c3f) 
NIC 1:                       MAC: 080027A0EC8D, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbp
s, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none 
NIC 1 Settings:  MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64) 
NIC 2:                       disabled 
NIC 3:                       disabled 
NIC 4:                       disabled 
NIC 5:                       disabled 
NIC 6:                       disabled 
NIC 7:                       disabled 
NIC 8:                       disabled 
Pointing Device:             USB Tablet 
Keyboard Device:             PS/2 Keyboard 
UART 1:                      disabled 
UART 2:                      disabled 
UART 3:                      disabled 
UART 4:                      disabled 
LPT 1:                       disabled 
LPT 2:                       disabled 
Audio:                       enabled (Driver: PulseAudio, Controller: HDA, Codec: STAC9221) 
Audio playback:              enabled 
Audio capture:               disabled 
Clipboard Mode:              Bidirectional 
Drag and drop Mode:          disabled 
VRDE:                        disabled 
OHCI USB:                    enabled 
EHCI USB:                    disabled 
xHCI USB:                    disabled 

USB Device Filters: 

<none> 

Bandwidth groups:  <none> 

Shared folders: 

Name: 'WXPW10_shared_Ordner', Host path: '/home/WXPW10_shared_Ordner' (machine mapping), writable, auto-mount 

Capturing:                   not active 
Capture audio:               not active 
Capture screens:             0 
Capture file:                /home/vbox/W10_2021_07/W10_2021_07.webm 
Capture dimensions:          1024x768 
Capture rate:                512kbps 
Capture FPS:                 25kbps 
Capture options:             ac_enabled=false 

Description: 
W10 
Guest: 

Configured memory balloon size: 0MB
Now my Problem:
If i start the machine W10_2021_07 it works fine
but if i running

Code: Select all

VBoxManage clonevm W10_2021_07 --name=W10_2022_07_16 --register --mode=all --options=keepallmacs --options=keepdisknames --options=keephwuuids
the result is:

Code: Select all

0%...10%...20%...30%...40%...50%...60%... 
Progress state: VBOX_E_FILE_ERROR 
VBoxManage: error: Clone VM failed 
VBoxManage: error: Could not create the clone medium '/home/vbox/W10_2022_07_16/W7_2016_05_orig-cl4.vdi' (VERR_DEV_IO_ERROR) 
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium 
VBoxManage: error: Context: "RTEXITCODE handleCloneVM(HandlerArg*)" at line 610 of file VBoxManageMisc.cpp
If i copy the file W7_2016_05_orig-cl4.vdi in the Konsole, then i get a IO-Error too.

Sorry for my poor english.
Thank you in advance.

mofo
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problem with clone a virtual machine VBOX_E_FILE_ERROR

Post by mpack »

Obviously you seem to have some kind of I/O error on the host drive. First guess is that the destination drive is full. Second guess is that the source VDI has been corrupted. Third is that the destination host drive has bad sectors.
mofo
Posts: 3
Joined: 16. Jul 2022, 12:36

Re: Problem with clone a virtual machine VBOX_E_FILE_ERROR

Post by mofo »

Mpack wrote:
Obviously you seem to have some kind of I/O error on the host drive.
Yes, it is so. I boot from a knoppix-CD and run fsck. Any problems have been repaired.
Mpack wrote:
First guess is that the destination drive is full
No, on the destination drive are 716 Gbyte free free disk space.
Mpack wrote:
Second guess is that the source VDI has been corrupted
Can the VDI be corrupted although the VM runs fine? If it is so, how can i repaire the VDI?
I started the VM -Windows 10 and run there about "Tools" examine (german "Prüfen") and get the result:

Code: Select all

Das Laufwerk wurde erfolgreich gescannt. Es wurden keine Fehler gefunden
That is: No error found.
Mpack wrote:
Third is that the destination host drive has bad sectors.
I will check it with the knoppix-CD later.

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

Re: Problem with clone a virtual machine VBOX_E_FILE_ERROR

Post by scottgus1 »

mofo wrote:Can the VDI be corrupted although the VM runs fine?
Yes, if the corruption is located in sectors that aren't used by the OS to boot and run, same as for a real drive in a physical PC.
mofo wrote:If it is so, how can i repaire the VDI?
Run disk-checking tools inside the VM, same as for a real drive in a physical PC.
Is that what you did here:
mofo wrote:I started the VM -Windows 10 and run there about "Tools" examine (german "Prüfen") and get the result:

Code: Select all

Das Laufwerk wurde erfolgreich gescannt. Es wurden keine Fehler gefunden
That is: No error found.
If so, then the drive from inside the VM OS seems OK.

You could always recover a good vdi from your backups. Or attach a second vdi on a known tested good host drive to the VM and run cloning software inside the VM to clone the OS and data to the second vdi.
mofo
Posts: 3
Joined: 16. Jul 2022, 12:36

Re: Problem with clone a virtual machine VBOX_E_FILE_ERROR

Post by mofo »

Hallo,
Thank you very much for the help, but unfortunately nothing worked. I will probably have to rebuild the virtual machine.
Sometimes thank you and bye
mofo
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problem with clone a virtual machine VBOX_E_FILE_ERROR

Post by mpack »

I would not give up yet.

I don't know what's available on Linux hosts, but on Windows there are tools which will copy a source file as best it can, ignoring errors. You end up with a corrupted copy, which is often better than nothing at all.

For Linux I did a quick check and came up with something called "safecopy", though that seems to be tailored more towards devices than files. That means you'd have to run it inside the VM - or perhaps you can find something file based yourself.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Problem with clone a virtual machine VBOX_E_FILE_ERROR

Post by fth0 »

FWIW, on a Linux host, dd and ddrescue both can handle bad sectors.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problem with clone a virtual machine VBOX_E_FILE_ERROR

Post by mpack »

Hmm. The sources I found for safecopy said it was preferred in situations where dd gave errors. However, maybe that source was wrong or outdated. I've never had to worry about this things with a Linux host myself.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Problem with clone a virtual machine VBOX_E_FILE_ERROR

Post by fth0 »

You can use dd if you're satisfied with bad sectors getting replaced by zero-filled sectors.

But as you probably know, dd is not really user-friendly, so you must understand what you're requesting it to do. For a chilling example, for a data source with 512 byte sectors, you'd have to use "bs=512 conv=sync,noerror" as part of the arguments, because the "sync" tells it to fill unreadable blocks, not sectors, up to the block size. The "noerror" then tells it to continue after read errors.
Post Reply