VirtualBox

Opened 7 years ago

Closed 5 years ago

#16583 closed defect (worksforme)

Disk information are not being flushed from VBoxSVC's memory to the media registry

Reported by: Anderson M. Gomes Owned by:
Component: virtual disk Version: VirtualBox 5.1.18
Keywords: Cc:
Guest type: all Host type: Linux

Description

I have a set of VHD files from a virtual machine that was created in a Hyper-V installation. I am able to attach those files into a new virtual machine in VirtualBox, however I'm unable to use them again after closing the VirtualBox window or rebooting the host computer.

I believe the bug happens because VBoxSVC is not saving information about disks it knows to the media registry. I can reproduce the the bug by invoking a sequence of VBoxManage calls from a script:

$ bash /tmp/vboxbug.sh 
+ vmname=VHDBUG
+ rootdir='/home/vboxbug/VirtualBox VMs/VHDBUG'
+ wait=true
+ killall -0 -v VBoxSVC
VBoxSVC: no process found
+ true
+ mkdir -pv '/home/vboxbug/VirtualBox VMs/VHDBUG'
mkdir: created directory '/home/vboxbug/VirtualBox VMs'
mkdir: created directory '/home/vboxbug/VirtualBox VMs/VHDBUG'
+ VBoxManage createmedium disk --filename '/home/vboxbug/VirtualBox VMs/VHDBUG/basedisk.vhd' --size 1024 --format VHD
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: b33d9462-412b-4b14-ab1b-632831b4594b
+ test -z true
+ killall -0 -w VBoxSVC
+ VBoxManage internalcommands dumphdinfo '/home/vboxbug/VirtualBox VMs/VHDBUG/basedisk.vhd'
--- Dumping VD Disk, Images=1
Dumping VD image "/home/vboxbug/VirtualBox VMs/VHDBUG/basedisk.vhd" (Backend=VHD)
Header: Geometry PCHS=2080/16/63 LCHS=0/0/0 cbSector=512
Header: uuidCreation={b33d9462-412b-4b14-ab1b-632831b4594b}
Header: uuidParent={00000000-0000-0000-0000-000000000000}
+ VBoxManage createmedium disk --filename '/home/vboxbug/VirtualBox VMs/VHDBUG/diffdisk.vhd' --diffparent '/home/vboxbug/VirtualBox VMs/VHDBUG/basedisk.vhd'
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: 538700eb-cd6c-4d2b-b3ee-974d183c0517
+ test -z true
+ killall -0 -w VBoxSVC
+ VBoxManage internalcommands dumphdinfo '/home/vboxbug/VirtualBox VMs/VHDBUG/diffdisk.vhd'
--- Dumping VD Disk, Images=1
Dumping VD image "/home/vboxbug/VirtualBox VMs/VHDBUG/diffdisk.vhd" (Backend=VHD)
Header: Geometry PCHS=2080/16/63 LCHS=0/0/0 cbSector=512
Header: uuidCreation={538700eb-cd6c-4d2b-b3ee-974d183c0517}
Header: uuidParent={b33d9462-412b-4b14-ab1b-632831b4594b}
+ VBoxManage createmedium disk --filename '/home/vboxbug/VirtualBox VMs/VHDBUG/diffdiffdisk.vhd' --diffparent '/home/vboxbug/VirtualBox VMs/VHDBUG/diffdisk.vhd'
VBoxManage: error: Parent medium with UUID {b33d9462-412b-4b14-ab1b-632831b4594b} of the medium '/home/vboxbug/VirtualBox VMs/VHDBUG/diffdisk.vhd' is not found in the media registry ('/home/vboxbug/.config/VirtualBox/VirtualBox.xml')
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MediumWrap, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 179 of file VBoxManageDisk.cpp

Attachments (4)

vboxbug.sh (1.7 KB ) - added by Anderson M. Gomes 7 years ago.
Shell script that reproduces the bug when run on a GNU/Linux host
VBoxSVC.log.1 (2.4 KB ) - added by Anderson M. Gomes 7 years ago.
VBoxSVC log - 2 of 3
VBoxSVC.log (2.8 KB ) - added by Anderson M. Gomes 7 years ago.
VBoxSVC log - 3 of 3
VBoxSVC.log.2 (2.4 KB ) - added by Anderson M. Gomes 7 years ago.
VBoxSVC log - 1 of 3

