I believe I was communicating my intentions poorly in my prior posts. I was telling you what I was doing rather than why. The reason I was doing multiattach is because either:
-VirtualBox does not in fact make DVD's readonly when using iscsi
-There is a bug that prevents readonly DVD's from working when using iscsi
In the following code I am creating and mounting a dvd from a readonly iscsi target (note I have ommmited the readonly mtype flag as above, and left vbox to its own thing)
Code: Select all
VBoxManage storageattach "NewPasswordWindowsReadOnly2" --storagectl "MyController" --port 1 --device 0 --type dvddrive --medium iscsi --server localhost --target "iqn.2001-04.com.TehDualLinux-2260f94a-90f3-4147-9e32-39c773f7095b" --lun 1 --tport 3260
Let's check to make sure it was added correctly:
Code: Select all
vboxmanage list hdds
...
UUID: 2d4790e0-678b-4fc0-b529-32aebfec6f97
Parent UUID: base
Format: iSCSI
Location: localhost|iqn.2001-04.com.TehDualLinux-2260f94a-90f3-4147-9e32-39c773f7095b|1
State: created
Type: normal
Usage: NewPasswordWindowsReadOnly2 (UUID: e86ffe75-2412-4aa6-9b36-3a0c0f3e4780)
...
Notice the "type" is normal, instead of readonly? We'll ignore it for the time being, and try to boot the machine up anyways.
Code: Select all
Failed to open a session for the virtual machine NewPasswordWindowsReadOnly2.
VD: error VERR_VD_IMAGE_READ_ONLY opening image file 'localhost|iqn.2001-04.com.TehDualLinux-2260f94a-90f3-4147-9e32-39c773f7095b|1' (VERR_VD_IMAGE_READ_ONLY).
Failed to open image 'localhost|iqn.2001-04.com.TehDualLinux-2260f94a-90f3-4147-9e32-39c773f7095b|1' in read-write mode rc=VERR_VD_IMAGE_READ_ONLY (VERR_VD_IMAGE_READ_ONLY).
Failed to attach driver below us! Image is read-only. (VERR_VD_IMAGE_READ_ONLY).
AHCI: Failed to attach drive to Port1 (VERR_VD_IMAGE_READ_ONLY).
-If you remove the readonly flag on the iscsi target everything works perfectly
- If you take a snapshot (thus a differencing medium is created), everything works perfectly
- If you add the DVD as multiattach instead of "normal", it creates a differencing medium, and everything works perfectly.
-You cannot specify to make it readonly with mtype, and supplying nothing defaults it to "normal", which doesn't work.
-According to
http://www.virtualbox.org/manual/ch05.h ... magewrites you are correct in that dvd drives should be mounted readonly, but this is obviously not working in practice, at least with iscsi.
This is sounding more a more like a bug, the more we discuss the issue. What are your thoughts? If you need assistance trying to reproduce it I can help, but it's extremely easy. Make a readonly iscsi target and try to use an ISO as a Medium in a dvddrive like I have above.