• 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. zcat Command Examples in Linux
  2. How to send Audit Logs to Remote Rsyslog Server in CentOS/RHEL 6,7
  3. How to Install and Configure Device Mapper Multipath in CentOS/RHEL 6,7
  4. How to Connect Remote Host Using the ssh Command
  5. 7 Useful Find Command Examples to Locate files to remove when a filesystem is full
  6. How To Configure SNMP Daemons: snmpd and snmptrapd on CentOS/RHEL 5,6 and 7
  7. pstree Command Examples in Linux
  8. How to Audit File Access on Linux
  9. “docker dead but subsys locked” – error while starting docker
  10. CentOS / RHEL 7 : Shutting Down, Suspending, or Rebooting Commands (systemctl)

You May Also Like

Primary Sidebar

Recent Posts

  • grpck command – Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files.
  • xxd command – Expressed in hexadecimal form
  • sesearch: command not found
  • macof: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright