Jenkins / LibVirt / Qemu / Fédora : Brouillon d’une tentative de mise en place …

!!! CECI EST UN BROUILLON !!!

Sur Jenkins j’ai mis le bon plugins : Libvirt Slaves

C’est pour l’instant en projet … mais j’essaye de faire une installation propre afin de facilité la validation automatique :

$ apt-get install qemu-kvm qemu virt-manager virt-viewer libvirt-bin

$ apt install libguestfs-tools

On télécharge pour une cible armhfp :

$ curl -O https://dl.fedoraproject.org/pub/fedora/linux/releases/30/Spins/armhfp/images/Fedora-Minimal-armhfp-30-1.2-sda.raw.xz
 
$ unxz Fedora-Minimal-armhfp-30-1.2-sda.raw.xz
 
$ sudo virt-builder -v -x --get-kernel Fedora-Minimal-armhfp-30-1.2-sda.raw
command line: virt-builder -v -x --get-kernel Fedora-Minimal-armhfp-30-1.2-sda.raw
virt-get-kernel --verbose -x --add 'Fedora-Minimal-armhfp-30-1.2-sda.raw'
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: add_drive "Fedora-Minimal-armhfp-30-1.2-sda.raw" "readonly:true" "protocol:file"
libguestfs: creating COW overlay to protect original drive content
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: disk_create "/tmp/libguestfsEd6WdG/overlay1" "qcow2" -1 "backingfile:/home/farias/Fedora-Minimal-armhfp-30-1.2-sda.raw"
…
 
$ sudo mv Fedora-Minimal-armhfp-30-1.2-sda.raw initramfs-5.0.9-301.fc30.armv7hl.img vmlinuz-5.0.9-301.fc30.armv7hl /var/lib/libvirt/images/.
 
$ sudo virt-install -v --name Fedora-Minimal-armhfp-30-1.2-sda.raw --ram 4096 --arch armv7l --import --os-variant fedora22 \
                     --disk /var/lib/libvirt/images/Fedora-Minimal-armhfp-30-1.2-sda.raw \
                     --boot kernel=/var/lib/libvirt/images/vmlinuz-5.0.9-301.fc30.armv7hl,initrd=/var/lib/libvirt/images/initramfs-5.0.9-301.fc30.armv7hl.img,kernel_args="console=ttyAMA0 rw root=LABEL=_/ rootwait"

File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in 
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

Pour fixer ce problème :

$ sudo rm -rf /usr/lib/python2.7/dist-packages/OpenSSL

$ sudo rm -rf /usr/lib/python2.7/dist-packages/pyOpenSSL-0.15.1.egg-info

$ sudo pip install pyopenssl

On reprends l’installation :

$ sudo virt-install -v --name Fedora-Minimal-armhfp-30-1.2-sda.raw --ram 4096 --arch armv7l --import --os-variant fedora22 \
                     --disk /var/lib/libvirt/images/Fedora-Minimal-armhfp-30-1.2-sda.raw \
                     --boot kernel=/var/lib/libvirt/images/vmlinuz-5.0.9-301.fc30.armv7hl,initrd=/var/lib/libvirt/images/initramfs-5.0.9-301.fc30.armv7hl.img,kernel_args="console=ttyAMA0 rw root=LABEL=_/ rootwait"

Pour l’instant j’ai un problème sur le lancement :

....
[  OK  ] Started udev Wait for Complete Device Initialization.
[  452.577419] audit: type=1130 audit(1568017972.419:65): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-udev-settle comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
         Starting Activation of DM RAID sets...
[  OK  ] Started Activation of DM RAID sets.
[  455.227583] audit: type=1130 audit(1568017975.069:66): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dmraid-activation comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  455.239316] audit: type=1131 audit(1568017975.081:67): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dmraid-activation comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  OK  ] Reached target Local Encrypted Volumes.
[  OK  ] Reached target Local File Systems (Pre).
         Mounting /boot...
[  456.625813] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[  OK  ] Mounted /boot.
         Mounting /boot/efi...
[  OK  ] Mounted /boot/efi.
[  OK  ] Reached target Local File Systems.
         Starting Tell Plymouth To Write Out Runtime Data...
         Starting Restore /run/initramfs on shutdown...
         Starting Create Volatile Files and Directories...
         Starting Rebuild Dynamic Linker Cache...
[  OK  ] Started Tell Plymouth To Write Out Runtime Data.
[  461.320751] audit: type=1130 audit(1568017981.162:68): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=plymouth-read-write comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  461.328420] audit: type=1131 audit(1568017981.170:69): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=plymouth-read-write comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  OK  ] Started Restore /run/initramfs on shutdown.[  461.762211] audit: type=1130 audit(1568017981.604:70): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dracut-shutdown comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
 
