Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simple-vm-manager
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Recolic
simple-vm-manager
Commits
26ea4928
There was an error fetching the commit references. Please try again later.
Commit
26ea4928
authored
11 months ago
by
Recolic
Browse files
Options
Downloads
Patches
Plain Diff
Revert ".use name instead of uuid"
This reverts commit
a9c10815
.
parent
a9c10815
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cron-callback.sh
+2
-3
2 additions, 3 deletions
cron-callback.sh
with
2 additions
and
3 deletions
cron-callback.sh
+
2
−
3
View file @
26ea4928
...
...
@@ -2,7 +2,6 @@
# You may change this directory
workdir
=
./data
ver
=
1.0.62
_self_bin_name
=
"
$0
"
function
where_is_him
()
{
...
...
@@ -107,13 +106,13 @@ function start_vm_if_not_running () {
local
uuid
=
`
uuidgen
--namespace
@oid
--name
"qemu.
$name
"
--sha1
`
# Check if qemu already running for this instance.
ps aux |
grep
-F
"
name
$uuid
"
|
grep
qemu
>
/dev/null 2>&1
&&
return
0
ps aux |
grep
-F
"
uuid
$uuid
"
|
grep
qemu
>
/dev/null 2>&1
&&
return
0
# start it
[[
!
-f
"vm/
$name
/disk.img"
]]
&&
echo2
"In start_vm, disk image vm/
$name
/disk.img doesn't exist. Did init_vm fail?"
&&
return
1
echo2
"+ Starting VM
$name
with options_txt '
$options_txt
' and uuid
$uuid
..."
[[
-f
"vm/
$name
/initimg.iso"
]]
&&
options+
=(
-cdrom
"vm/
$name
/initimg.iso"
)
nohup
qemu-system-x86_64
--
name
"
$uuid
"
-drive
file
=
"vm/
$name
/disk.img"
,if
=
virtio
-cpu
host
--enable-kvm
-net
nic,model
=
virtio-net-pci
"
${
options
[@]
}
"
>>
tmp/qemu.log 2>&1 &
disown
nohup
qemu-system-x86_64
--
uuid
"
$uuid
"
-drive
file
=
"vm/
$name
/disk.img"
,if
=
virtio
-cpu
host
--enable-kvm
-net
nic,model
=
virtio-net-pci
"
${
options
[@]
}
"
>>
tmp/qemu.log 2>&1 &
disown
}
function
do_init
()
{
...
...
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