Skip to main content

Lỗi hyper-v could not delete a temporary version of this virtual machine

Gặp lỗi hyper-v could not delete a temporary version of this virtual machine
Trong quá trình vận hành ảo hóa Hyper-V đôi lúc chúng ta cần phải thực hiện 1 số công tác di dời - đồng bộ máy ảo để bảo trì, thay thế server vật lý thật.
Và rủi ro trong khi đang di dời thì 1 trong số các server Source (tạm gọi Host1) và Destination (tạm gọi Host2) bị problem (mất kết nối, shutdown, reboot, crash v.v..) làm cho việc move hoặc replicate chưa kịp hoàn tất. Khi resume lại công tác đó chúng ta sẽ gặp 1 số lỗi như "hyper-v could not delete a temporary version of this virtual machine" hoặc chỉ là "failed"

  • Nguyên nhân:

Do khi bắt đầu công tác move - replicate thì máy chủ Host1 sẽ tiến hành copy các bộ xml của máy ảo lên máy chủ Host2, và khi chúng ta resume sau sự cố thì các file xml này vẫn còn tồn tại trên server Host2, dù rằng trong console quản lý Hyper-V không thấy (do chưa hoàn tất nên chưa hiện lên thôi).

  • Xử lý:

Bạn vào C:\ProgramData\Microsoft\Windows\Hyper-V (trên Host2), tìm các thư mục có chữ "Planned":

    • Planned Snapshots
    • Planned Snapshots Cache
    • Planned Virtual Machines
    • Planned Virtual Machines Cache

 Vào bên trong các thư mục này và xóa hêt các file .symlink

 Và cả file .xml

Sau khi delete các file này xong, chay Run -  Services.msc để vào console quản lý services và restart lại Hyper-V Virtual Machine Management trên cả 2 server Host1 và Host2

Sau cùng, chạy lại công tác Move hoặc Replicate như bình thường

Những lưu ý: để công tác move/replicate ít lỗi thì mình nên dọn các máy ảo gọn gàng bằng cách xóa bớt các snapshot cũ nếu không dùng nữa, khi đó thì dung lượng máy ảo sẽ giảm đi rất nhiều. VD trường hợp mình từ 500GB giảm còn khoảng 150GB.

Chúc thành công




Comments

Popular posts from this blog

[RAID] SWITCH FROM AHCI TO RAID WITH INTEL C600 CONTROLLER

I personally have used other ways to do this. Manipulating some registry settings in combination with a safe boot before booting normally does the trick as well. This works with both SATA SSD and M.2 NVMe drives and it enables relatively fast switching between back and forth between AHCI and RAID. I have described this method below.  I have also tried the same process used to switch from RAD to AHCI and that works as well. Switch to safe boot Reboot into BIOS Change from AHCI to RAID in the BIOS Boot into safe mode Turn off safe mode and reboot normally again Nothing else and that also did the trick, just like with moving from RAID to AHCI.  So the link above and my step by step below is here for completeness. You have options in case one of them doesn’t work! Step by step AHCI to RAID registry method This procedure I describe below works on Windows 10 1803/1809 and has been tested on Dell Latitude E6220 an XPS 13 9360. Editing the registry is...

LỖI KHÔNG TẠO PIN CODE ĐỂ DÙNG HELLO LOGIN

Lỗi  0x801C044D khi khởi tạo PIN code  Nguyên nhân:  Authorization token does not contain device ID Tham khảo:  https://docs.microsoft.com/en-us/windows/security/identity-protection/hello-for-business/hello-errors-during-pin-creation Cách xử lý:  Unjoin the device from Azure AD and rejoin. Làm như sau: Vào Settings > Accounts > Access work or school Disconnect tất cả các tài khoản link với Azure (Cloud) Reboot lại máy

ĐỊNH NGHĨA MỚI VỀ VPN

Nhu cầu kết nối nhanh chóng, đơn giản mà lại an toàn làm "đẻ" ra các kỹ thuật VPN mới: VPN truyền thống : cần 1 VPN server để tiếp nhận connection từ endpoint. VPN hiện đại : Mạng riêng ảo phi tập trung Decentralized Private Network (DPN), ứng dụng công nghệ Block -chain Các branding: Deeper Network : thiết bị đầu tiên áp dụng công nghệ DPN Tailscale : dùng công nghệ Peer VPN (P2P)