Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HongzheWang
slapos
Commits
1f1c2c0a
Commit
1f1c2c0a
authored
Oct 08, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KVM SR: export: use new slapos.toolbox qemu qmp wrapper.
parent
45830d38
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletion
+7
-1
slapos/recipe/kvm/template/kvm_controller_run.in
slapos/recipe/kvm/template/kvm_controller_run.in
+2
-0
software/kvm/common.cfg
software/kvm/common.cfg
+1
-1
software/kvm/template/kvm-export.sh.in
software/kvm/template/kvm-export.sh.in
+4
-0
No files found.
slapos/recipe/kvm/template/kvm_controller_run.in
View file @
1f1c2c0a
...
@@ -6,6 +6,8 @@
...
@@ -6,6 +6,8 @@
import socket
import socket
import time
import time
# XXX: to be factored with slapos.toolbox qemu qmp wrapper.
socket_path = '%(socket-path)s'
socket_path = '%(socket-path)s'
vnc_password = '%(vnc-passwd)s'
vnc_password = '%(vnc-passwd)s'
...
...
software/kvm/common.cfg
View file @
1f1c2c0a
...
@@ -133,7 +133,7 @@ mode = 0644
...
@@ -133,7 +133,7 @@ mode = 0644
recipe = hexagonit.recipe.download
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/kvm-export.sh.in
url = ${:_profile_base_location_}/template/kvm-export.sh.in
filename = kvm-export.sh.in
filename = kvm-export.sh.in
md5sum =
3e878b3343c76f0d6950986fffcb6a8c
md5sum =
bf03a90f6960b37cba812ee936a13342
download-only = true
download-only = true
mode = 0755
mode = 0755
...
...
software/kvm/template/kvm-export.sh.in
View file @
1f1c2c0a
...
@@ -4,13 +4,17 @@ QEMU_IMG=${kvm-instance:qemu-img-path}
...
@@ -4,13 +4,17 @@ QEMU_IMG=${kvm-instance:qemu-img-path}
SNAPSHOT_NAME
=
$(
date
+%s
)
SNAPSHOT_NAME
=
$(
date
+%s
)
DISK_PATH
=
${
kvm
-instance
:disk-path
}
DISK_PATH
=
${
kvm
-instance
:disk-path
}
BACKUP_PATH
=
${
:backup-disk-path
}
BACKUP_PATH
=
${
:backup-disk-path
}
QMP_CLIENT
=
${
buildout
:directory
}
/software_release/bin/qemu-qmp-client
if
[
!
-f
$DISK_PATH
]
;
then
if
[
!
-f
$DISK_PATH
]
;
then
echo
"Nothing to backup, disk image doesn't exist yet."
echo
"Nothing to backup, disk image doesn't exist yet."
exit
0
;
exit
0
;
fi
fi
$QMP_CLIENT
${
kvm
-instance
:socket-path
}
suspend
&&
\
$QEMU_IMG
snapshot
-c
$SNAPSHOT_NAME
$DISK_PATH
$QEMU_IMG
snapshot
-c
$SNAPSHOT_NAME
$DISK_PATH
$QMP_CLIENT
${
kvm
-instance
:socket-path
}
resume
if
[
-f
$BACKUP_PATH
]
;
then
if
[
-f
$BACKUP_PATH
]
;
then
rm
$BACKUP_PATH
rm
$BACKUP_PATH
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment