修复虚拟机因无法创建磁盘导致崩溃的问题

This commit is contained in:
gfdgd xi 2024-11-02 21:45:08 +08:00
parent ab60ec15b0
commit 910404b54d

View File

@ -35,7 +35,7 @@ class qemu:
def CreateDisk(self, path: str, size: int):
if(os.path.exists(path)):
return 0
return os.system(("qemu-img create -f qcow2 '" + self.path + "' " + str(size) + "M"))
return os.system(("qemu-img create -f qcow2 '" + path + "' " + str(size) + "M"))
def CreateDiskControl(self, controlName = "storage_controller_1"):
return 0