VirtualBox : Problème lors de l’installation d’une nouvelle Box : -> VERR_CPUM_RAISE_GP_0!

80 x served & 15 x viewed

Ma version de VirtualBox: 6.1.18 et ma version de Windows : Windows 10 Entreprise OS Build 18363.1379 .

J’ai du faire ceci :

1-Lancer un prompt en Administrateur ;

2-Lancer la commande :

bcdedit /set hypervisorlaunchtype off

3-Faire un reboot :

shutdown -s -t 2

Voici les logs de Virtual Box qui plantait:

00:00:03.654980 Full Name: "Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz"
00:00:03.654981 TLB 2/4M Instr/Uni: res0 0 entries
00:00:03.654981 TLB 2/4M Data: res0 0 entries
00:00:03.654982 TLB 4K Instr/Uni: res0 0 entries
00:00:03.654982 TLB 4K Data: res0 0 entries
00:00:03.654982 L1 Instr Cache Line Size: 0 bytes
00:00:03.654983 L1 Instr Cache Lines Per Tag: 0
00:00:03.654983 L1 Instr Cache Associativity: res0
00:00:03.654983 L1 Instr Cache Size: 0 KB
00:00:03.654983 L1 Data Cache Line Size: 0 bytes
00:00:03.654984 L1 Data Cache Lines Per Tag: 0
00:00:03.654984 L1 Data Cache Associativity: res0
00:00:03.654984 L1 Data Cache Size: 0 KB
00:00:03.654985 L2 TLB 2/4M Instr/Uni: off 0 entries
00:00:03.654985 L2 TLB 2/4M Data: off 0 entries
00:00:03.654985 L2 TLB 4K Instr/Uni: off 0 entries
00:00:03.654986 L2 TLB 4K Data: off 0 entries
00:00:03.654986 L2 Cache Line Size: 0 bytes
00:00:03.654987 L2 Cache Lines Per Tag: 0
00:00:03.654987 L2 Cache Associativity: off
00:00:03.654987 L2 Cache Size: 0 KB
00:00:03.654988 TS - Temperature Sensor = 0 (0)
00:00:03.654989 FID - Frequency ID control = 0 (0)
00:00:03.654990 VID - Voltage ID control = 0 (0)
00:00:03.654990 TscInvariant - Invariant Time Stamp Counter = 1 (1)
00:00:03.654991 CBP - Core Performance Boost = 0 (0)
00:00:03.654992 EffFreqRO - Read-only Effective Frequency Interface = 0 (0)
00:00:03.654992 ProcFdbkIf - Processor Feedback Interface = 0 (0)
00:00:03.654993 ProcPwrRep - Core power reporting interface support = 0 (0)
00:00:03.654994 Physical Address Width: 39 bits
00:00:03.654994 Virtual Address Width: 48 bits
00:00:03.654994 Guest Physical Address Width: 0 bits
00:00:03.654995 Physical Core Count: 1
00:00:03.654996
00:00:03.654996 ******************** End of CPUID dump **********************
0:00:03.655008 VMEmt: Halt method global1 (5)
00:00:03.655098 VMEmt: HaltedGlobal1 config: cNsSpinBlockThresholdCfg=50000
00:00:03.655176 Changing the VM state from 'CREATING' to 'CREATED'
00:00:03.656076 Changing the VM state from 'CREATED' to 'POWERING_ON'
00:00:03.656236 AIOMgr: Endpoints without assigned bandwidth groups:
00:00:03.656252 AIOMgr: E:\LIVECD\OracleLinux-R8-U3-x86_64-dvd.iso
00:00:03.656258 AIOMgr: E:\Oracle Linux 8.3\Oracle Linux 8.3.vdi
00:00:03.656697 Changing the VM state from 'POWERING_ON' to 'RUNNING'
00:00:03.656717 Console: Machine state changed to 'Running'
00:00:03.658838 VMMDev: Guest Log: BIOS: VirtualBox 6.1.18
00:00:03.659012 PCI: Setting up resources and interrupts
00:00:03.664606 ERROR [COM]: aRC=VBOX_E_VM_ERROR (0x80bb0003) aIID={4680b2de-8690-11e9-b83d-5719e53cf1de} aComponent={DisplayWrap} aText={Could not take a screenshot (VERR_NOT_SUPPORTED)}, preserve=false aResultDetail=-37
00:00:03.690437 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:03.706765 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=720 h=400 bpp=0 cbLine=0x0 flags=0x0 origin=0,0
00:00:03.709342 VMMDev: Guest Log: CPUID EDX: 0x178bfbff
00:00:03.709485 PIIX3 ATA: Ctl#0: RESET, DevSel=0 AIOIf=0 CmdIf0=0x00 (-1 usec ago) CmdIf1=0x00 (-1 usec ago)
00:00:03.709529 PIIX3 ATA: Ctl#0: finished processing RESET
00:00:03.712679 AHCI#0: Reset the HBA
00:00:03.712694 VD#0: Cancelling all active requests
00:00:03.712851 AHCI#0: Port 0 reset
00:00:03.712929 VD#0: Cancelling all active requests
00:00:03.713609 VMMDev: Guest Log: BIOS: AHCI 0-P#0: PCHS=16383/16/63 LCHS=1024/255/63 0x000000000a36f580 sectors
00:00:03.717731 PIT: mode=2 count=0x48d3 (18643) - 64.00 Hz (ch=0)
00:00:03.745810 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000000f300000 w=640 h=480 bpp=32 cbLine=0xA00 flags=0x0 origin=0,0
00:00:04.157989 GUI: UIMachineViewScale::resendSizeHint: Restoring guest size-hint for screen 0 to 800x600
00:00:04.158041 VMMDev: SetVideoModeHint: Got a video mode hint (800x600x32)@(0x0),(1;0) at 0
00:00:04.161243 GUI: 2D video acceleration is disabled
00:00:04.161314 GUI: HID LEDs sync is enabled
00:00:06.200584 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:06.200907 VMMDev: Guest Log: BIOS: Boot : bseqnr=1, bootseq=0023
00:00:06.205053 VMMDev: Guest Log: BIOS: Booting from CD-ROM...
00:00:06.212463 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=720 h=400 bpp=0 cbLine=0x0 flags=0x0 origin=0,0
00:00:06.265354 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000000f300000 w=640 h=480 bpp=24 cbLine=0x780 flags=0x0 origin=0,0
00:00:09.954650 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=720 h=400 bpp=0 cbLine=0x0 flags=0x0 origin=0,0
00:00:10.635396 VMMDev: Guest Log: BIOS: KBD: unsupported int 16h function 03
00:00:10.635672 VMMDev: Guest Log: BIOS: AX=0305 BX=0000 CX=0000 DX=0000
00:00:10.636346 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=81
00:00:10.636666 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=81
00:00:10.637007 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=82
00:00:10.637332 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=82
00:00:10.637672 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=83
00:00:10.637991 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=83
00:00:10.638335 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=84
00:00:10.638654 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=84
00:00:10.638994 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=85
00:00:10.639343 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=85
00:00:10.639737 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=86
00:00:10.640057 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=86
00:00:10.640404 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=87
00:00:10.640723 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=87
00:00:10.641063 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=88
00:00:10.641385 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=88
00:00:10.641725 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=89
00:00:10.642044 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=89
00:00:10.642389 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=8a
00:00:10.642709 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=8a
00:00:10.643172 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=8b
00:00:10.643494 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=8b
00:00:10.643908 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=8c
00:00:10.644298 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=8c
00:00:10.644639 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=8d
00:00:10.644956 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=8d
00:00:10.645295 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=8e
00:00:10.645612 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=8e
00:00:10.645949 VMMDev: Guest Log: int13_harddisk_ext: function 41, unmapped device for ELDL=8f
00:00:10.646291 VMMDev: Guest Log: int13_harddisk: function 02, unmapped device for ELDL=8f
00:00:10.981711 GIM: KVM: VCPU 0: Enabled system-time struct. at 0x000000004c401000 - u32TscScale=0xc587b80f i8TscShift=-1 uVersion=2 fFlags=0x1 uTsc=0x46ba43e2f uVirtNanoTS=0x1b496aa89 TscKHz=2592008
00:00:10.981754 TM: Host/VM is not suitable for using TSC mode 'RealTscOffset', request to change TSC mode ignored
00:00:11.616013 GIM: KVM: Enabled wall-clock struct. at 0x000000004c400000 - u32Sec=1615824502 u32Nano=683849407 uVersion=2
00:00:11.665390 PIT: mode=2 count=0x4a9 (1193) - 1000.15 Hz (ch=0)
00:00:11.776216 MsrExit/0: 0010:ffffffffabe64d98/LM: WRMSR 00000033, 20000000:00000000 -> VERR_CPUM_RAISE_GP_0!

