Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
boinc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
einsteinathome
boinc
Commits
16ae8d57
You need to sign in or sign up before continuing.
Commit
16ae8d57
authored
10 years ago
by
Rom Walton
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
samples/vboxwrapper/vbox_vboxmanage.cpp
+14
-14
14 additions, 14 deletions
samples/vboxwrapper/vbox_vboxmanage.cpp
with
14 additions
and
14 deletions
samples/vboxwrapper/vbox_vboxmanage.cpp
+
14
−
14
View file @
16ae8d57
...
...
@@ -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."
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment