I'm trying to disconnect and reconnect the network adapter to my VM. (Sadly this is necessary to get the network stack running).
I found this solution for the CLI and the command VBoxManage controlvm "MyVM" setlinkstate1 off works fine for me, but now I want to do the same with python and got stuck.
Hello,
I'm trying to disconnect and reconnect the network adapter to my VM. (Sadly this is necessary to get the network stack running). I found this solution for the CLI and the command
VBoxManage controlvm "MyVM" setlinkstate1 off
works fine for me, but now I want to do the same with python and got stuck.I tried to toggle the adapter like this:
but get an error message that the machine is running and immutable. Any advice?
Thanks in advance!
EDIT: If anyone else is stumbling over this, it should be
network_adapter.cable_connected
instead!