Download all attachments as: .zip

Change History (8)

by Anderson M. Gomes, 7 years ago

Attachment: vboxbug.sh added

Shell script that reproduces the bug when run on a GNU/Linux host

by Anderson M. Gomes, 7 years ago

Attachment: VBoxSVC.log.1 added

VBoxSVC log - 2 of 3

by Anderson M. Gomes, 7 years ago

Attachment: VBoxSVC.log added

VBoxSVC log - 3 of 3

by Anderson M. Gomes, 7 years ago

Attachment: VBoxSVC.log.2 added

VBoxSVC log - 1 of 3

comment:1 by Anderson M. Gomes, 7 years ago

The problem is reproducible on VirtualBox 5.1.22.

comment:2 by Anderson M. Gomes, 6 years ago

The problem is also reproducible on VirtualBox 5.2.6.

Last edited 6 years ago by Anderson M. Gomes (previous) (diff)

comment:3 by Anderson M. Gomes, 5 years ago

The problem is NOT reproducible on VirtualBox 6.0.0. It has been fixed now, however I am currently unable to close this ticket by myself.

bash vboxbug.sh 
+ vmname=VHDBUG
+ rootdir='/home/amg1127/VirtualBox VMs/VHDBUG'
+ wait=true
+ killall -0 -v VBoxSVC
VBoxSVC: no process found
+ true
+ mkdir -pv '/home/amg1127/VirtualBox VMs/VHDBUG'
mkdir: created directory '/home/amg1127/VirtualBox VMs'
mkdir: created directory '/home/amg1127/VirtualBox VMs/VHDBUG'
+ VBoxManage createmedium disk --filename '/home/amg1127/VirtualBox VMs/VHDBUG/basedisk.vhd' --size 1024 --format VHD
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: d2eb50f5-bc3e-4421-a190-8ef7164f8ac8
+ test -z true
+ killall -0 -w VBoxSVC
+ VBoxManage internalcommands dumphdinfo '/home/amg1127/VirtualBox VMs/VHDBUG/basedisk.vhd'
--- Dumping VD Disk, Images=1
Dumping VD image "/home/amg1127/VirtualBox VMs/VHDBUG/basedisk.vhd" (Backend=VHD)
Header: Geometry PCHS=2080/16/63 LCHS=0/0/0 cbSector=512
Header: uuidCreation={d2eb50f5-bc3e-4421-a190-8ef7164f8ac8}
Header: uuidParent={00000000-0000-0000-0000-000000000000}
+ VBoxManage createmedium disk --filename '/home/amg1127/VirtualBox VMs/VHDBUG/diffdisk.vhd' --diffparent '/home/amg1127/VirtualBox VMs/VHDBUG/basedisk.vhd'
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: 1071cac9-975e-4f52-962b-3cbbd4d4b2cb
+ test -z true
+ killall -0 -w VBoxSVC
+ VBoxManage internalcommands dumphdinfo '/home/amg1127/VirtualBox VMs/VHDBUG/diffdisk.vhd'
--- Dumping VD Disk, Images=1
Dumping VD image "/home/amg1127/VirtualBox VMs/VHDBUG/diffdisk.vhd" (Backend=VHD)
Header: Geometry PCHS=2080/16/63 LCHS=0/0/0 cbSector=512
Header: uuidCreation={1071cac9-975e-4f52-962b-3cbbd4d4b2cb}
Header: uuidParent={d2eb50f5-bc3e-4421-a190-8ef7164f8ac8}
+ VBoxManage createmedium disk --filename '/home/amg1127/VirtualBox VMs/VHDBUG/diffdiffdisk.vhd' --diffparent '/home/amg1127/VirtualBox VMs/VHDBUG/diffdisk.vhd'
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: e04b8226-f14d-469e-8e49-0cb140e1c13b
+ test -z true
+ killall -0 -w VBoxSVC
+ VBoxManage internalcommands dumphdinfo '/home/amg1127/VirtualBox VMs/VHDBUG/diffdiffdisk.vhd'
--- Dumping VD Disk, Images=1
Dumping VD image "/home/amg1127/VirtualBox VMs/VHDBUG/diffdiffdisk.vhd" (Backend=VHD)
Header: Geometry PCHS=2080/16/63 LCHS=0/0/0 cbSector=512
Header: uuidCreation={e04b8226-f14d-469e-8e49-0cb140e1c13b}
Header: uuidParent={1071cac9-975e-4f52-962b-3cbbd4d4b2cb}
+ VBoxManage createvm --name VHDBUG --basefolder '/home/amg1127/VirtualBox VMs/VHDBUG' --ostype Other_64 --register
Virtual machine 'VHDBUG' is created and registered.
UUID: 9b41cbe5-8678-4f3a-89ac-49087fc08d87
Settings file: '/home/amg1127/VirtualBox VMs/VHDBUG/VHDBUG/VHDBUG.vbox'
+ VBoxManage storagectl VHDBUG --name SATA --add sata --portcount 4
+ VBoxManage storageattach VHDBUG --storagectl SATA --port 0 --type hdd --medium '/home/amg1127/VirtualBox VMs/VHDBUG/diffdiffdisk.vhd'
+ test -z true
+ killall -0 -w VBoxSVC
+ VBoxManage showvminfo VHDBUG
Name:                        VHDBUG
Groups:                      /
Guest OS:                    Other/Unknown (64-bit)
UUID:                        9b41cbe5-8678-4f3a-89ac-49087fc08d87
Config file:                 /home/amg1127/VirtualBox VMs/VHDBUG/VHDBUG/VHDBUG.vbox
Snapshot folder:             /home/amg1127/VirtualBox VMs/VHDBUG/VHDBUG/Snapshots
Log folder:                  /home/amg1127/VirtualBox VMs/VHDBUG/VHDBUG/Logs
Hardware UUID:               9b41cbe5-8678-4f3a-89ac-49087fc08d87
Memory size                  128MB
Page Fusion:                 disabled
VRAM size:                   8MB
CPU exec cap:                100%
HPET:                        disabled
CPUProfile:                  host
Chipset:                     piix3
Firmware:                    BIOS
Number of CPUs:              1
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:               Floppy
Boot Device 2:               DVD
Boot Device 3:               HardDisk
Boot Device 4:               Not Assigned
ACPI:                        enabled
IOAPIC:                      enabled
BIOS APIC mode:              APIC
Time offset:                 0ms
RTC:                         local time
Hardw. virt.ext:             enabled
Nested Paging:               enabled
Large Pages:                 disabled
VT-x VPID:                   enabled
VT-x unr. exec.:             enabled
Paravirt. Provider:          Default
Effective Paravirt. Prov.:   None
State:                       powered off (since 2019-01-08T14:20:58.000000000)
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:            
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):      4
Storage Controller Bootable (0):        on
SATA (0, 0): /home/amg1127/VirtualBox VMs/VHDBUG/diffdiffdisk.vhd (UUID: e04b8226-f14d-469e-8e49-0cb140e1c13b)
NIC 1:                       MAC: 080027F5AC90, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: Am79C973, Reported speed: 0 Mbps, 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:             PS/2 Mouse
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: AC97, Codec: STAC9700)
Audio playback:              disabled
Audio capture:               disabled
Clipboard Mode:              disabled
Drag and drop Mode:          disabled
VRDE:                        disabled
OHCI USB:                    disabled
EHCI USB:                    disabled
xHCI USB:                    disabled

USB Device Filters:

<none>

Bandwidth groups:  <none>

Shared folders:<none>

Capturing:                   not active
Capture audio:               not active
Capture screens:             0
Capture file:                /home/amg1127/VirtualBox VMs/VHDBUG/VHDBUG/VHDBUG.webm
Capture dimensions:          1024x768
Capture rate:                512kbps
Capture FPS:                 25kbps
Capture options:             

Guest:

Configured memory balloon size: 0MB


+ test -z true
+ killall -0 -w VBoxSVC
+ VBoxManage unregistervm VHDBUG --delete
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
+ test -f '/home/amg1127/VirtualBox VMs/VHDBUG/diffdiffdisk.vhd'
+ true
+ test -f '/home/amg1127/VirtualBox VMs/VHDBUG/diffdisk.vhd'
+ true
+ test -f '/home/amg1127/VirtualBox VMs/VHDBUG/basedisk.vhd'
+ true
+ killall -0 -w VBoxSVC
+ echo 'Test ended successfully'
Test ended successfully

comment:4 by janitor, 5 years ago

Resolution: worksforme
Status: newclosed

Thanks for the update.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use