2025-02-06

Synology Active Backup for Business for Hyper-V VM Failed to Backup #02

繼前一篇  Synology Active Backup for Business for Hyper-V VM Failed to Backup #01
取得 Patch 跳過了 5 個 Snapshots 的問題後

還是備份失敗

於是再用 Support Center App 產生 Active Backup for Business 的 Debug Log 後
在 ActiveBackup\volume1\@ActiveBackup\log\vm.log 中看到

synoabk_vm_backup[6175]: synoabk_vm::[WARNING] hyperv_agent.cpp:1381(6175,139923524343360) [6175]hypervisor_agent/hyperv_agent.cpp:145 {"error_class":"PowerShellException","error_message":"Missing an argument for parameter 'Id'. Specify a parameter of type 'System.Int32[]' and try again.","error_params":{"Activity":"Stop-Process","Category":5,"Reason":"ParameterBindingException","TargetName":"","TargetType":"","error_id":"MissingArgument,Microsoft.PowerShell.Commands.StopProcessCommand"},"success":false}

難道是 Powershell 語法錯誤少帶一個參數?

Synology Active Backup for Business for Hyper-V VM Failed to Backup #01

備份失敗了,說我的 Snapshot 數量超過 5 個所以不給備

Virtual machine VMName's snapshots have reached the maximum number (5).
You need to delete some snapshots on the device

但實際上根本就一個 Snapshot 也沒有

Synology 用 Support Center App 產生 Debug Log

在使用 Synology NAS 在發生問題時為了查原因
除了系統預設相當簡略的錯誤訊息以外,可以匯出詳細 Log 來 Debug

執行 Support Center App

切換到 Support Services 頁籤

Synology Active Backup for Business for Hyper-V VM List Blank

初次使用 Synology Active Backup for Business 的時候
Hyper-V Server 連線成功,但 VM 列表一片空白

用 Support Center App 產生 Active Backup for Business 的 Debug Log
在 dsm\var\log\synoscgi.log 找到以下錯誤訊息

Athena synoscgi_SYNO.ActiveBackup.Inventory_1_list_node[24340]:
[ERROR] main.cpp:212(24340,139646703461952)
Code: [0]
What: [[24340]hypervisor_agent/hyperv_agent.cpp:145
{"error_class":"PowerShellException","error_message":"std_out: b'[ //VM Information JSON// ]',
std_err:
Get-VM : Hyper-V encountered an error trying to access an object on computer 'HYPER-V-xxxxxx' because the object was 
not found. The object might have been deleted, or you might not have permission to perform the task. Verify that the 
Virtual Machine Management service on the computer is running. If the service is running, try to perform the task 
again by using Run as Administrator.
At line:3 char:1
+ Get-VM| Select Id,Name,MemoryStartup,ProcessorCount,State,Status,Prim ...
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (:) [Get-VM], VirtualizationException
    + FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.GetVM
 
Get-VM : Hyper-V encountered an error trying to access an object on computer 'HYPER-V-xxxxxx' because the object was 
not found. The object might have been deleted, or you might not have permission to perform the task. Verify that the Virtual Machine Management service on the computer is running. If the service is running, try to perform the task again by using Run as Administrator. At line:3 char:1 + Get-VM| Select Id,Name,MemoryStartup,ProcessorCount,State,Status,Prim ... + ~~~~~~ + CategoryInfo : ObjectNotFound: (:) [Get-VM], VirtualizationException + FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.GetVM, status_code: 1", "error_params":{"error_id":""},"success":false}]

2025-02-03

防止網頁在 Chrome 中被翻譯 Disable Google translate from HTML in Chrome

<!DOCTYPE html>
<html lang="en" class="notranslate" translate="no">
    <head>
        <meta name="google" content="notranslate" />
    </head>
        <body>
        ...
        </body>
</html>

出處: https://stackoverflow.com/questions/12238396/how-to-disable-google-translate-from-html-in-chrome

2025-01-14

Increase SoftEther RADIUS timeout to 60 seconds for 2FA/MFA

Modify the source code and compile it yourself

---------------------------------------------------------------------------------------------

src\Cedar\Radius.h

//#define RADIUS_RETRY_INTERVAL 500 // Retransmission interval
//#define RADIUS_RETRY_TIMEOUT (10 * 1000) // Time-out period

#define RADIUS_RETRY_INTERVAL 60000 // Retransmission interval
#define RADIUS_RETRY_TIMEOUT (60 * 1000) // Time-out period

---------------------------------------------------------------------------------------------

src\Cedar\Cedar.h

2025-01-02

Get All DHCP Lease Info

$DHCPServer = "DHCPServer.Contoso.com";
$DHCPScopes = Get-DhcpServerv4Scope -ComputerName $DHCPServer;
foreach ($Scope in $DHCPScopes) {
Get-DhcpServerv4Lease -ComputerName $DHCPServer -ScopeID $Scope.ScopeId;
};

Change Lease Duration 30 Days, 8 Hours, 9 Minutes, 10 Seconds

Set-DhcpServerv4Scope -ComputerName $DHCPServer -ScopeID $Scope.ScopeId -LeaseDuration "30.08:09:10";

2024-12-16

Workstation Server Cannot Start, Cannot Browse Network Share Folders and Printers

早上一堆人連不上網路資料夾或網路印表機
檢查發現 Workstation Service 起不來,說依存的服務沒起來或不存在

解決: 修改註冊機碼

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation

找到 DependOnService Multi-String

2024-12-10

所謂的 智慧應用程式控制 根本「智障」 Smart App Control (SAC) is acturally Stupid App Control (SAC)

近日遇到電腦 Join Domain 重開機後,結束 Windows Mark 的 Loading 階段後就畫面全黑也沒有顯示滑鼠游標更沒有顯示帳號登入畫面的慘烈情況。這個問題在全新安裝的 Windows 11 發生,如果是滿久之前安裝的電腦即使有安裝到最新的 Update / Hotfix 也沒有這個問題。

在連續重灌、加入網域都相同情況後,為了確認是否為 GPO 影響,將 Computer Account 搬移至一個測試用的空 OU,並將 GPO 逐次套用到該 OU 中用以確認是否是哪一個 GPO 影響。在這個測試過程中,因為無法有規律地複製出錯誤,於是決定開始在 Join Domain 後不立刻重新開機,而是執行 gpresult /r /scope computer 來看情況,並下 gpupdate /force 來確認有套用到 GPO,但卻偶然會開始在執行指令後出現: This program is blocked by Group Policy. For more info, contact your System Administrator. 的訊息,並且再也無法開啟任何應用程式,包含: cmd、notepad 等,任何應用程式。但問題此訊息似乎與套用到哪一個或哪些 GPO 無關。

2024-12-03

DFS-R 斷線過久不再進行複寫問題

EventLog DFS Replication 中出現 Event ID 4012

The DFS Replication service stopped replication on the folder with the following local path: C:\DFSR\Folder. This server has been disconnected from other partners for xxx days, which is longer than the time allowed by the MaxOfflineTimeInDays parameter (60). DFS Replication considers the data in this folder to be stale, and this server will not replicate the folder until this error is corrected. 

To resume replication of this folder, use the DFS Management snap-in to remove this server from the replication group, and then add it back to the group. This causes the server to perform an initial synchronization task, which replaces the stale data with fresh data from other members of the replication group. 

下指令:

查詢 MaxOfflineTimeInDays 設定值:
wmic.exe /namespace:\\root\microsoftdfs path DfsrMachineConfig get MaxOfflineTimeInDays