성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] Java - How to use the Foreign Funct...
[정성태] 제가 큰 실수를 했군요. ^^; Delegate를 통한 Bein...
[정성태] Working with Rust Libraries from C#...
[정성태] Detecting blocking calls using asyn...
[정성태] 아쉽게도, 커뮤니티는 아니고 개인 블로그입니다. ^^
[정성태] 질문이 잘 이해가 안 됩니다. 우선, 해당 소스코드에서 ILis...
[양승조
] var대신 dinamic으로 선언해서 해결은 했습니다. 맞는 해...
[양승조
] 또 막혔습니다. ㅠㅠ var list = props[i].Ge...
[양승조
] 아. 감사합니다. 어제는 안됐던것 같은데....정신을 차려야겠네...
[정성태] "props[i].GetValue(props[i])" 코드에서 ...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
제니퍼 .NET
닷넷
COM 개체 관련
스크립트
VC++
VS.NET IDE
Windows
Team Foundation Server
디버깅 기술
오류 유형
개발 환경 구성
웹
기타
Linux
Java
DDK
Math
Phone
Graphics
사물인터넷
부모글 보이기/감추기
내용
<div style='display: inline'> <h1 style='font-family: Malgun Gothic, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>Hyper-V Generation 1 유형의 VM을 Generation 2 유형으로 바꾸는 방법</h1> <p> 이에 관해 검색하면 다음과 같은 글이 나옵니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Hyper-V upgrade generation 1 to generation 2 ; <a target='tab' href='https://www.savernova.com/en/docs/manuals/activeimage-protector/hyper-v-upgrade-generation-1-to-generation-2-en'>https://www.savernova.com/en/docs/manuals/activeimage-protector/hyper-v-upgrade-generation-1-to-generation-2-en</a> </pre> <br /> 정리해 볼까요? ^^<br /> <br /> <hr style='width: 50%' /><br /> <br /> Gen1에서 Gen2로 바꾸기 위해 가장 중요한 요건은 (VM의) 하드 디스크가 <a target='tab' href='https://www.sysnet.pe.kr/2/0/10913'>MBR 파티션</a>이 아닌 GPT 파티션이어야 한다는 점입니다.<br /> <br /> GPT 파티션으로 바꾸는 것은,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Convert an MBR disk into a GPT disk ; <a target='tab' href='https://learn.microsoft.com/en-us/windows-server/storage/disk-management/change-an-mbr-disk-into-a-gpt-disk'>https://learn.microsoft.com/en-us/windows-server/storage/disk-management/change-an-mbr-disk-into-a-gpt-disk</a> </pre> <br /> 윈도우의 "Disk Management"나 diskpart.exe로도 가능하지만, 여기서 문제는 앞선 2가지 방법은 기존 디스크의 내용을 모두 초기화해야 한다는 것에 있습니다.<br /> <br /> 우리는 동작하던 VM의 디스크를 바꾸는 것이기 때문에 당연히 초기화해서는 안 되는데, 다행히 마이크로소프트에서 이런 경우를 위한 변환 도구를 제공하므로,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > MBR2GPT.EXE ; <a target='tab' href='https://learn.microsoft.com/en-us/windows/deployment/mbr-to-gpt'>https://learn.microsoft.com/en-us/windows/deployment/mbr-to-gpt</a> </pre> <br /> 이것을 사용해 기존 VM의 vhdx 디스크를 (내부 자료 초기화 없이) 변환해 줄 수 있습니다. 하지만, 여기서 다시 문제가 있습니다. ^^ GPT로 변환하려면 해당 디스크를 offline으로 만들어야 하는데, 이는 곧, 현재 해당 VM이 부팅 중에는 mbr2gpt.exe를 실행할 수 없다는 것을 의미합니다.<br /> <br /> 그래서 "<a target='tab' href='https://learn.microsoft.com/en-us/windows-server/storage/disk-management/change-an-mbr-disk-into-a-gpt-disk'>Convert an MBR disk into a GPT disk</a>" 글에서는, GPT 변환 작업을 위해 Recovery 모드로 부팅을 하는데요, 재미있는 건 ISO 설치 디스크 이미지 중에서 mbr2gpt.exe를 내장한 것은 Windows 10/11이라는 점입니다.<br /> <br /> 따라서, Windows Server 2012가 설치된 VM을 Gen2로 바꾸고 싶어도 Windows 10+ (최소 1909 버전 이상의) 설치 이미지를 구해야 합니다. (아마도 윈도우 서버 버전의 경우 2019부터 제공할 텐데, 2019 VM 정도면 애당초 Gen2로 만들었을 것입니다. ^^) 일단, 어떻게든 mbr2gpt가 있는 이미지를 구했으면 VM에 CD 이미지로 연결한 다음 재부팅해 설치 모드로 진입합니다.<br /> <br /> 이후 ("Install" 버튼 대신) "Repair your computer" 링크를 통해 "Troubleshoot" / "Command Prompt"를 띄운 후, 다음과 같은 과정으로 mbr2gpt 실행을 합니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > X:\Srouces> <span style='color: blue; font-weight: bold'>cd X:\Windows\System32</span> X:\Windows\System32> <span style='color: blue; font-weight: bold'>mbr2gpt /validate /disk:0</span> MBR2GPT: Attempting to validate disk 0 MBR2GPT: Retrieving layout of disk MBR2GPT: Validating layout, disk sector size is: 512 bytes MBR2GPT: Validation completed successfully X:\Windows\System32> <span style='color: blue; font-weight: bold'>mbr2gpt /validate /disk:0</span> If conversion is successful the disk can only be booted in GPT mode. These changes cannot be done! MBR2GPT: Attempting to convert disk 0 MBR2GPT: Retrieving layout of disk MBR2GPT: Validating layout, disk sector size is: 512 bytes MBR2GPT: Backing up the system partition MBR2GPT: Creating the EFI system partition MBR2GPT: Installing the new boot files MBR2GPT: Performing the layout conversion MBR2GPT: Migrating default boot entry MBR2GPT: Adding recovery boot entry MBR2GPT: Fixing driver letter mapping MBR2GPT: Conversion completed successfully Call WinReRepair to repair WinRE MBR2GPT: Failed to update ReAgent.xml, please try to manually disable and enable WinRE. MBR2GPT: Before the new system can boot properly you need to switch the firmware to boot to UEFI mode! </pre> <br /> 혹은, 제가 해보진 않았지만 VM의 vhdx 이미지를 분리해 Hyper-V에 설치된 또 다른 Windows 10 VM에 붙인 다음 그 안에서 디스크를 offline 시키고 mbr2gpt.exe를 실행해도... 아마 될 것입니다. ^^<br /> <br /> 이렇게 디스크가 준비되었으면, 남은 작업은 새롭게 Generation 2 VM을 껍데기만 새롭게 생성한 다음 (mbr2gpt로 변환한) Gen1 VM의 디스크 이미지(vhdx)를 연결하면 됩니다.<br /> <br /> <hr style='width: 50%' /><br /> <br /> 참고로, Gen2로 바꾼 경우의 장/단점은 아래의 글에서 소개하고 있습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Should You create a generation 1 or 2 virtual machine in Hyper-V? ; <a target='tab' href='https://www.linkedin.com/pulse/should-you-create-generation-1-2-virtual-machine-gaby-machaalany/'>https://www.linkedin.com/pulse/should-you-create-generation-1-2-virtual-machine-gaby-machaalany/</a> </pre> <br /> <ul> <li>Faster boot times: Generation 2 virtual machines use UEFI firmware, which allows them to boot faster than generation 1 virtual machines.</li> <li>Improved hardware support: Generation 2 virtual machines support a wider range of hardware devices, including those that require UEFI support, such as some network adapters and storage controllers.</li> <li>Enhanced security features: Generation 2 virtual machines support features such as Secure Boot and Trusted Platform Module (TPM), which can help to secure the virtual machine and the host system.</li> <li>Improved performance: Generation 2 virtual machines may offer improved performance compared to generation 1 virtual machines, particularly for workloads that rely on hardware acceleration or require high I/O throughput.</li> </ul> <br /> 다른 건 상관없는데, 성능이 나아진다는 것 하나만으로도 Gen2로 옮길 충분한 이유가 됩니다.<br /> <br /> <hr style='width: 50%' /><br /> <br /> 마지막으로, mbr2gpt를 offline 시키지 않은 디스크에 대해 실행하면 이런 오류 메시지가 나옵니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > C:\Windows\system32> <span style='color: blue; font-weight: bold'>mbr2gpt /validate /disk:0</span> ERROR: MBR2GPT can only be used from the Windows Preinstallation Environment. Use /allowFullOS to override. C:\Windows\system32> <span style='color: blue; font-weight: bold'>mbr2gpt /validate /disk:0 /allowFullOS</span> MBR2GPT: Attempting to validate disk 0 MBR2GPT: Retrieving layout of disk MBR2GPT: Validating layout, disk sector size is: 512 bytes Disk layout validation failed for disk 0 </pre> </p><br /> <br /><hr /><span style='color: Maroon'>[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
1241
(왼쪽의 숫자를 입력해야 합니다.)