[  OK  ] Started Rebuild Dynamic Linker Cache.
[  468.259621] audit: type=1130 audit(1568017988.101:71): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=ldconfig comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  OK  ] Started Create Volatile Files and Directories.
[  470.643545] audit: type=1130 audit(1568017990.485:72): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-tmpfiles-setup comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
         Starting Security Auditing Service...
         Starting Rebuild Journal Catalog...
[  473.210959] audit: type=1305 audit(1568017993.053:73): audit_enabled=1 old=1 auid=4294967295 ses=4294967295 subj=system_u:system_r:auditd_t:s0 res=1
[  OK  ] Started Rebuild Journal Catalog.
         Starting Update is Completed...
[  OK  ] Started Update is Completed.
[  OK  ] Started Security Auditing Service.
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Reached target System Initialization.
[  OK  ] Started daily update of the root trust anchor for DNSSEC.
[  OK  ] Listening on SSSD Kerberos…ache Manager responder socket.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting NTP client/server...
         Starting firewalld - dynamic firewall daemon...
         Starting OpenSSH ecdsa Server Key Generation...
         Starting OpenSSH rsa Server Key Generation...
         Starting Initial Setup configuration program...
         Starting System Security Services Daemon...
[  OK  ] Started Hardware RNG Entropy Gatherer Daemon.
         Starting OpenSSH ed25519 Server Key Generation...
[  OK  ] Started dnf makecache --timer.
[  OK  ] Reached target Timers.
[ 2049.261075] fbcon: Taking over console
================================================================================
================================================================================
1) [x] Language settings                 2) [x] Time settings
       (English (United States))                (America/New_York timezone)
3) [x] Network configuration             4) [!] Root password
       (Wired (eth0) connected)                 (Password is not set.)
5) [!] User creation
       (No user will be created)

C’est super long pour avoir « fbcon » .

A suivre.

VirtualBox 6.0 : Crash à cause du partage

J’ai voulu lancer une installation sur une VM Windows à partir d’un fichier partagé …. mauvaise idée ! Misère. Un crash direct de la VM :

24:12:09.483364 VMMDev: Guest Log: VBOXNP: DLL loaded.
24:12:24.769005 GIM: HyperV: Guest indicates a fatal condition! P0=0x1e P1=0xffffffffc0000005 P2=0xfffff80174c50b20 P3=0x0 P4=0xffffffffffffffff
24:12:24.769028 GIMHv: BugCheck 1e {ffffffffc0000005, fffff80174c50b20, 0, ffffffffffffffff}
24:12:24.769029 KMODE_EXCEPTION_NOT_HANDLED
24:12:24.769029 P1: ffffffffc0000005 - exception code - STATUS_ACCESS_VIOLATION
24:12:24.769029 P2: fffff80174c50b20 - EIP/RIP
24:12:24.769029 P3: 0000000000000000 - Xcpt param #0
24:12:24.769030 P4: ffffffffffffffff - Xcpt param #1
24:12:28.610121 VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 4 seconds ago
24:12:30.376594 AHCI#0: Reset the HBA
24:12:30.376607 VD#0: Cancelling all active requests
24:12:30.376888 AHCI#0: Port 0 reset
24:12:30.377958 VD#0: Cancelling all active requests
24:12:42.755900 VMMDev: Guest Log: VBoxGuest: BugCheck! P0=0x1e P1=0xffffffffc0000005 P2=0xfffff80174c50b20 P3=0x0 P4=0xffffffffffffffff
24:12:42.756081 GIM: HyperV: Reset initiated through MSR
24:12:42.756090 Changing the VM state from 'RUNNING' to 'RESETTING'
24:12:42.757354 VMMDevNotifyGuest: fAddEvents=0x200 ignored because enmVMState=8
24:12:42.758367 GIM: HyperV: Resetting MMIO2 regions and MSRs
24:12:42.758416 PIT: mode=3 count=0x10000 (65536) - 18.20 Hz (ch=0)
24:12:42.758853 GUI: UISession::sltAdditionsChange: GA state really changed, notifying listeners
24:12:42.758941 GUI: UIMachineViewNormal::adjustGuestScreenSize: Adjust guest-screen size if necessary
24:12:42.758949 GUI: UISession::sltAdditionsChange: GA state change event came, notifying listeners
24:12:42.758952 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=0, Machine-state=5
24:12:42.758975 GUI: UISession::sltAdditionsChange: GA state change event came, notifying listeners
24:12:42.758979 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=0, Machine-state=5
24:12:42.759374 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000143cd4000 w=640 h=480 bpp=0 cbLine=0x140 flags=0x0 origin=0,0
24:12:42.768274 AHCI#0: Reset the HBA
24:12:42.768310 VD#0: Cancelling all active requests
24:12:42.768413 HDA: Codec reset
24:12:42.768421 HDA: Reset
24:12:42.769486 TM: Switching TSC mode from 'RealTscOffset' to 'Dynamic'
24:12:42.821163 Changing the VM state from 'RESETTING' to 'RUNNING'
24:12:42.822152 OHCI: root hub reset completed with VINF_SUCCESS
24:12:42.822890 VMMDev: Guest Log: BIOS: VirtualBox 6.0.10
24:12:42.822958 PCI: Setting up resources and interrupts
24:12:42.824793 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
24:12:42.831987 ERROR [COM]: aRC=VBOX_E_VM_ERROR (0x80bb0003) aIID={ab4164db-c13e-4dab-842d-61ee3f0c1e87} aComponent={DisplayWrap} aText={Could not take a screenshot (VERR_NOT_SUPPORTED)}, preserve=false aResultDetail=-37

