mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 04:36:48 +00:00
fix(instances): a migrated VM's source definition is always removed
Migration left the VM defined on the source host unless "Delete original" was ticked (VIR_MIGRATE_UNDEFINE_SOURCE). With the shared storage migration needs, that definition points at the disks the destination VM is running on: the VM showed on both hosts and could be started (or autostarted) a second time against the same disks; only a configured lock manager stops that. moveto now always passes VIR_MIGRATE_UNDEFINE_SOURCE with VIR_MIGRATE_PERSIST_DEST. The option is gone from the form, the view, the API (MigrateSerializer.xml_del) and the clone auto-migration. It removes the definition, not the disk files.
This commit is contained in:
parent
1ce7dbf18e
commit
25b3671c33
8 changed files with 56 additions and 22 deletions
|
|
@ -91,7 +91,6 @@ class CreateInstanceSerializer(serializers.ModelSerializer):
|
|||
class MigrateSerializer(serializers.ModelSerializer):
|
||||
instance = Instance.objects.all().prefetch_related("userinstance_set")
|
||||
live = serializers.BooleanField(initial=True)
|
||||
xml_del = serializers.BooleanField(initial=True)
|
||||
|
||||
class Meta:
|
||||
model = MigrateInstance
|
||||
|
|
@ -99,7 +98,6 @@ class MigrateSerializer(serializers.ModelSerializer):
|
|||
"instance",
|
||||
"target_compute",
|
||||
"live",
|
||||
"xml_del",
|
||||
"offline",
|
||||
"autoconverge",
|
||||
"compress",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue