-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ubuntu 20.04.2 LTS #7
Comments
hi,
nice catch, i will add it to the FAQ.
i think it is. I cant recall completely the usage here, i think it has to do with a NDB Server can deny From the Description of get_block_size():
so i think it would be save to assume 512 like it does if the function is missing entirely. |
@abbbi seems it should be enough to add testing on Ubuntu 20.04 |
@abbbi I'm back with details after the thorough testing To get rid of
to 3 config files /etc/apparmor.d/local/abstractions/libvirt-qemu, /etc/apparmor.d/local/usr.sbin.libvirtd and /etc/apparmor.d/local/usr.lib.libvirt.virt-aa-helper (these files are empty by default) Also I've designed and tested the bash bootstrap /usr/bin/kvmbackup to implement non-interactive backup operations cycle for active kvm machines with your virtnbdbackup tool The first backup of every vm on every new month is forced to be full size, the rest backups on the month are incremental. Every backup is processed with lz4 compression 'cause this feature really saves the host drive space a lot. The bootstrap keeps reporting the flow logs on stdout if one runs it from console, in crontab these reports can be silenced in standard way
I've uploaded the sources to review on my gist Please feel free to utilize the above info and the bootstrap in your next releases, and thank you for the great simple tool for kvm backups! |
thanks for your feedback! i will have a look and update the README accordingly! |
As a side note for the AppArmor discussion, in Ubuntu 22.04 the sockets did not work just by adding the config files mentioned (and reloading apparmor) unless I made some error I could not catch at the time (despite checking things a few times) I did get it working by: installed apparmor-profiles (and reloaded apparmor) (Note: I'm guessing that this was not necessary, but I'm including it here for completeness) /etc/apparmor.d/abstractions/libvirt-qemu
and set the config in
I may be able to later confirm this on another machine. (Especially if the apparmor-profiles was needed, or some other sunspot activity affected the results.) (Once I got the socket working I found out that my images were qcow2, but progress is progress) |
Tested on another Ubuntu 22.04. /etc/apparmor.d/local/abstractions/libvirt-qemu with contents of
and then reloading apparmor
was everything that was required for the creation of socket |
I'm by no means an apparmor expert, not able to solve this on my own, but: Was getting the error about the socket and added the lines as suggested in the REAME. This did in fact solve the issue about the socket, but that was just because apparmor no longer runs. When trying to reload apparmor.service I get:
Am on Ubuntu 24.04.1 LTS |
there is an syntax error in your apparmor configuration in line 91:
|
I know, but that is the first line of the copied content from the README:
BTW |
i have actually no idea how to solve this apparmor fuckery. Its a pain in the ass.
|
Ha ha ha... wonderfull. And I thought I was the only one disliking stuff like apparmor. Will give it a shot, never occured to me I could specify another location. Thanks for the reply, and thanks for the tool. Love it. |
On my system (debian 12) its fine with these lines:
apparmor_parser -qp /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper does not report any parsing error. Maybe also depends on the apparmor version? idk. |
The problem, as usual, occurs right between the back of my seat and the keyboard
The last line is missing a komma at the end. Furthermore: in the file /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper the lines should be put before the acolade,. Not at the very end of the file. Thanks again for your help, and sorry for the noise. |
Hi, nice tool, thanks a lot
tried it in Ubuntu 20.04.2 LTS
2021-04-20 17:38:50 INFO common - printVersion: Version: 0.17 Arguments: /usr/local/bin/virtnbdbackup -d vm-template -l full -o /mnt/backup/vm-template
2021-04-20 17:38:50 INFO virtnbdbackup - main: Domain has 1 disks attached which support changed block tracking.
2021-04-20 17:38:50 INFO virtnbdbackup - main: Looking for checkpoints
2021-04-20 17:38:50 INFO virtnbdbackup - main: Using checkpoint name: virtnbdbackup
2021-04-20 17:38:50 INFO virtnbdbackup - main: Temporary scratch file target directory: /var/tmp
2021-04-20 17:38:50 INFO virtnbdbackup - main: Starting backup job.
2021-04-20 17:38:50 WARNING libvirthelper - startBackup: Guest agent is not responding: QEMU guest agent is not connected
2021-04-20 17:38:50 ERROR virtnbdbackup - main: internal error: unable to execute QEMU command 'nbd-server-start': Failed to bind socket to /var/tmp/virtnbdbackup.868194: Permission denied
obvious workaround is to disable apparmor
extenthandler.py:
def _setRequestAligment(self):
align = self._nbdFh.get_block_size(0)
if align == 0:
align = self._align
return self._maxRequestBlock - align + 1
Ubuntu has libnbd 1.2.2 with missing get_block_size()
is it safe to skip get_block_size() and use self._align if no get_block_size() available ?
The text was updated successfully, but these errors were encountered: