File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -540,9 +540,10 @@ func (d *disk) validateConfig(instConf instance.ConfigReader) error {
540
540
}
541
541
}
542
542
543
+ // Parse the volume name and path.
544
+ volFields := strings .SplitN (d .config ["source" ], "/" , 2 )
545
+
543
546
if dbVolume == nil {
544
- // Parse the volume name and path.
545
- volFields := strings .SplitN (d .config ["source" ], "/" , 2 )
546
547
volName := volFields [0 ]
547
548
548
549
// GetStoragePoolVolume returns a volume with an empty Location field for remote drivers.
@@ -579,6 +580,11 @@ func (d *disk) validateConfig(instConf instance.ConfigReader) error {
579
580
if d .config ["path" ] != "" {
580
581
return fmt .Errorf ("Custom block volumes cannot have a path defined" )
581
582
}
583
+
584
+ if len (volFields ) > 1 {
585
+ return fmt .Errorf ("Custom block volume snapshots cannot be used directly" )
586
+ }
587
+
582
588
} else if contentType == db .StoragePoolVolumeContentTypeISO {
583
589
if instConf .Type () == instancetype .Container {
584
590
return fmt .Errorf ("Custom ISO volumes cannot be used on containers" )
You can’t perform that action at this time.
0 commit comments