Skip to content

Commit

Permalink
Allow migration from local disks (#113)
Browse files Browse the repository at this point in the history
Add parameter `with-local-disks=1` to allow migration from local disks.
  • Loading branch information
greenlogles authored Oct 19, 2024
1 parent d3c055c commit 21a73b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .changelogs/1.0.5/113_fix_migration_from_local_disk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fixed:
- Fix migration from local disks. [#113]
3 changes: 2 additions & 1 deletion proxlb
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,8 @@ def __run_vm_rebalancing(api_object, _vm_vm_statistics, app_args, parallel_migra
# Migrate type VM (live migration).
if value['type'] == 'vm':
logging.info(f'{info_prefix} Rebalancing VM {vm} from node {value["node_parent"]} to node {value["node_rebalance"]}.')
job_id = api_object.nodes(value['node_parent']).qemu(value['vmid']).migrate().post(target=value['node_rebalance'],online=1)
options = {'target': value['node_rebalance'], 'online': 1, 'with-local-disks': 1}
job_id = api_object.nodes(value['node_parent']).qemu(value['vmid']).migrate().post(**options)

# Migrate type CT (requires restart of container).
if value['type'] == 'ct':
Expand Down

1 comment on commit 21a73b7

@JamesOBenson
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome patch, I manually did that to our code here prior to this patch to get things to migrate.

Please sign in to comment.