File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -60,11 +60,15 @@ func newDefBackingStoreFromLibvirt(baseVolume *libvirt.StorageVol) (libvirtxml.S
60
60
if err != nil {
61
61
return libvirtxml.StorageVolumeBackingStore {}, fmt .Errorf ("could not get base image path: %s" , err )
62
62
}
63
- backingStoreDef := libvirtxml.StorageVolumeBackingStore {
64
- Path : baseVolPath ,
65
- Format : & libvirtxml.StorageVolumeTargetFormat {
63
+ var backingStoreVolFormat * libvirtxml.StorageVolumeTargetFormat
64
+ if baseVolumeDef . Target . Format != nil {
65
+ backingStoreVolFormat = & libvirtxml.StorageVolumeTargetFormat {
66
66
Type : baseVolumeDef .Target .Format .Type ,
67
- },
67
+ }
68
+ }
69
+ backingStoreDef := libvirtxml.StorageVolumeBackingStore {
70
+ Path : baseVolPath ,
71
+ Format : backingStoreVolFormat ,
68
72
}
69
73
return backingStoreDef , nil
70
74
}
You can’t perform that action at this time.
0 commit comments