VirtualBox

Opened 9 years ago

Closed 8 years ago

#13850 closed defect (fixed)

Shareable hdds cannot be attached to a second machine if already attached to a booted machine => fixed in SVN/next maintenance

Reported by: irvingpop Owned by:
Component: virtual disk Version: VirtualBox 4.3.22
Keywords: shareable Cc:
Guest type: all Host type: all

Description

The problem: Shareable disks become locked as soon as the first VM boots, you cannot attach it to any other VMs at this point with shutting down the first VM.

The scenario:

  1. Create a shareable disk (modifyhd disk.vdi --type shareable)
  2. Attach to a machine (storageattach backend0 --storagectl "SCSI" ... --medium disk.vdi --mtype shareable)
  3. Boot the first machine (backend0)
  4. Attach to a second machine (same command as #2, but to backend1)

error:

Command: ["storageattach", "d596438a-f7cc-4833-bb36-0cbc423b72c0", "--storagectl", "SCSI", "--port", "0", "--device", "0", "--nonrotational", "on", "--type", "hdd", "--medium", "/oc/src/rhcs7/cluster_shared.vdi", "--mtype", "shareable"]

Stderr: VBoxManage: error: Medium '/oc/src/rhcs7/cluster_shared.vdi' is locked for reading by another task
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Medium, interface IMedium, callee nsISupports
VBoxManage: error: Context: "COMSETTER(Type)(mediumType)" at line 678 of file VBoxManageStorageController.cpp
VBoxManage: error: Failed to set the medium type

disk info shows that it is locked:

VBoxManage showhdinfo cluster_shared.vdi 
UUID:           e9a21ac7-dbfa-4e9b-85e9-42bd7c93593f
Parent UUID:    base
State:          locked read
Type:           shareable
Location:       /oc/src/rhcs7/cluster_shared.vdi
Storage format: VDI
Format variant: fixed default
Capacity:       4096 MBytes
Size on disk:   4098 MBytes
In use by VMs:  backend0.opscode.piab (UUID: 1f05d55f-7d7c-4092-9018-98e0f0613662)

Change History (2)

comment:1 by aeichner, 8 years ago

Summary: Shareable hdds cannot be attached to a second machine if already attached to a booted machineShareable hdds cannot be attached to a second machine if already attached to a booted machine => fixed in SVN/next maintenance

Will be fixed in the next maintenance release. You can also just omit the --mtype argument because the medium is already set to shareable.

comment:2 by Frank Mehnert, 8 years ago

Resolution: fixed
Status: newclosed

Fix is part of 5.1.4.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use