You are not logged in.

#1 2022-11-19 23:21:53

hwallace
Member
Registered: 2021-08-30
Posts: 106

vboxmanage vs GUI manager for modifying attributes of running VMs

VirtualBox Graphical User Interface Version 7.0.2 r154219
© 2004-2022 Oracle and/or its affiliates (Qt5.15.7)
Copyright © 2022 Oracle and/or its affiliates.

Host

Linux 6.0.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 10 Nov 2022 21:14:24 +0000 x86_64 
GNU/Linux
virtualbox 7.0.2-2
virtualbox-ext-oracle 7.0.2-1
virtualbox-guest-iso 7.0.2-1
virtualbox-guest-utils 7.0.2-2
virtualbox-host-modules-arch 7.0.2-7
virtualbox-sdk 7.0.2-2

and Guest:

Linux 6.0.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 10 Nov 2022 21:14:24 +0000 x86_64 GNU/Linux
virtualbox-guest-iso 7.0.2-1`

I have a bridged adapter and a hostonly adapter. The bridged adapter goes down after a few hours and I have to reset it using the GUI. I can do this while the VM is running

  • Change the adapter type

  • Disconnect the cable

  • Set the adapter back

  • Reconnect the cable.

This restores the connection. Please note that I can do this while the VM is running and that it resets the connection.

SO I have a script using vboxmanage, but I get a locking error

 vboxmanage modifyvm flip --nic1 --cable-connected1 off
--
 "VBoxManage: error: The machine 'flip' is already locked for a session (or being unlocked)", 'VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports', 'VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 637 of file VBoxManageModifyVM.cpp']
 
 

Offline

Board footer

Powered by FluxBB