diff --git a/docs/USER_GUIDE.md b/docs/USER_GUIDE.md index be43998e84..b6772167a4 100644 --- a/docs/USER_GUIDE.md +++ b/docs/USER_GUIDE.md @@ -3081,11 +3081,6 @@ d8 k get vmsop -o json | jq '.status.resources' VM cloning is performed using the VirtualMachineOperation resource with the `Clone` operation type. -{{< alert level="warning">}} -Before cloning, the source VM must be [powered off](#vm-start-and-state-management-policy). -It is recommended to set the `.spec.runPolicy: AlwaysOff` parameter in the configuration of the VM being cloned if you want to prevent the VM clone from starting automatically. This is because the clone inherits the behaviour of the parent VM. -{{< /alert >}} - Before cloning, you need to prepare the guest OS to avoid conflicts with unique identifiers and network settings. Linux: diff --git a/docs/USER_GUIDE.ru.md b/docs/USER_GUIDE.ru.md index f797e8269d..bab775d4fa 100644 --- a/docs/USER_GUIDE.ru.md +++ b/docs/USER_GUIDE.ru.md @@ -3114,12 +3114,6 @@ d8 k get vmsop -o json | jq '.status.resources' Клонирование ВМ выполняется с использованием ресурса VirtualMachineOperation с типом операции `Clone`. -{{< alert level="warning">}} -Перед клонированием ВМ должна быть [выключена](#политика-запуска-и-управление-состоянием-вм). - -Рекомендуется задавать параметр `.spec.runPolicy: AlwaysOff` в конфигурации клонируемой ВМ, чтобы предотвратить автоматический запуск клона ВМ. Это связано с тем, что клон наследует поведение родительской ВМ. -{{< /alert >}} - Перед клонированием необходимо подготовить гостевую ОС, чтобы избежать конфликтов уникальных идентификаторов и сетевых настроек. Linux: diff --git a/images/virtualization-artifact/pkg/controller/vmop/snapshot/internal/service/clone.go b/images/virtualization-artifact/pkg/controller/vmop/snapshot/internal/service/clone.go index 59364496c5..86911c3216 100644 --- a/images/virtualization-artifact/pkg/controller/vmop/snapshot/internal/service/clone.go +++ b/images/virtualization-artifact/pkg/controller/vmop/snapshot/internal/service/clone.go @@ -91,7 +91,7 @@ func (o CloneOperation) Execute(ctx context.Context) (reconcile.Result, error) { } func (o CloneOperation) IsApplicableForVMPhase(phase v1alpha2.MachinePhase) bool { - return phase == v1alpha2.MachineStopped + return phase == v1alpha2.MachineStopped || phase == v1alpha2.MachineRunning } func (o CloneOperation) IsApplicableForRunPolicy(runPolicy v1alpha2.RunPolicy) bool {