0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-06-30 10:33:46 +00:00

Fix SIGSEGV if cloned VM is in a different storage.

closes #1
This commit is contained in:
Pavel Boldyrev 2021-09-08 18:27:36 -04:00
parent c6fb17f30a
commit 0742ac5091
No known key found for this signature in database
GPG Key ID: 9A3B05A2B8921AD9

View File

@ -161,12 +161,12 @@ func (c *VirtualEnvironmentClient) GetVMStatus(nodeName string, vmID int) (*Virt
func (c *VirtualEnvironmentClient) MoveVMDisk(nodeName string, vmID int, d *VirtualEnvironmentVMMoveDiskRequestBody, timeout int) error {
taskID, err := c.MoveVMDiskAsync(nodeName, vmID, d)
if strings.Contains(err.Error(), "you can't move to the same storage with same format") {
// if someone tries to move to the same storage, the move is considered to be successful
return nil
}
if err != nil {
if strings.Contains(err.Error(), "you can't move to the same storage with same format") {
// if someone tries to move to the same storage, the move is considered to be successful
return nil
}
return err
}