فهرست منبع

Merge pull request #96 from gabriel-samfira/fix-host-storage-rescan

Fix storage rescan
Nashwan Azhari 6 سال پیش
والد
کامیت
3e34bae6d1
1فایلهای تغییر یافته به همراه1 افزوده شده و 2 حذف شده
  1. 1 2
      coriolis/osmorphing/osmount/windows.py

+ 1 - 2
coriolis/osmorphing/osmount/windows.py

@@ -54,8 +54,7 @@ class WindowsMountTools(base.BaseOSMountTools):
             pass
             pass
 
 
     def _refresh_storage(self):
     def _refresh_storage(self):
-        self._conn.exec_ps_command(
-            "Update-HostStorageCache", ignore_stdout=True)
+        self._run_diskpart_script("RESCAN")
 
 
     def _run_diskpart_script(self, script):
     def _run_diskpart_script(self, script):
         """Executes the given script with diskpart.exe.
         """Executes the given script with diskpart.exe.