Making a virtual hard drive immutable

Discussions related to using VirtualBox on Windows hosts.

Making a virtual hard drive immutable

Postby 20110101 » 21. Jan 2011, 06:22

I obviously don't understand something very basic here.

After many hours of configuration, I finally have the guest os image exactly the way I want it.

So I want to make it immutable.

I did:

Code: Select all   Expand viewCollapse view
VBoxManage modifyhd /FULL/path/to/disk/image.vdi settype immutable


Now I get a message:

Code: Select all   Expand viewCollapse view
The selected virtual machine in inaccessible. Please inspect the error message shown below and press the [bold]Refresh[/bold] button if you want to repeat the accessibility check:

Immutable hard disk '/FULL/path/to/disk/image.vdi' with UUID {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} cannot be directly attached to the virtual machine 'virtual' ('/home/user/.VirtualBox/Machines/virtual/virtual.xml').
Result Code:
NS_ERROR_FAILURE (0x80004005)
Component:
Machine
Interface:
IMachine {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}


Please enlighten me as to how to create and use an immutable disk image.
20110101
 
Posts: 5
Joined: 20. Jan 2011, 20:23
Primary OS: Linux other
VBox Version: PUEL
Guest OSses: dos

Re: Making a virtual hard drive immutable

Postby mpack » 21. Jan 2011, 11:41

Which VirtualBox version number?
mpack
Site Moderator
 
Posts: 33914
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Making a virtual hard drive immutable

Postby 20110101 » 21. Jan 2011, 13:05

mpack wrote:Which VirtualBox version number?


I originally created the virtual machine (and ran into the problem) on 3.2.12. I have since upgraded to 4.0.0 (hoping, but not really expecting, that it would help).

Somebody moved this to post "VirtualBox on Windows Hosts." As seems obvious (at least to me) from the machine path, this issue involves virtualbox running on a linux host.
20110101
 
Posts: 5
Joined: 20. Jan 2011, 20:23
Primary OS: Linux other
VBox Version: PUEL
Guest OSses: dos

Re: Making a virtual hard drive immutable

Postby raistlin majere » 21. Jan 2011, 15:15

Have you tried using the uuid instead of the full path to the vdi file?
I used:

Code: Select all   Expand viewCollapse view
VBoxManage modifyhd <uuid> --type immutable


Works fine for me :)

Just make sure that the uuid in use is the one of the hard disk, not the machine uuid. You can use:

Code: Select all   Expand viewCollapse view
VBoxManage showvminfo <VM name>


and under "IDE Controller" you have the uuid for the hard disk in use. Also, in version 4, in your home dir you have a dir "VirtualBox VMs". Check the *.vbox file to see the configuration of your VM and to see the uuid for the hard disk.

Hope this hepls!

PS If I'm wrong, someone please tell me :))
raistlin majere
 
Posts: 4
Joined: 20. Jan 2011, 12:50
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: WinXP

Re: Making a virtual hard drive immutable

Postby 20110101 » 21. Jan 2011, 18:36

raistlin majere wrote:Have you tried using the uuid instead of the full path to the vdi file?
I used:

Code: Select all   Expand viewCollapse view
VBoxManage modifyhd <uuid> --type immutable


Works fine for me :)


Now I feel more lost than ever.

When I ran VBoxManage, it appeared to work correctly (making the disk image immutable).

The problem is that I can't seem to attach the disk image back to the virtual machine (why?).

raistlin majere wrote:
Code: Select all   Expand viewCollapse view
VBoxManage showvminfo <VM name>


Certainly a useful command to know, but it doesn't do anything to help with this problem.

raistlin majere wrote:and under "IDE Controller" you have the uuid for the hard disk in use.


It's under the sata controller, which was the default when I set up the machine.

raistlin majere wrote:Also, in version 4, in your home dir you have a dir "VirtualBox VMs". Check the *.vbox file to see the configuration of your VM and to see the uuid for the hard disk.


Sorry, I don't see anything like that. Would that exist for machines originally created with virtualbox 3?

raistlin majere wrote:Hope this hepls!


Sorry, it didn't. :(
20110101
 
Posts: 5
Joined: 20. Jan 2011, 20:23
Primary OS: Linux other
VBox Version: PUEL
Guest OSses: dos


Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: Google [Bot] and 14 guests