Trying to disable network adapter
Posted: 2. Jun 2015, 01:06
Hello,
I'm in the process of disabling the network adapters on all of our virtual machines and I would like to create a script that does this for me. We are a Mac environment with Windows and Linux VMs. So far I have:
for i in `VboxManage list vms`
do
VboxManage modifyvm $i --nic1 none
done
It works in that it turns off the network adapters on all VMs, however the output in Terminal yields a bunch of errors:
VBoxManage: error: Could not find a registered machine named '"Ubuntu'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "FindMachine(Bstr(a->argv[0]).raw(), machine.asOutParam())" at line 464 of file VBoxManageModifyVM.cpp
VBoxManage: error: Could not find a registered machine named '10.10"'
I was wondering if there were a better, less error-filled way of doing this.
Thanks!
I'm in the process of disabling the network adapters on all of our virtual machines and I would like to create a script that does this for me. We are a Mac environment with Windows and Linux VMs. So far I have:
for i in `VboxManage list vms`
do
VboxManage modifyvm $i --nic1 none
done
It works in that it turns off the network adapters on all VMs, however the output in Terminal yields a bunch of errors:
VBoxManage: error: Could not find a registered machine named '"Ubuntu'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "FindMachine(Bstr(a->argv[0]).raw(), machine.asOutParam())" at line 464 of file VBoxManageModifyVM.cpp
VBoxManage: error: Could not find a registered machine named '10.10"'
I was wondering if there were a better, less error-filled way of doing this.
Thanks!