Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
vbox-scripts
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
Alberto LIVIO BECCARIA
vbox-scripts
Commits
fbb4e595
Commit
fbb4e595
authored
5 years ago
by
Alberto LIVIO BECCARIA
Browse files
Options
Downloads
Patches
Plain Diff
Aggiunto controllo sull'esistenza dell'immagine del disco anche in vm-start
parent
f431e573
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vm-start
+6
-0
6 additions, 0 deletions
vm-start
with
6 additions
and
0 deletions
vm-start
+
6
−
0
View file @
fbb4e595
...
...
@@ -139,6 +139,12 @@ vbox_attach_medium () {
local
disk_img
=
$1
local
port_num
=
$2
local
disk_type
=
$3
# check if disk image exists, otherwise abort
if
[[
!
-f
"
${
disk_img
}
"
]]
;
then
echo
echo
"
${
ERROR
}
Disk image
${
BOLD
}${
disk_img
}${
NORMAL
}${
ERROR
}
does not exist on this computer. Abort. Bye!
${
NORMAL
}
"
exit
0
fi
echo
"Attaching disk
${
port_num
}
..."
VBoxManage modifyhd
"
${
disk_img
}
"
--type
${
disk_type
}
vboxmanage storageattach
"
${
VM_NAME
}
"
--storagectl
"
${
STORAGE_CONTROLLER_NAME
}
"
--port
${
port_num
}
--device
0
--type
hdd
--medium
"
${
disk_img
}
"
...
...
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