[02:44] find timezone [05:32] good morning [06:10] Good morning [06:21] hi lordievader [06:25] Hey cpaelzer , quiet day at the office? [06:28] lordievader: well office=home anyway, and it seems it will never be quiet :-) [06:29] Oeh, nice. Perhaps I should have said quiet-er ;) [06:34] :-) [06:37] Apparmor, KVM: I am getting issues showing up in the logs such as audit: type=1400 audit(1530081081.080:109): apparmor="DENIED" operation="mknod" profile="libvirt-91a15215-7b56-437b-8634-48d2760a63ff" name="/kvm/libvirt/qemu/domain-OSX_KVM/monitor.sock" pid=28252 comm="qemu-system-x86" requested_mask="c" denied_mask="c" fsuid=64055 ouid=64055. In order to allow requested_mask "c" what should I be adding in the apparmour prof [06:39] rolandw_: cat /etc/apparmor.d/libvirt/libvirt-91a15215-7b56-437b-8634-48d2760a63ff.files should actually have an entry for it [06:39] like [06:39] "/var/lib/libvirt/qemu/domain-OSX_KVM/monitor.sock" rw [06:39] oh I see [06:39] your base Dir is different [06:40] you are using a non default path /kvm instead of /var/lib/ [06:40] Indeed I am. [06:41] I ended up with too many KVM instances and had to move libvirt out of /var... [06:41] If libvirt knows about the changed path it would generate different rules, but for some you might need to add extra rules [06:41] let me check what it uses as base dir for the generated rules [06:41] I can manually edit each libvirt-XX.files but that is a cludge and not a fix... [06:41] would not help [06:41] those are dynamically generated [06:42] we either need to find why virt-aa-helper doesn't follow your new path OR add a few simple rules to the base profile [06:42] let me check for the first option before we try the second [06:43] In virt-aa-helper I've copied all the /var/lib/libvirt rules and added /kvm/libvirt rules. Doesn't seem to make any difference... [06:44] Annoyingly, I'm being called for a meeting. Will be back! cpaelzer thanks for looking into this... [06:44] %s/lib/libvirt/qemu/domain-%s/monitor.sock with the %s being LOCALSTATEDIR [06:45] that is a config time variable [06:45] so you have two options to check after your meeting I'd think [06:46] 1. consider instead of using /kvm for it to mount your extra disk to /var or /var/lib - that way paths would persist and this error would not occur (nor any other similar one later on) [06:46] 2. add an exception to allow access there (this will be in the base profile, so no cross guest protection as the generated rules would have) [06:46] the file /etc/apparmor.d/abstractions/libvirt-qemu holds what all of them are allowed to access [06:47] rolandw_: I hope that helps, and permission "w" corvers c=create as well [06:48] rolandw_: my preference is instead of switching all to /kvm just mount /var/lib/libvirt to your extra disk [06:48] that way just this part of /var will be used for the guests and no other change is needed [06:49] otherwsie you also might need to change /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper to allow it to read that [06:49] to be able to e.g. find backing device chains and so on [08:05] I'm having some trouble with a fresh install of bionic via FAI (don't know if that's related) - it refuses to boot from the disk UUID, I have to specify /dev/vg0/root in grub. The UUID in the grub config is correct though, blkid says so. What could I try? [09:44] cpaelzer_: sadly it hasn't helped me really understand apparmor which I need to learn! Thanks for your help. [09:46] cpaelzer_: You might be interested in the SELinux tutorial one of my colleages wrote. I guess I need to do the same for apparmor! https://github.com/jamesfreeman959/selinux-hands-on-labs [09:47] wb rolandw_ [09:48] rolandw_: https://medium.com/information-and-technology/so-what-is-apparmor-64d7ae211ed ? [09:49] and for an extra bit of the integration in libvirt/kvm https://wiki.ubuntu.com/LibvirtApparmor [09:49] you are common case #3 on the latter === chmurifree is now known as chmuri [12:00] Hello there, installed ubuntu 18.04 with the new installer, and I saw that about 1 MiB of space gets left free at the end of the disk, even if I choose to use the full disk. Why is that? [12:01] GPT puts a backup of the partition table at the end of the disk ... whilenot knowing if thats the reason my guess would be it is :) [12:09] ogra_: I think your are wrong, according to this (https://superuser.com/questions/663795/small-unallocated-space-left-when-partitioning-harddrive-what-is-is-meant-for) [12:09] as i said, only guessing [12:09] There the author of fdisk says that this is not the reason for the free space at the end. I just found that [12:09] I guess then the free space is unneeded [12:09] fdisk doesnt handle GPT [12:10] ogra_: What do you mean? [12:10] fdisk does not manager GPT partition tables [12:10] *manage [12:10] only msdos type ones [12:11] Don't know what you mean with "manage" but I used fdisk without problems on countless GPT-disks and also used fdisk to create GPT tables on empty disks [12:11] interesting ... to my knowledge you need to use gdisk/sgdisk or parted for that [12:11] well, your knowledge is wrong then [12:12] Probably this applies for some older version of fdisk, but the version with ubuntu 18.04 does GPT just fine [12:12] I was under that impression, too [12:13] well, i'm still on 16.04 [12:13] and there it definitely doesnt manager GPT [12:13] *manage [12:13] * diddledan removes ogra_'s R key [12:13] thanks :) [12:14] You can try it out for yourself, fdisk can handle GPT just fine [12:14] well, i did, i maintain several ubuntu images :) [12:14] "several" [12:14] s/several/many/ ?? [12:14] and for the GPT variations i have to use sgdisk or parted (and even parted is still flaky with GPT in 16.04) [12:15] diddledan, i didnt want to exaggerate ;) [12:15] :-p [12:15] I think I know where your guess came from though: On the wikipedia it states that the original fdisk shipping with MS-DOS could only handle MBR formatted drives [12:15] Okay, probably the GPT "extension" of fdisk is kind of new then [12:16] according to the manpage, fdisk can do gpt. I've always been using parted, tho', and sgdisk for scripted partitioning [12:16] i think it can do it now, but still in a limited way ... (not managing GUIDs and such) [12:18] https://blog.stgolabs.net/2012/09/fdisk-updates-and-gpt-support.html [12:19] ogra_: On my system, if I create a GPT table on an empty device and use "blkid" it will show me the device with 'PTUUID="..." PTTYPE="gpt"' [12:21] ogra_: Ah you mean the handling of partition types, right? It does that as well. [12:23] it doesnt in the 16.04 version [12:24] neither GUID nor GTYPE [12:25] anyway ... i'm probably wrong about the free space at the end of your disk ... which was the initial question :) [12:26] So, a GPT backup is stored at the end of the disk in any case, right? So the last partition needs to end before that? [12:27] yes, though 1MB seems a bit much [12:27] but perhaps thats the smallest possible block size [12:27] a partitioning tool won't show the backup block or any space related to it - it will just reduce the size of available space for partitions and tell you that's the size of your disk [12:28] right [12:28] Yes, after creating GPT on my disk, the nvme command only shows 50kb or something allocated LBAs [12:28] a gap when partitioning automatically is usually a result of alignment conformance [12:29] yeah [12:29] Okay, that seems reasonable. So on a modern disk, like an nvme SSD, there should be no reason to leave anything empty right? Since everything is automatically aligned [12:30] pretty much same alignment rules apply. the sector sizes might be different tho [12:31] blackflow: My SSD has LBAs of size 512 bytes. Which alignment rules apply then? I would just allocate any LBA the partitioning tool lets me [12:33] Or maybe to say it in a better way, the local blocks are 512 bytes, don't know about the length of an address [12:35] l4m8d4: same rules as with hdd. ssds also read/write in blocks, and if your partitions are not aligned in factors of that block size, it's also misaligned. [12:36] to be on the safe side, 1M alignment should be sufficient. I've read somewhere that SSDs actually internally work with block sizes much bigger than the standard 512b or 4k, but I can't find definitive info on that. [12:38] blackflow: Okay, but the SSD says it adresses each block 512B size. Now I say the partitioning tool should use all blocks. Now where could misalignment come from? The fact the SSD might internally work with bigger chunks, and then end of the partition could be a block that is "too small"? [12:39] l4m8d4: misalignment could come from having partition sizes that aren't factors of 512 bytes [12:41] (in this case, if 512b is really the actual sector size) [12:41] blackflow: I specify to the partition tool the first LBA and last LBA of the partition. Now this is naturally a multple of 512 bytes, since each block is 512 bytes, right? [12:42] I guess so. I'd just partition in units of MiB or even just MB, that's 1M boundary and should be fine [12:44] Okay, then. I guess I'm just curious and a little annoyed by that, realistically irrelevant, 1MiB of free space. Which probably is a waste of time^^ Thanks [12:46] being what, <0.01% of total drive size? yeah :) [12:46] l4m8d4: on the other hand, I always like to leave a few GB of "just in case" free space at the end of drives. You never know when it'll come handy. [13:10] just a few? [13:10] sounds like a full drive to me [13:28] Yeah, I don't do that either. Ultimately I don't care much about 1mb more or less, but if it was a gigabyte I had to leave free I would be pissed, since I want to use the system to its full potential if possible === tobasco is now known as tobasco_afk === oerheks__ is now known as oerheks [18:26] rbasak: do you have that snap somewhere I can test it? [18:26] rbasak: (certbot) === tobasco_afk is now known as tobasco [18:47] is there an "official" solution for hypervisor management on ubuntu server? I was playing around with Kimchi but it's still rough around the edges (at least on Ubuntu) [18:49] i tried xenserver instead of ubuntu once but that brought me nothing but pain [18:52] libvirt is the "easy" thing. Openstack is the hard thing. [18:52] openstack probably doesn't make sense for 1-2 hosts i would imagine [18:52] I find virt-manager good for personal needs [18:53] and light work needs [18:53] (libvirt gui, that has remote mgmt built in) [18:53] dpb1, that is gui-based, right? [18:54] yes [18:54] i'm on ubuntu server, no wm [18:55] virt-manager thing can connect to remote libvirts [18:55] or you can ssh -X [18:55] or you can use virsh [18:55] right, virsh is the cli version [18:55] it's OK [18:55] I never got the hang of virsh [18:55] if I'm on a windows/mac, I use ssh -X [18:55] i was definitely hoping for something gui-based, but was thinking web [18:55] and get virt-manager [18:56] there are a ton of things: https://www.linux-kvm.org/page/Management_Tools, but I don't have experience with any (other than openstack) [18:57] heh, after openstack, everything else has to look nice and simple :) [18:57] yes, those were my thoughts too [18:57] I dislike even libvirt's extreme generalities. [18:57] :) [18:57] openstack says "hold my enterprise beverage of choice" [20:39] dpb1: http://people.canonical.com/~rbasak/certbot_0.25.1_amd64.snap [20:39] dpb1: install the snap (--classic --dangerous), and apache2 or nginx, then run "certbot" [20:44] ty [20:44] dpb1: https also works [20:44] :-) [20:45] dpb1: I'm tracking outstanding work in https://github.com/basak/certbot-snap-build/issues