Commit 7280c2ee authored by Guido Günther's avatar Guido Günther

Drop library/ from image path

If one pastes from the output of virt-sansbox-image

  $ virt-sandbox-image list


  $ virt-sandbox-image run -c qemu:///session docker:/library/debian?tag=latest

This fails like

  /home/<usr>/.local/share/libvirt/images/library/debian:qbeilwxard.qcow2: Could not create file: No such file or directory

so strip off any leading components.
Signed-off-by: Guido Günther's avatarGuido Günther <>
Reviewed-by: 's avatarDaniel P. Berrange <>
parent 33843cc1
......@@ -655,7 +655,7 @@ class DockerSource(base.Source):
def get_disk(self, template, templatedir, imagedir, sandboxname):
image = DockerImage.from_template(template)
configfile, diskfile = self._get_template_data(image, templatedir)
tempfile = imagedir + "/" + sandboxname + ".qcow2"
tempfile = imagedir + "/" + sandboxname.split('/')[-1] + ".qcow2"
if not os.path.exists(imagedir):
cmd = ["qemu-img","create","-q","-f","qcow2"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment