justvanbloom / phpvirtualbox

Automatically exported from code.google.com/p/phpvirtualbox
0 stars 0 forks source link

VDIs that are already attached shouldn´t be attached a second time #239

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
- Create VM "test" using the default options (just click next, next,...)
- Open settings of VM1 and go to storage -> test.vdi is shown there
- SATA Controller: Click on "Add Hard Disk" icon -> test.vdi is added a second 
time

What version of phpVirtualBox, VirtualBox, and PHP are you using? On what
operating system?
phpVirtualBox 4.0-5
VirtualBox 4.0.4
PHP 5.3.3
Debian Squeeze

Please provide any additional information below.
It´s basically ok regarding that when trying to save you get an error message: 
"VirtualBox error: Medium '/home/vbox/VirtualBox VMs/test/test.vdi' is already 
attached to this virtual machine (0x80BB000C)".

Still, I think it would be good that a VDI that is already connected to a VM 
would not be added "automatically" in that way.
Additionally, could it be implemented that the error message is shown before 
the settings dialog gets closed?

Original issue reported on code.google.com by larsen...@web.de on 28 Mar 2011 at 2:46

GoogleCodeExporter commented 9 years ago

Original comment by imooreya...@gmail.com on 28 Mar 2011 at 10:28

GoogleCodeExporter commented 9 years ago
For the record, I think it works fine as it is.  I use single VDIs on multiple 
VMs occasionally so I need to attach them to more than one.  Obviously I can 
start both VMs at the same time, but I use it in testing when I need to 
transfer files between incompatible OSes with not network.  Like DOS6.22 (yeah, 
I know, don't ask) and Windows XP.  I just mount the DOS VDI in WinXP and copy 
it accross.

I don't think there needs to be a restriction on to prevent this.

Original comment by jazz13 on 14 May 2011 at 4:58

GoogleCodeExporter commented 9 years ago
Me too. The "fix" will still allow you to manually select a VDI that is already 
attached.

When you add a hard disk attachment, phpVirtualBox automatically selects a disk 
to be attached. This will just exclude an already attached disk from the pool 
of available HDs. After adding a hard disk attachment, you can still use the 
menu as usual to manually select a hard disk image of your choosing.

Original comment by imooreya...@gmail.com on 16 May 2011 at 3:03