From ce680bb15db2121cbe1d877c97a99852c74497c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=88=E8=BD=A9?= Date: Mon, 9 Dec 2024 15:05:23 +0800 Subject: [PATCH] fix(region): uis vm disk create (#21772) --- pkg/compute/guestdrivers/uis.go | 2 +- pkg/compute/tasks/guest_create_disk_task.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/compute/guestdrivers/uis.go b/pkg/compute/guestdrivers/uis.go index dd5eb182d4..4ebdf2db6c 100644 --- a/pkg/compute/guestdrivers/uis.go +++ b/pkg/compute/guestdrivers/uis.go @@ -141,7 +141,7 @@ func (self *SUisGuestDriver) ValidateCreateData(ctx context.Context, userCred mc } func (self *SUisGuestDriver) GetGuestInitialStateAfterCreate() string { - return api.VM_RUNNING + return api.VM_READY } func (self *SUisGuestDriver) GetGuestInitialStateAfterRebuild() string { diff --git a/pkg/compute/tasks/guest_create_disk_task.go b/pkg/compute/tasks/guest_create_disk_task.go index 07b38b2121..9b0bddca0a 100644 --- a/pkg/compute/tasks/guest_create_disk_task.go +++ b/pkg/compute/tasks/guest_create_disk_task.go @@ -452,6 +452,10 @@ type SangForGuestCreateDiskTask struct { NutanixGuestCreateDiskTask } +type UisGuestCreateDiskTask struct { + NutanixGuestCreateDiskTask +} + func init() { taskman.RegisterTask(GuestCreateBackupDisksTask{}) taskman.RegisterTask(GuestCreateDiskTask{}) @@ -462,4 +466,5 @@ func init() { taskman.RegisterTask(NutanixGuestCreateDiskTask{}) taskman.RegisterTask(CloudpodsGuestCreateDiskTask{}) taskman.RegisterTask(SangForGuestCreateDiskTask{}) + taskman.RegisterTask(UisGuestCreateDiskTask{}) }