J’ai donc fait un copier/coller sur le répertoire local.

Joplin & WebDav en HTTP : Recherche d’une solution …

J’ai découvert ce superbe logiciel : Joplin, et je l’ai utilisé de façon intensive jusqu’à ce que le WebDav en HTTP ne soit plus possible. Ensuite cela a été la galère pour synchroniser les notes. J’ai cru pendant un moment que le problème allait être rapidement corriger … mais non. Mon précédent POST sur le problème : https://www.cyber-neurones.org/2019/07/android-joplin-synchronisation-webdav-en-http-est-hs/ . Le problème est ouvert depuis le 17 juin, et on est le 8 septembre …

J’ai donc cherché une autre solution, c’est de faire la synchronisation via un logiciel tier sous Android : FolderSync . Mais la solution ne fonctionne pas, et je ne sais pas pourquoi …

Sur Folder Sync, j’ai bien le répertoire : /store/emulated/0/Joplin qui est complet :

Sur Joplin je pointe bien sur le même répertoire :

Misère.

UPDATE : SOLUTION :

J’ai effacé complètement Joplin, et j’ai relancer mon portable. Ceci a fixé mon problème … Bizarre. ( Le lien vers le POST sur le forum : https://discourse.joplinapp.org/t/android-issue-with-sync-by-file-system/3448 ).

NextCloud & WebDav : It can only be accessed by WebDAV clients such as the Nextcloud desktop sync client

Aie, petit problème .

Voici ma version :

$ sudo -u www-data php /var/www/html/nextcloud/occ status
  - installed: true
  - version: 16.0.4.1
  - versionstring: 16.0.4
  - edition: 

La liste des tests que j’ai fait avec curl afin de trouver la bonne url …

Test n°1 :

curl --user 'admin:rock64next' --key nextcloud.mtdc.key --cacert nextcloud.mtdc.crt https://nextcloud.mtdc/remote.php/webdav/
This is the WebDAV interface. It can only be accessed by WebDAV clients such as the Nextcloud desktop sync client

Test n°2 :

curl --user 'admin:rock64next' --key nextcloud.mtdc.key --cacert nextcloud.mtdc.crt https://nextcloud.mtdc/remote.php/dav/appinfo/v1/webdav.php


  Sabre\DAV\Exception\NotFound
  File not found: appinfo in 'root'

Test n°3 :

curl --user 'admin:rock64next' --key nextcloud.mtdc.key --cacert nextcloud.mtdc.crt https://nextcloud.mtdc/remote.php/dav/appinfo/v2/remote.php


  Sabre\DAV\Exception\NotFound
  File not found: appinfo in 'root'

Test n°3 :

curl --user 'admin:rock64next' --key nextcloud.mtdc.key --cacert nextcloud.mtdc.crt https://nextcloud.mtdc/remote.php/dav/appinfo/v1/webdav.php


  Sabre\DAV\Exception\NotFound
  File not found: appinfo in 'root'

Test n°4 :

 curl --user 'admin:rock64next' --key nextcloud.mtdc.key --cacert nextcloud.mtdc.crt https://nextcloud.mtdc/remote.php/apps/dav/appinfo/v2/remote.php

Test n°5 :

$ curl --user 'admin:rock64next' --key nextcloud.mtdc.key --cacert nextcloud.mtdc.crt https://nextcloud.mtdc/remote.php/dav/files/Joplin
This is the WebDAV interface. It can only be accessed by WebDAV clients such as the Nextcloud desktop sync client

Quelle fatigue ….