Skip to content
Snippets Groups Projects
Commit 16ae8d57 authored by Rom Walton's avatar Rom Walton
Browse files

VBOX: Enable/Disable network after the network type has been specified.

parent 08372603
No related branches found
No related tags found
No related merge requests found
......@@ -254,20 +254,6 @@ int VBOX_VM::create_vm() {
// Tweak the VM's Network Configuration
//
if (enable_network) {
vboxlog_msg("Enabling VM Network Access.");
command = "modifyvm \"" + vm_name + "\" ";
command += "--cableconnected1 on ";
retval = vbm_popen(command, output, "enable network");
if (retval) return retval;
} else {
vboxlog_msg("Disabling VM Network Access.");
command = "modifyvm \"" + vm_name + "\" ";
command += "--cableconnected1 off ";
retval = vbm_popen(command, output, "disable network");
if (retval) return retval;
}
if (network_bridged_mode) {
vboxlog_msg("Setting Network Configuration for Bridged Mode.");
command = "modifyvm \"" + vm_name + "\" ";
......@@ -298,6 +284,20 @@ int VBOX_VM::create_vm() {
if (retval) return retval;
}
if (enable_network) {
vboxlog_msg("Enabling VM Network Access.");
command = "modifyvm \"" + vm_name + "\" ";
command += "--cableconnected1 on ";
retval = vbm_popen(command, output, "enable network");
if (retval) return retval;
} else {
vboxlog_msg("Disabling VM Network Access.");
command = "modifyvm \"" + vm_name + "\" ";
command += "--cableconnected1 off ";
retval = vbm_popen(command, output, "disable network");
if (retval) return retval;
}
// Tweak the VM's USB Configuration
//
vboxlog_msg("Disabling USB Support for VM.");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment