abbbi / virtnbdbackup

Backup utility for Libvirt / qemu / kvm supporting incremental and differential backups + instant recovery (agentless).
http://libvirtbackup.grinser.de/
GNU General Public License v3.0
330 stars 46 forks source link

ERROR root virtnbdbackup - main [main]: Virtual machine does not support required backup features, please adjust virtual machine configuration. #224

Closed linuxgokan closed 1 week ago

linuxgokan commented 1 week ago

Hello

I am getting this error on a KVM host server. What is causing the error?

ERROR root virtnbdbackup - main [main]: Virtual machine does not support required backup features, please adjust virtual machine configuration.

abbbi commented 1 week ago

README:

https://github.com/abbbi/virtnbdbackup?tab=readme-ov-file#libvirt-versions--760-debian-bullseye-ubuntu-20x

abbbi commented 1 week ago

https://github.com/abbbi/virtnbdbackup?tab=readme-ov-file#backup-fails-with-virtual-machine-does-not-support-required-backup-features-please-adjust-virtual-machine-configuration

linuxgokan commented 1 week ago

hi gives an error.

-^ Failed. Try again? [y,n,i,f,?]: vm1 2168b350-64f1-47fe-bd6b-c5f744197a4a 33554432 33554432 8
abbbi commented 1 week ago

like described in the README you must alter the first line in the config file too like in the example.

linuxgokan commented 1 week ago

I took a backup as follows. I received 2 warnings while taking a backup. Will these be a problem?

[2024-09-29 17:55:35] WARNING fs fs - freeze [main]: argument unsupported: QEMU guest agent is not configured [2024-09-29 17:55:35] INFO root virtnbdbackup - main [main]: Started backup job with checkpoint, saving information. [2024-09-29 17:55:35] INFO root checkpoint - backup [main]: Saving checkpoint config to: [/16tb2disk/xde1-vm/vm1//checkpoints/virtnbdbackup.1.xml] [2024-09-29 17:55:35] WARNING root checkpoint - getXml [main]: Failed to get checkpoint info with size information: [unsupported flags (0x4) in function qemuCheckpointGetXMLDesc]

<domain type='kvm' id='77' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>vm1</name>
  <uuid>2168b350-64f1-47fe-bd6b-c5f744197a4a</uuid>
  <memory unit='KiB'>33554432</memory>
  <currentMemory unit='KiB'>33554432</currentMemory>
  <vcpu placement='static'>8</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-focal'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='custom' match='exact' check='full'>
    <model fallback='forbid'>Skylake-Client-IBRS</model>
    <feature policy='require' name='hypervisor'/>
    <feature policy='disable' name='mpx'/>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/vm1.qcow2' index='2'/>
      <backingStore/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu'/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:0f:89:ca'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/3'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/3'>
      <source path='/dev/pts/3'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0' state='disconnected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='ps2'>
      <alias name='input1'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input2'/>
    </input>
    <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>
    <sound model='ich6'>
      <alias name='sound0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </sound>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <redirdev bus='usb' type='spicevmc'>
      <alias name='redir0'/>
      <address type='usb' bus='0' port='2'/>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
      <alias name='redir1'/>
      <address type='usb' bus='0' port='3'/>
    </redirdev>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+64055:+108</label>
    <imagelabel>+64055:+108</imagelabel>
  </seclabel>
  <qemu:capabilities>
    <qemu:add capability='incremental-backup'/>
  </qemu:capabilities>
</domain>
abbbi commented 1 week ago

1) warning, check readme, again:

https://github.com/abbbi/virtnbdbackup?tab=readme-ov-file#application-consistent-backups

2) no.

linuxgokan commented 1 week ago

After fixing Qemu Agent, isn't it enough to just take an "automatic" backup? Without deleting the old backup I took.

abbbi commented 1 week ago

yes

linuxgokan commented 1 week ago

very thanks. I took a proper backup.

