Skip to content

Commit

Permalink
Skip disks without source definition
Browse files Browse the repository at this point in the history
  • Loading branch information
jellonek committed Sep 17, 2018
1 parent 7bd8bf4 commit 3aa2ca2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/libvirttools/virtualization.go
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,9 @@ func (v *VirtualizationTool) VMStats(containerID string, name string) (*types.VM

rootDiskLocation := ""
for _, disk := range domainxml.Devices.Disks {
if disk.Source == nil || disk.Source.file == nil {
continue
}
fname := disk.Source.File.File
// TODO: split file name and use HasPrefix on last part
// instead of Contains
Expand Down

0 comments on commit 3aa2ca2

Please sign in to comment.