Ubuntu : Pour la recherche de photos en double findimagedupes

114 x served & 7 x viewed

L’utilitaire est simple d’utilisation :

findimagedupes -R Nextcloud/Photos/

Le plus important c’est le paramètre -t qui permet d’indiquer le pourcentage de similitude. Par défaut c’est 90% , je conseille de mettre 98%.

Il faut le faire ne deux étapes, première étape :

fdupes -r Nextcloud/Photos/

Pour supprimer les fichiers 100% identiques, le logiciel est bien plus rapide. Ensuite on peut utiliser findimagedupes

Les sources : https://gitlab.com/opennota/findimagedupes

 

Python : Creation de PNG à base de CSV, avec des EXIF de localisation

117 x served & 5 x viewed

J’ai fait un petit programme pour faire des PNG à l’aide d’un fichier CSV. Le but est de mettre des balises sur Google Picture.

Voici un exemple de fichier CSV :

$ cat list.csv 
Nom,Année,Mois,Jours,Lieux,Pays
Deplacement sur Paris,2018,11,01,Paris,France
Deplacement sur Londres,2011,11,01,London,UK

Voici le programme :

from PIL import Image, ImageDraw, ImageFont
import piexif
from datetime import datetime
import csv
from geopy.geocoders import Nominatim
from GPSPhoto import gpsphoto

