summaryrefslogtreecommitdiff
path: root/libvirt/cloudinit_def.go
diff options
context:
space:
mode:
Diffstat (limited to 'libvirt/cloudinit_def.go')
-rw-r--r--libvirt/cloudinit_def.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/libvirt/cloudinit_def.go b/libvirt/cloudinit_def.go
index 6e3c375b..1712e067 100644
--- a/libvirt/cloudinit_def.go
+++ b/libvirt/cloudinit_def.go
@@ -96,7 +96,7 @@ func (ci *defCloudInit) CreateAndUpload(virConn *libvirt.VirConnection) (string,
// create the volume
volume, err := pool.StorageVolCreateXML(string(volumeDefXml), 0)
if err != nil {
- return "", fmt.Errorf("Error creating libvirt volume: %s", err)
+ return "", fmt.Errorf("Error creating libvirt volume for cloudinit device %s: %s", ci.Name, err)
}
defer volume.Free()
@@ -158,12 +158,9 @@ func (ci *defCloudInit) createISO() (string, error) {
filepath.Join(tmpDir, METADATA))
log.Print("About to execute cmd: %+v", cmd)
- if err = cmd.Start(); err != nil {
+ if err = cmd.Run(); err != nil {
return "", fmt.Errorf("Error while starting the creation of CloudInit's ISO image: %s", err)
}
- if err = cmd.Wait(); err != nil {
- return "", fmt.Errorf("Error while creating CloudInit's ISO image: %s", err)
- }
log.Print("ISO created at %s", isoDestination)
return isoDestination, nil