`[2024-09-29 18:06:24] INFO lib common - printVersion [main]: Version: 2.15 Arguments: /usr/local/bin/virtnbdbackup -d vm1 -l auto -o /16tb2disk/xde1-vm/vm1/

[2024-09-29 18:06:24] INFO root virtnbdbackup - main [main]: Backup level: [auto] [2024-09-29 18:06:24] INFO root virtnbdbackup - main [main]: Libvirt library version: [6000000] [2024-09-29 18:06:24] INFO root virtnbdbackup - main [main]: NBD library version: [1.6.2] [2024-09-29 18:06:24] INFO root check - targetDir [main]: Backup mode auto: executing incremental backup. [2024-09-29 18:06:24] INFO root disktype - Optical [main]: Skipping attached [cdrom] device: [hda]. [2024-09-29 18:06:24] INFO root virtnbdbackup - main [main]: Backup will save [1] attached disks. [2024-09-29 18:06:24] INFO root virtnbdbackup - main [main]: Concurrent backup processes: [1] [2024-09-29 18:06:24] INFO root checkpoint - create [main]: Loading checkpoints from: [/16tb2disk/xde1-vm/vm1//vm1.cpt] [2024-09-29 18:06:24] INFO root checkpoint - redefine [main]: Loading checkpoint list from: [/16tb2disk/xde1-vm/mv1//checkpoints] [2024-09-29 18:06:24] INFO root checkpoint - create [main]: Checkpoint handling. [2024-09-29 18:06:24] INFO root checkpoint - create [main]: Next checkpoint id: [3]. [2024-09-29 18:06:24] INFO root checkpoint - create [main]: Parent checkpoint name [virtnbdbackup.2]. [2024-09-29 18:06:24] INFO root checkpoint - create [main]: Using checkpoint name: [virtnbdbackup.3]. [2024-09-29 18:06:24] INFO root virtnbdbackup - main [main]: Local NBD Endpoint socket: [/var/tmp/virtnbdbackup.2346363] [2024-09-29 18:06:24] INFO root virtnbdbackup - main [main]: Temporary scratch file target directory: [/var/tmp] [2024-09-29 18:06:24] INFO root job - start [main]: Starting backup job. [2024-09-29 18:06:24] INFO fs fs - freeze [main]: Freezed [2] filesystems. [2024-09-29 18:06:24] INFO fs fs - thaw [main]: Thawed [2] filesystems. [2024-09-29 18:06:24] INFO root virtnbdbackup - main [main]: Started backup job with checkpoint, saving information. [2024-09-29 18:06:24] INFO root checkpoint - backup [main]: Saving checkpoint config to: [/16tb2disk/xde1-vm/vm1//checkpoints/virtnbdbackup.3.xml] [2024-09-29 18:06:25] WARNING root checkpoint - getXml [main]: Failed to get checkpoint info with size information: [unsupported flags (0x4) in function qemuCheckpointGetXMLDesc] [2024-09-29 18:06:25] INFO nbd client - connect [vda]: Waiting until NBD server at [nbd+unix:///vda?socket=/var/tmp/virtnbdbackup.2346363] is up. [2024-09-29 18:06:26] INFO nbd client - connect [vda]: Connection to NBD backend succeeded. [2024-09-29 18:06:26] INFO root disk - backup [vda]: Got 211 extents to backup. [2024-09-29 18:06:26] INFO root disk - backup [vda]: 214748364800 bytes disk size [2024-09-29 18:06:26] INFO root disk - backup [vda]: 11075584 bytes of data extents to backup [2024-09-29 18:06:26] INFO root target - get [vda]: Write data to target file: [/16tb2disk/xde1-vm/vm1//vda.inc.virtnbdbackup.3.data.partial]. [2024-09-29 18:06:26] INFO root disk - backup [vda]: Creating thin provisioned stream backup image

[2024-09-29 18:06:26] INFO root metadata - backupChecksum [vda]: Saving checksum to: [/16tb2disk/xde1-vm/vm1//vda.inc.virtnbdbackup.3.data.chksum] [2024-09-29 18:06:26] INFO root virtnbdbackup - main [main]: Backup jobs finished, stopping backup task. [2024-09-29 18:06:26] INFO root metadata - backupConfig [main]: Saving VM config to: [/16tb2disk/xde1-vm/vm1//vmconfig.virtnbdbackup.3.xml] [2024-09-29 18:06:26] INFO root metadata - backupDiskInfo [main]: Saved qcow image config to: [/16tb2disk/xde1-vm/vm1//vda.virtnbdbackup.3.qcow.json] [2024-09-29 18:06:26] INFO root virtnbdbackup - main [main]: Total saved disk data: [10.6MB] [2024-09-29 18:06:26] INFO root virtnbdbackup - main [main]: Finished successfully

`