@
@
@eashla2015-12-21 19:21:24
Backup
@eashla, 2015-12-21 19:21:24

Why won't it boot from snapshot?

Problem: Can't boot from snapshot (hangs when desktop starts loading)
Suspicions:

Format specific information:
    compat: 1.1
    lazy refcounts: false

More:
I want to make a backup using copies of snapshots. To do this, I used this advice
[email protected]:/var/lib/libvirt/images# qemu-img create -f qcow2 -b win81.img win81.qcow2.snap
Formatting 'win81.qcow2.snap', fmt=qcow2 size=214748364800 backing_file='win81.img' encryption=off cluster_size=65536 lazy_refcounts=off 
[email protected]:/var/lib/libvirt/images# ls -l
-rw------- 1 root root 214748364800 дек.  21 11:27 win81.img
-rw-r--r-- 1 root root       200192 дек.  21 11:27 win81.qcow2.snap

[email protected]:/var/lib/libvirt/images# sudo virsh shutdown win81
Завершение работы домена win81

Next, we go to change the xml file.
[email protected]:nano /etc/libvirt/qemu/win81.xml
<domain type='kvm'>
  <name>win81</name>
  <uuid>083283e5-ce0b-0905-b491-3fe01cf042ea</uuid>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/kvm-spice</emulator>

БЫЛО
    <disk type='file' device='disk'>
--      <driver name='qemu' type=‘qcow2’/>
--      <source file='/var/lib/libvirt/images/win81.qcow2.snap/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

СТАЛО
    <disk type='file' device='disk'>
++      <driver name='qemu' type='raw'/>
++      <source file='/var/lib/libvirt/images/win81.img'/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

[email protected]:/var/lib/libvirt/images# ls -l
-rw------- 1 root root 214748364800 дек.  21 11:27 win81.img
-rw-r--r-- 1 root root       200192 дек.  21 11:27 win81.qcow2.snap
[email protected]:/var/lib/libvirt/images# virsh start win81
Домен win81 запущен

I look through vnc and see how to boot Windows. Upon completion of loading the Windows icon, a mouse appears on a black screen and nothing else loads (waited 10 minutes)
I look here.
[email protected]:/var/lib/libvirt/images# qemu-img info win81.qcow2.snap 
image: win81.qcow2.snap
file format: qcow2
virtual size: 200G (214748364800 bytes)
disk size: 196K
cluster_size: 65536
backing file: win81.img
Format specific information:
    compat: 1.1
    lazy refcounts: false

Since I don’t really understand all this cuisine, I was alerted by lazy refcounts: false. In the search they write that this is some kind of bug that is being fixed . But is it the case - he did not pick.
[email protected]:/etc/libvirt/qemu# virsh version
Собрано при помощи библиотеки: libvirt 1.2.2
Используется библиотека: libvirt 1.2.2
Используется API: QEMU 1.2.2
Выполняется гипервизор: QEMU 2.0.0

Maybe he made a mistake in the actions due to inexperience?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question