geolocator = Nominatim(user_agent="Your_Name")

with open('list.csv') as csv_file:
    csv_reader = csv.reader(csv_file, delimiter=',')
    line_count = 0
    for row in csv_reader:
        if line_count == 0:
            line_count += 1
        else:
            name = '%s \n Le %d/%d/%d \n a %s,%s . :' % (str(row[0]),int(row[1]),int(row[2]),int(row[3]),str(row[4]),str(row[5]))
            print('\t %s ' % name)
            line_count += 1
            filename = 'image-%d.jpg' % (line_count)

            img = Image.new('RGB', (1024, 800), color = (73, 109, 137))

            d = ImageDraw.Draw(img)
            fontsize = 80 
            font = ImageFont.truetype('/usr/share/fonts/truetype/msttcorefonts/Arial.ttf', fontsize)
            d.text((10,10), name, font=font)
            img.save(filename)

            exif_dict = piexif.load(filename)
            new_date = datetime(int(row[1]), int(row[2]), int(row[3]), 0, 0, 0).strftime("%Y:%m:%d %H:%M:%S")
            exif_dict['0th'][piexif.ImageIFD.DateTime] = new_date
            exif_dict['Exif'][piexif.ExifIFD.DateTimeOriginal] = new_date
            exif_dict['Exif'][piexif.ExifIFD.DateTimeDigitized] = new_date
            exif_bytes = piexif.dump(exif_dict)
            piexif.insert(exif_bytes, filename)
            address= '%s,%s' % (row[4], row[5])
            location = geolocator.geocode(address)
            print('\t\t %f %f %d' % (location.latitude, location.longitude, location.altitude))
            photo = gpsphoto.GPSPhoto(filename)
            info = gpsphoto.GPSInfo((location.latitude, location.longitude), alt=int(location.altitude), timeStamp=new_date)
            photo.modGPSData(info, filename)

    print('Processed %d lines.' % line_count)


