Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 989 Bytes

virsh.md

File metadata and controls

43 lines (31 loc) · 989 Bytes

virsh

save and restore domain with snapshots

  • pre: clone linux-scripts-utils adding a path to

  • from source machine

    • copy qcow2 files
    • save domain and snaps
virsh-save-xml VMNAME PATH_TO_SAVEFOLDER
  • from other machine
    • copy qcow in the same path ( ie /var/lib/libvirt/images )
    • restore domain and snaps
virsh-restore-xml PATH_TO_SAVEFOLDER/VMNAME

remove attached usb device from snapshot

to allow start a snapshot with not available attached usb

virsh snapshot-edit DOMAINNAME --snapshotname SNAPNAME

locate hostdev and set startup optional with <source startupPolicy='optional'>, example:

      <hostdev mode='subsystem' type='usb' managed='no'>
        <source startupPolicy='optional'>
          <vendor id='0x13fe'/>
          <product id='0x1f00'/>
        </source>
        <address type='usb' bus='0' port='4'/>
      </hostdev>