Commit 930a5cbd authored by Thibault VINCENT's avatar Thibault VINCENT
Browse files

fix: proper path correction for 44b2cb30

parent 01d5cd44
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
import libvirt
import psutil
import xml.dom.minidom
import os
from logging import error, warning, info, debug
from time import sleep
from common import Hypervisor, VM, Storage, StoragePool, StorageVolume
@@ -764,8 +765,8 @@ class LibvirtVm(VM):
                            # beginning of block devices, and relative paths
                            # are non-sense
                            # Example: vg/myvm instead of /dev/vg/myvm
                            if d_path[0] != '/':
                                d_path = '/dev/' + d_path
                            if not d_path.startswith('/'):
                                d_path = os.path.join('/dev', d_path)
                        # search the volume object
                        if d_type in ['file', 'block']:
                            volumes.append(self._hv_handle._sto_handle