Difference between revisions of "Virsh dumpxml"

From wikieduonline
Jump to navigation Jump to search
(Created page with "<code>virsh dumpxml<ref>https://libvirt.org/sources/virshcmdref/html-single/#sect-dumpxml</ref> {guest-id, VM_MACHINE_NAME or uuid}</code> [--inactive] [--security-info] [--up...")
 
Tags: Mobile web edit, Mobile edit
 
(14 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
: <code>--migratable</code> with --migratable one can request an XML that is suitable for migrations, i.e., compatible with older libvirt releases and possibly amended with internal run-time options. This option may automatically enable other options (--update-cpu, --security-info, ...) as necessary<ref>https://linux.die.net/man/1/virsh</ref>
 
: <code>--migratable</code> with --migratable one can request an XML that is suitable for migrations, i.e., compatible with older libvirt releases and possibly amended with internal run-time options. This option may automatically enable other options (--update-cpu, --security-info, ...) as necessary<ref>https://linux.die.net/man/1/virsh</ref>
  
 +
 +
 +
:<code>virsh dumpxml MACHINE_NAME > /path/to/savefile.xml</code>
 +
 +
:<code>virsh dumpxml --migrateable MACHINE_NAME > /path/to/savefile.xml</code>
  
 
== Activities ==
 
== Activities ==
# [[KVM/Offline Migrate or move a virtual machine between two KVM servers without shared storage]]<ref>https://serverfault.com/questions/434064/correct-way-to-move-kvm-vm</ref>: <code>[[virsh/virsh dumpxml|virsh dumpxml]]</code> and <code>[[virsh/MY XML VM DEFINITION.XML|virsh define]]</code>
+
# [[Offline Migrate or move a virtual machine between two KVM servers without shared storage]]<ref>https://serverfault.com/questions/434064/correct-way-to-move-kvm-vm</ref>: <code>[[virsh dumpxml]]</code> and <code>[[virsh define]]</code>
# [[Virsh/Create Live backups]] with active [[virsh/virsh blockcommit|virsh blockcommit]]<ref>https://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit</ref>
+
 
 +
# [[Create Live backups]] with active [[virsh blockcommit]]<ref>https://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit</ref>
  
== See also ==
+
# Dump config for all running machines: <code>for NAME in `[[virsh list]] --name`; do virsh [[dumpxml]] $NAME > $NAME.xml; done</code>
* <code>[[virsh define]]</code>
+
 
 +
== Related commands ==
 +
* <code>[[virsh define]] YOU_VM_NAME.xml</code>
 
* <code>[[virsh dominfo]]</code>
 
* <code>[[virsh dominfo]]</code>
 
* <code>[[virsh domrename]]</code>
 
* <code>[[virsh domrename]]</code>
 
* <code>[[virsh snapshot-create-as]]</code>
 
* <code>[[virsh snapshot-create-as]]</code>
* <code>[[virsh domblklist]]</code>
+
* <code>[[virsh domblklist]] VM_NAME</code>
* [[virtinst]]
+
* <code>[[virtinst]]</code> package
 
 
  
 
==See also==
 
==See also==
*{{KVM}}
+
* {{virsh information}}
 +
* {{virt}}
 +
* {{KVM}}
  
[[Category:Linux]
+
[[Category:Linux]]
[[Category:KVM]
+
[[Category:KVM]]

Latest revision as of 12:10, 31 March 2021

virsh dumpxml[1] {guest-id, VM_MACHINE_NAME or uuid} [--inactive] [--security-info] [--update-cpu] [--migratable] [2]

--migratable with --migratable one can request an XML that is suitable for migrations, i.e., compatible with older libvirt releases and possibly amended with internal run-time options. This option may automatically enable other options (--update-cpu, --security-info, ...) as necessary[3]


virsh dumpxml MACHINE_NAME > /path/to/savefile.xml
virsh dumpxml --migrateable MACHINE_NAME > /path/to/savefile.xml

Activities[edit]

  1. Offline Migrate or move a virtual machine between two KVM servers without shared storage[4]: virsh dumpxml and virsh define
  1. Create Live backups with active virsh blockcommit[5]
  1. Dump config for all running machines: for NAME in `virsh list --name`; do virsh dumpxml $NAME > $NAME.xml; done

Related commands[edit]

See also[edit]

  • https://libvirt.org/sources/virshcmdref/html-single/#sect-dumpxml
  • https://linux.die.net/man/1/virsh
  • https://linux.die.net/man/1/virsh
  • https://serverfault.com/questions/434064/correct-way-to-move-kvm-vm
  • https://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit
  • Advertising: