VirtualBox

Opened 13 years ago

Last modified 13 years ago

#8105 closed defect

Machine configuration is not updated correctly when attaching immutable disks — at Version 2

Reported by: cendaaro Owned by:
Component: other Version: VirtualBox 4.0.0
Keywords: Cc:
Guest type: Windows Host type: Linux

Description (last modified by Frank Mehnert)

The following steps can be used to reproduce the bug:

1) Create a machine, or using an existing .vbox configuration file. Register said machine:

VBoxManage registervm "/home/aaron/VirtualBox VMs/win7_ent_x86/win7_ent_x86.vbox"

2) Attach an immutable disk thusly:

VBoxManage storageattach win7_ent_x86 --storagectl "SATA Controller"
    --port 0 --device 0 --type hdd
    --medium /opt/vboxdata/win7_ent_x86/win7_ent_x86.vdi --mtype immutable

If the machine is then started up within a few seconds, everything works fine - I am assuming that this is due to VirtualBox retrieving the machine's configuration from memory. However this configuration obviously isn't written to the machine's .vbox configuration file, because attempting to start it results in an error (see screenshot1.png). Opening the VirtualBox GUI gives a different error message (see screenshot2.png). I can't attach a log file as there isn't once since the machine didn't start up, but it should be pretty obvious from the attached file (win7_ent_x86.vbox.broken) that the configuration is wrong.

The workaround I have been using is to perform the following steps:

  1. Attach the storage with 'VBoxManage storageattach' as '--mtype normal'. This registers the HDD in the machine's configuration file, in the absence of a global register as of VB 4.0.0.
  2. Detach the storage again (--medium none), to make VBoxManage happy during the next step
  3. Set the HDD type to immutable using the 'VBoxManage modifyhd' command
  4. Re-attach the HDD with 'VBoxManage storageattach' as '--mtype immutable'

These steps result in a .vbox file which looks like win7_ent_x86.vbox.working (attached), which is presumably how the file should look after performing the steps used to reproduce this bug.

Change History (6)

by cendaaro, 13 years ago

Attachment: screenshot1.png added

by cendaaro, 13 years ago

Attachment: screenshot2.png added

by cendaaro, 13 years ago

Attachment: win7_ent_x86.vbox.broken added

by cendaaro, 13 years ago

Attachment: win7_ent_x86.vbox.working added

comment:1 by Frank Mehnert, 13 years ago

Description: modified (diff)

comment:2 by Frank Mehnert, 13 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use