[VirtualBox 6.1.16] : immutable machine ... kezako ?

Discussion about using the VirtualBox API, Tutorials, Samples.

[VirtualBox 6.1.16] : immutable machine ... kezako ?

Postby didier.garcin » 31. Oct 2020, 15:47

Hi everybody,

Code: Select all   Expand viewCollapse view
                try
                {
                    machine.SetExtraData("VBoxInternal/DBGC/Enabled", "1" );
                    UpdateCurrentVM();
                }
                catch (System.Exception ex)
                {
                    MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }


Code: Select all   Expand viewCollapse view
machine.SetExtraData("VBoxInternal/DBGC/Enabled", "1" )
call raises an exception with ex.Message = "Cannot set extradata for an immutable machine"

I know VM storage medias may be immutable but mines are not. They are set to Normal.
But immutable machine, what's this ?
What I'm supposed to do ?

Thanks a lot by advance for your light.

Cheers

Didier.
Last edited by didier.garcin on 31. Oct 2020, 18:06, edited 1 time in total.
didier.garcin
 
Posts: 2
Joined: 31. Oct 2020, 15:34
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: FreeBSD

Re: [VirtualBox 6.16] : immutable machine ... kezako ?

Postby Martin » 31. Oct 2020, 16:31

Was the VM running or in a saved state a this time?
Martin
Volunteer
 
Posts: 2531
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Linux, OS/2

Re: [VirtualBox 6.16] : immutable machine ... kezako ?

Postby didier.garcin » 31. Oct 2020, 17:00

It's totally off.
didier.garcin
 
Posts: 2
Joined: 31. Oct 2020, 15:34
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: FreeBSD

Re: [VirtualBox 6.1.16] : immutable machine ... kezako ?

Postby noteirak » 27. Jan 2022, 12:29

You need to get a session on the machine with the corresponding LockType (write in this case) and use the IMachine object on the iSession object.
IMachine objects returned by IVirtualBox itself are immutable. "Immutable" refers to the IMachine object itself, not the VM in VirtualBox.
Hyperbox - Virtual Infrastructure Manager - https://kamax.io/hbox/
Manage your VirtualBox infrastructure the free way!
noteirak
Site Moderator
 
Posts: 5204
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7


Return to The VirtualBox API

Who is online

Users browsing this forum: No registered users and 2 guests