Skip to main content

LỖI HYPER-V “FAILED TO CHANGE CURRENT STATE”


LỖI “FAILED TO CHANGE CURRENT STATE”
Hôm nay mình có thao tác mount cái disk máy ảo (VHDX) rồi copy và create file trực tiếp trong cái disk ảo đó (mounted-disk)
Dẫn đến là sau khi start lại VM thì báo lỗi “Failed to change current state”. Nguyên nhân là do việc copy & tạo file trực tiếp trong mounted-disk làm cho disk không còn đúng trạng thái ban đầu.
Image result for failed to change current state
Máy ảo này có 2 disk: disk 1 làm OS, disk 2 làm Data.Tìm hiểu kỹ hơn bằng tính nằng “Inspect disk” thì phát hiện disk 1 bị lỗi “Property ‘MaxinternalSize’ does not exist in class ‘Msvm_VirtualHardDiskSettingData’.”



Nguyên nhân như đã nói ở trên, nó làm cho các bản Checkpoint (Snapshot) mất link với Disk gốc (Parent disk)
Để khắc phục, chúng ta cần dùng lệnh Set-VHD để link Checkpoint với Parent Disk
·        Cần chạy lệnh với quyền Administrator “Run as administrator
·        set-vhd "D:\Hyper-V-Replica\Virtual Hard Disks\XXX-disk1_66FBC729-1B9D-411E-BF3E-3F704A1343B0.avhdx"-ParentPath "D:\Hyper-V-Replica\Virtual Hard Disks\XXX-disk1_3EC8B1CA-590D-465A-870B-94E745064622.avhdx"
·        Làm tuần tự từng checkpoint, vd: Check3 -> Check2 -> Check1 -> ParentDisk
Nếu gặp lỗi “ID Mismatch” thì thêm “-IgnoreMismatch
Sau khi link toàn bộ checkpoint thành công thì có thể start lại máy VM bình thườ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

CÀI ĐẶT NGINX PROXY MANAGER TRÊN UBUNTU 22

  CÀI ĐẶT NGINX PROXY MANAGER TRÊN UBUNTU 22 Link: https://azdigi.com/blog/en/linux-server-en/web-server/how-to-install-nginx-proxy-manager-with-docker-compose-on-ubuntu-22-04/ First, you need to create a directory containing the project and create a  docker-compose.yml  file for Nginx Proxy Manager with the following commands in turn:     AZDIGI Tutorial mkdir /home/nginxproxymanager cd /home/nginxproxymanager nano docker-compose.yml Enter the content below and save it. version: '3' services: app: image: 'jc21/nginx-proxy-manager:latest' restart: unless-stopped ports: - '80:80' - '81:81' - '443:443' environment: DB_MYSQL_HOST: "db" DB_MYSQL_PORT: 3306 DB_MYSQL_USER: "npm" DB_MYSQL_PASSWORD: "npm" DB_MYSQL_NAME: "npm" volumes: - ./data:/data - ./letsencrypt:/etc/letsencrypt db: image: 'jc21/mariadb-aria:latest...