• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to cancel or pause live migrations using virsh

by admin

There are several limitations to consider when preparing for and performing a live migration. One of them is that no operations can be performed on a virtual machine that is being live migrated. Still, you can use virsh on the source compute node to interact with the virtual machine. Specifically:

1. View the current state of the live migration:

# virsh domjobinfo domain
Time elapsed 110110 ms
Data processed 100.500 GiB
Data remaining 25.500 GiB
...[output truncated]...

Replace domain with the name, numeric ID or UUID of the virtual machine which is being migrated.

2. Cancel the migration:

# virsh domjobabort domain

3. Pause the virtual machine:

# virsh suspend domain

Virtual Machines under heavy memory load are hard to live migrate. In such cases you can set maximum down time. To do this on a live migration which is not in progress, use QEMU:

# virsh qemu-monitor-command --hmp domain migrate_set_downtime time_in_seconds

To set maximum down time on a live migration which is in progress, use libvirt:

# virsh migrate-setmaxdowntime domain time_in_milliseconds

Filed Under: Linux

Some more articles you might also be interested in …

  1. colrm : command not found
  2. lsattr: command not found
  3. Linux OS Service ‘squid’
  4. inxi Command Examples in Linux
  5. getent: command not found
  6. Configuring Persistent Storage in CentOS/RHEL 5,6 for Single Path using udev rules
  7. How to extend an LVM swap partition in Linux
  8. How to Set a Custom Interface Name with NetworkManager in CentOS/RHEL 7
  9. virt-install: Command Not Found
  10. How to Disable rpc.quotad Service in CentOS/RHEL

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright