每月彙整:十二月 2023

pve 虛擬機檔案格式轉換

附命令用法 qemu-img convert -f -O 这里 -f 可以忽略。qemu-img会自动识别 vmdk转qcow2 qemu-img convert -O qcow2 test.vmdk test.qcow2 #qcow2转vmdk qemu-img convert -O vmdk test.qcow2 test.vmdk vdi转qcow2 qemu-img convert -O qcow2 test.vdi test.qcow2 vhd&vhdx转qcow2 qemu-img convert -O qcow2 test.vhdx test.qcow2 RAW转qcow2 qemu-img convert -O … 繼續閱讀 →

發表於 proxmox | 發表迴響

win11 修復 uefi

#bcdedit備分 bcdedit /export c:\boot.bak bcdedit /import c:\boot.bak #error 改壞 #path bcdedit /set path \win #recoverysequnce bcdedit /set recoveryenable no diskpart list disk #尋找內接硬碟 sel disk 0 list vol #find 100m fat32 sel vol 2 assign letter=v #設定磁區代碼 exit v: cd … 繼續閱讀 →

發表於 windows | 已標籤 | 發表迴響

winserver 2019 移除 Windows-Defender

#適用有GUI 1. Remove-WindowsFeature Windows-Defender,Windows-Defender-GUI # SERVER 用 2. Remove-WindowsFeature Windows-Defender

發表於 windows | 已標籤 | 發表迴響

製作 python 安裝套件腳本

#對套件快照 pip freeze > requirements.txt 可以複製一整個已經安裝的套件清單,但是輸出使用 python -m pip install 可以讀懂的格式。一個常見的慣例是放這整個清單到一個叫做 requirements.txt 的檔案 #對套件安裝 pip install -r requirements.txt requirements.txt 可以提交到版本控制,並且作為釋出應用程式的一部分。使用者可以透過 install -r 安裝對應的的套件

發表於 python | 發表迴響

python programming 判斷作業系統別

import platform os.name – 傳回 nt、posix、darwin (Mac OS X)、java (Jython) 等字串。 sys.platform – 帶有版號,例如 win32、linux2、darwin、java1.6.0_20 等,判斷時要用 startswith()。 platform.system() – 傳回 Windows、Linux、Darwin、Java 等字串。 ex: import platform as pt if pt.system() == ‘Windows’ import _winreg

發表於 python | 已標籤 | 發表迴響