summaryrefslogtreecommitdiffstats
path: root/src/virtBootstrap
diff options
context:
space:
mode:
authorRadostin Stoyanov <rstoyanov1@gmail.com>2017-08-26 21:41:53 +0100
committerRadostin Stoyanov <rstoyanov1@gmail.com>2017-08-28 15:58:03 +0100
commit242d7e8381850fa03bbff9969e20e946af38f850 (patch)
treed4239936f0b0709163e4ee1d57d08dce8f893fcf /src/virtBootstrap
parent186bf4860e963d58a1779b1898985d4d13211286 (diff)
downloadvirt-bootstrap.git-242d7e8381850fa03bbff9969e20e946af38f850.tar.gz
virt-bootstrap.git-242d7e8381850fa03bbff9969e20e946af38f850.tar.xz
virt-bootstrap.git-242d7e8381850fa03bbff9969e20e946af38f850.zip
untar: Use unique name with virt-sandbox
Specify unique name when creating Libvirt domain with virt-sandbox. Otherwise the default name "sandbox" will be used and this might result in collision with another instance of virt-bootstrap.
Diffstat (limited to 'src/virtBootstrap')
-rw-r--r--src/virtBootstrap/utils.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/virtBootstrap/utils.py b/src/virtBootstrap/utils.py
index 66cd301..923309a 100644
--- a/src/virtBootstrap/utils.py
+++ b/src/virtBootstrap/utils.py
@@ -102,6 +102,7 @@ def safe_untar(src, dest):
"""
virt_sandbox = ['virt-sandbox',
'-c', LIBVIRT_CONN,
+ '--name=bootstrap_%s' % os.getpid(),
'-m', 'host-bind:/mnt=' + dest] # Bind destination folder
# Compression type is auto detected from tar