Pour qu’il fonctionne il faut avoir installé :

# pip install geopy
# pip install GPSPhoto
# pip install exifread

Pour l’installation des fonts sous Ubuntu :

# sudo apt-get install gsfonts gsfonts-other gsfonts-x11 ttf-mscorefonts-installer t1-xfree86-nonfree fonts-alee ttf-ancient-fonts fonts-arabeyes fonts-arphic-bkai00mp fonts-arphic-bsmi00lp fonts-arphic-gbsn00lp fonts-arphic-gkai00mp fonts-atarismall fonts-dustin fonts-f500 fonts-sil-gentium ttf-georgewilliams ttf-isabella fonts-larabie-deco fonts-larabie-straight fonts-larabie-uncommon ttf-sjfonts ttf-staypuft ttf-summersby fonts-ubuntu-title ttf-xfree86-nonfree xfonts-intl-european xfonts-jmk xfonts-terminus

Pour vérifier :

# exiftool image-2.jpg 
ExifTool Version Number         : 11.88
File Name                       : image-2.jpg
Directory                       : .
File Size                       : 36 kB
File Modification Date/Time     : 2021:02:22 14:55:29+01:00
File Access Date/Time           : 2021:02:22 14:55:30+01:00
File Inode Change Date/Time     : 2021:02:22 14:55:29+01:00
File Permissions                : rw-rw-r--
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Resolution Unit                 : None
X Resolution                    : 1
Y Resolution                    : 1
Exif Byte Order                 : Big-endian (Motorola, MM)
Modify Date                     : 2018:11:01 00:00:00
Date/Time Original              : 2018:11:01 00:00:00
Create Date                     : 2018:11:01 00:00:00
GPS Latitude Ref                : North
GPS Longitude Ref               : East
GPS Altitude Ref                : Above Sea Level
GPS Time Stamp                  : 00:00:00
GPS Processing Method           : GPS
GPS Date Stamp                  : 2018:11:01
Image Width                     : 1024
Image Height                    : 800
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Image Size                      : 1024x800
Megapixels                      : 0.819
GPS Altitude                    : 0 m Above Sea Level
GPS Date/Time                   : 2018:11:01 00:00:00Z
GPS Latitude                    : 48 deg 51' 24.11" N
GPS Longitude                   : 2 deg 21' 5.26" E
GPS Position                    : 48 deg 51' 24.11" N, 2 deg 21' 5.26" E

 

Oracle Linux 8.2 : Installation de redis.so pour PHP 7.2

73 x served & 10 x viewed

Voici l’erreur que j’avais :

# php -v
PHP Warning:  PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib64/php/modules/redis.so (/usr/lib64/php/modules/redis.so: undefined symbol: zval_used_for_init), /usr/lib64/php/modules/redis.so.so (/usr/lib64/php/modules/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 7.2.24 (cli) (built: Oct 22 2019 08:28:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

La procédure d’installation :

# yum install glibc glibc-devel gcc-c++
# yum install php-devel
# yum install make
# pecl install redis
# yum install curl-devel
# yum install php-json
# pecl install phalcon

Encore une erreur :

# php -v
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/redis.so' (tried: /usr/lib64/php/modules/redis.so (/usr/lib64/php/modules/redis.so: undefined symbol: php_json_decode_ex), /usr/lib64/php/modules//usr/lib64/php/modules/redis.so.so (/usr/lib64/php/modules//usr/lib64/php/modules/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Je déplace le module redis pour qu’il soit lancé en dernier :

# mv /etc/php.d/redis.ini /etc/php.d/40-redis.ini
# systemctl restart php-fpm.service

Et au final ;

# php -v
PHP 7.2.24 (cli) (built: Oct 22 2019 08:28:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

Maintenant cela fonctionne correctement, la version de Oracle Linux :

# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.2 (Ootpa)