mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-01 11:02:59 +00:00
parent
c6fb17f30a
commit
0742ac5091
@ -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 {
|
func (c *VirtualEnvironmentClient) MoveVMDisk(nodeName string, vmID int, d *VirtualEnvironmentVMMoveDiskRequestBody, timeout int) error {
|
||||||
taskID, err := c.MoveVMDiskAsync(nodeName, vmID, d)
|
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 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
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user