1 root@alexhost:~/vm-seed# cd /var/lib/libvirt 2 root@alexhost:/var/lib/libvirt# ls 3 boot dnsmasq images qemu sanlock 4 root@alexhost:/var/lib/libvirt# mkdir recovered 5 root@alexhost:/var/lib/libvirt# ps aux | grep vm29 6 libvirt+ 1770334 10.7 1.6 10541296 4260224 ? Sl Oct02 282:15 /usr/bin/qemu-system-x86_64 -name guest=vm29,debug-threads=on -S -object {"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain-46-vm29/master-key.aes"} -machine pc-q35-8.2,usb=off,dump-guest-core=off,memory-backend=pc.ram,hpet=off,acpi=on -accel kvm -cpu host,migratable=on -m size=4194304k -object {"qom-type":"memory-backend-ram","id":"pc.ram","size":4294967296} -overcommit mem-lock=off -smp 4,sockets=4,cores=1,threads=1 -uuid 7ee14545-3934-458e-b6a7-7dcef92123ad -display none -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=95,server=on,wait=off -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=delay -no-shutdown -global ICH9-LPC.disable_s3=1 -global ICH9-LPC.disable_s4=1 -boot strict=on -device {"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"} -device {"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"} -device {"driver":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x2"} -device {"driver":"pcie-root-port","port":11,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x3"} -device {"driver":"pcie-root-port","port":12,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x1.0x4"} -device {"driver":"pcie-root-port","port":13,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x1.0x5"} -device {"driver":"pcie-root-port","port":14,"chassis":7,"id":"pci.7","bus":"pcie.0","addr":"0x1.0x6"} -device {"driver":"pcie-root-port","port":15,"chassis":8,"id":"pci.8","bus":"pcie.0","addr":"0x1.0x7"} -device {"driver":"pcie-root-port","port":16,"chassis":9,"id":"pci.9","bus":"pcie.0","multifunction":true,"addr":"0x2"} -device {"driver":"pcie-root-port","port":17,"chassis":10,"id":"pci.10","bus":"pcie.0","addr":"0x2.0x1"} -device {"driver":"pcie-root-port","port":18,"chassis":11,"id":"pci.11","bus":"pcie.0","addr":"0x2.0x2"} -device {"driver":"pcie-root-port","port":19,"chassis":12,"id":"pci.12","bus":"pcie.0","addr":"0x2.0x3"} -device {"driver":"pcie-root-port","port":20,"chassis":13,"id":"pci.13","bus":"pcie.0","addr":"0x2.0x4"} -device {"driver":"pcie-root-port","port":21,"chassis":14,"id":"pci.14","bus":"pcie.0","addr":"0x2.0x5"} -device {"driver":"qemu-xhci","p2":15,"p3":15,"id":"usb","bus":"pci.2","addr":"0x0"} -device {"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.3","addr":"0x0"} -blockdev {"driver":"file","filename":"/var/lib/libvirt/images/vm29.qcow2","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"} -blockdev {"node-name":"libvirt-2-format","read-only":false,"driver":"qcow2","file":"libvirt-2-storage","backing":null} -device {"driver":"virtio-blk-pci","bus":"pci.4","addr":"0x0","drive":"libvirt-2-format","id":"virtio-disk0","bootindex":1} -blockdev {"driver":"file","filename":"/var/lib/libvirt/images/vm29-seed.iso","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"} -blockdev {"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"} -device {"driver":"ide-cd","bus":"ide.0","drive":"libvirt-1-format","id":"sata0-0-0"} -netdev {"type":"tap","fd":"96","vhost":true,"vhostfd":"98","id":"hostnet0"} -device {"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:1d:42:17","bus":"pci.1","addr":"0x0"} -chardev pty,id=charserial0 -device {"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0} -chardev socket,id=charchannel0,fd=93,server=on,wait=off -device {"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"} -audiodev {"id":"audio1","driver":"none"} -global ICH9-LPC.noreboot=off -watchdog-action reset -device {"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.5","addr":"0x0"} -object {"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"} -device {"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","bus":"pci.6","addr":"0x0"} -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg timestamp=on 7 root 2195001 0.0 0.0 4088 1920 pts/4 S+ 17:05 0:00 grep --color=auto vm29 8 root@alexhost:/var/lib/libvirt# cd /proc/1770334/fd 9 root@alexhost:/proc/1770334/fd# ls -lF 10 total 0 11 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 0 -> /dev/null 12 l-wx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 1 -> 'pipe:[3043002]'| 13 lr-x------ 1 libvirt-qemu kvm 64 Oct 4 17:06 10 -> '/var/lib/libvirt/images/vm29-seed.iso (deleted)' 14 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 100 -> 'anon_inode:[eventfd]' 15 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 101 -> 'anon_inode:[eventfd]' 16 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 102 -> 'anon_inode:[eventfd]' 17 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 103 -> 'anon_inode:[eventfd]' 18 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 104 -> 'anon_inode:[eventfd]' 19 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 105 -> 'anon_inode:[eventfd]' 20 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 106 -> 'anon_inode:[eventfd]' 21 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 107 -> 'anon_inode:[eventfd]' 22 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 108 -> 'anon_inode:[eventfd]' 23 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 109 -> 'anon_inode:[eventfd]' 24 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 11 -> '/var/lib/libvirt/images/vm29.qcow2 (deleted)' 25 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 110 -> 'anon_inode:[eventfd]' 26 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 111 -> 'anon_inode:[eventfd]' 27 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 112 -> 'anon_inode:[eventfd]' 28 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 12 -> /dev/kvm 29 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 13 -> anon_inode:kvm-vm 30 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 14 -> 'anon_inode:[eventfd]' 31 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 15 -> 'anon_inode:[eventfd]' 32 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 16 -> 'anon_inode:[eventfd]' 33 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 17 -> 'anon_inode:[eventfd]' 34 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 18 -> 'socket:[3063052]'= 35 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 19 -> 'anon_inode:[eventfd]' 36 l-wx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 2 -> 'pipe:[3043002]'| 37 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 20 -> 'anon_inode:[eventfd]' 38 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 21 -> anon_inode:kvm-vcpu:0 39 lr-x------ 1 libvirt-qemu kvm 64 Oct 4 17:06 22 -> anon_inode:kvm-vcpu-stats:0 40 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 23 -> anon_inode:kvm-vcpu:1 41 lr-x------ 1 libvirt-qemu kvm 64 Oct 4 17:06 24 -> anon_inode:kvm-vcpu-stats:1 42 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 25 -> anon_inode:kvm-vcpu:2 43 lr-x------ 1 libvirt-qemu kvm 64 Oct 4 17:06 26 -> anon_inode:kvm-vcpu-stats:2 44 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 27 -> anon_inode:kvm-vcpu:3 45 lr-x------ 1 libvirt-qemu kvm 64 Oct 4 17:06 28 -> anon_inode:kvm-vcpu-stats:3 46 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 29 -> 'anon_inode:[eventfd]' 47 lr-x------ 1 libvirt-qemu kvm 64 Oct 4 17:06 3 -> /dev/urandom 48 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 30 -> 'anon_inode:[eventfd]' 49 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 31 -> 'anon_inode:[eventfd]' 50 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 32 -> 'anon_inode:[eventfd]' 51 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 33 -> 'anon_inode:[eventfd]' 52 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 34 -> 'anon_inode:[eventfd]' 53 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 35 -> 'anon_inode:[eventfd]' 54 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 36 -> 'anon_inode:[eventfd]' 55 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 37 -> 'anon_inode:[eventfd]' 56 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 38 -> 'anon_inode:[eventfd]' 57 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 39 -> 'anon_inode:[eventfd]' 58 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 4 -> 'anon_inode:[eventfd]' 59 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 40 -> 'anon_inode:[eventfd]' 60 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 41 -> 'anon_inode:[eventfd]' 61 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 42 -> 'anon_inode:[eventfd]' 62 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 43 -> 'anon_inode:[eventfd]' 63 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 44 -> 'anon_inode:[eventfd]' 64 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 45 -> 'anon_inode:[eventfd]' 65 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 46 -> 'anon_inode:[eventfd]' 66 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 47 -> 'anon_inode:[eventfd]' 67 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 48 -> 'anon_inode:[eventfd]' 68 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 49 -> 'anon_inode:[eventfd]' 69 l-wx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 5 -> /run/libvirt/qemu/vm29.pid 70 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 50 -> 'anon_inode:[eventfd]' 71 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 51 -> 'anon_inode:[eventfd]' 72 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 52 -> 'anon_inode:[eventfd]' 73 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 53 -> 'anon_inode:[eventfd]' 74 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 54 -> 'anon_inode:[eventfd]' 75 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 55 -> 'anon_inode:[eventfd]' 76 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 56 -> 'anon_inode:[eventfd]' 77 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 57 -> 'anon_inode:[eventfd]' 78 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 58 -> 'anon_inode:[eventfd]' 79 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 59 -> 'anon_inode:[eventfd]' 80 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 6 -> 'anon_inode:[signalfd]' 81 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 60 -> 'anon_inode:[eventfd]' 82 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 61 -> 'anon_inode:[eventfd]' 83 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 62 -> 'anon_inode:[eventfd]' 84 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 63 -> 'anon_inode:[eventfd]' 85 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 64 -> 'anon_inode:[eventfd]' 86 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 65 -> 'anon_inode:[eventfd]' 87 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 66 -> 'anon_inode:[eventfd]' 88 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 67 -> 'anon_inode:[eventfd]' 89 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 68 -> 'anon_inode:[eventfd]' 90 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 69 -> 'anon_inode:[eventfd]' 91 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 7 -> 'anon_inode:[eventfd]' 92 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 70 -> 'anon_inode:[eventfd]' 93 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 71 -> 'anon_inode:[eventfd]' 94 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 72 -> 'anon_inode:[eventfd]' 95 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 73 -> 'anon_inode:[eventfd]' 96 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 74 -> 'anon_inode:[eventfd]' 97 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 75 -> 'anon_inode:[eventfd]' 98 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 76 -> 'anon_inode:[eventfd]' 99 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 77 -> 'anon_inode:[eventfd]' 100 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 78 -> 'anon_inode:[eventfd]' 101 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 79 -> 'anon_inode:[eventfd]' 102 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 8 -> 'anon_inode:[eventfd]' 103 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 80 -> 'anon_inode:[eventfd]' 104 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 81 -> 'anon_inode:[eventfd]' 105 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 82 -> 'anon_inode:[eventfd]' 106 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 83 -> 'anon_inode:[eventfd]' 107 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 84 -> 'anon_inode:[eventfd]' 108 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 85 -> 'anon_inode:[eventfd]' 109 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 86 -> 'anon_inode:[eventfd]' 110 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 87 -> 'anon_inode:[eventfd]' 111 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 88 -> 'anon_inode:[eventfd]' 112 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 89 -> 'anon_inode:[eventfd]' 113 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 9 -> /dev/ptmx 114 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 90 -> 'anon_inode:[eventfd]' 115 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 91 -> 'anon_inode:[eventfd]' 116 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 92 -> 'anon_inode:[eventfd]' 117 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 93 -> 'socket:[3070039]'= 118 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 94 -> 'anon_inode:[eventfd]' 119 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 95 -> 'socket:[3070040]'= 120 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 96 -> /dev/net/tun 121 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 97 -> 'anon_inode:[eventfd]' 122 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 98 -> /dev/vhost-net 123 lrwx------ 1 libvirt-qemu kvm 64 Oct 4 17:06 99 -> 'anon_inode:[eventfd]' 124 root@alexhost:/proc/1770334/fd# cp -L --sparse=always 11 /var/lib/libvirt/recovered/vm29-recovered.qcow2 125 root@alexhost:/proc/1770334/fd# cp -L --sparse=always 10 /var/lib/libvirt/recovered/vm29-seed-recovered.iso 126 root@alexhost:/proc/1770334/fd# ls -l /var/lib/libvirt/recovered/ 127 total 7130228 128 -rw-r----- 1 root root 7791640576 Oct 4 17:12 vm29-recovered.qcow2 129 -rw-r----- 1 root root 376832 Oct 4 17:16 vm29-seed-recovered.iso 130 root@alexhost:/proc/1770334/fd#