Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 
(연관된 글이 2개 있습니다.)
(시리즈 글이 2개 있습니다.)
개발 환경 구성: 43. Hyper-V VHD 파일 크기 확장하는 방법
; https://www.sysnet.pe.kr/2/0/711

개발 환경 구성: 44. VHD 파일 크기 확장하는 방법 - 두 번째 이야기
; https://www.sysnet.pe.kr/2/0/717





VHD 파일 크기 확장하는 방법 - 두 번째 이야기


예전에, Hyper-V에서 VHD 파일 크기 확장하는 방법에 대해서 설명을 드렸지요.

Hyper-V VHD 파일 크기 확장하는 방법
; https://www.sysnet.pe.kr/2/0/711

이번에도 다른 VM의 VHD파일이 최대 크기에 도달해서 확장해야 할 일이 있었는데, 불행히도 Windows Server 2003에서 제공되는 디스크 관리자에서는 "Extend Volume..."이라는 메뉴를 제공하지 않았습니다.

[그림 1: "Extend Volume..." 메뉴가 없는 Windows Server 2003]
extend_vhdsize_win2003_1.png

물론, 약간의 검색으로 문제는 해결되었습니다.

Extend Boot Partition in VHD
; http://vmtoolkit.com/forums/thread/206.aspx

댓글에 보면 다음과 같이 해결책을 제시해 주고 있습니다.

Re: Extend Boot Partition in VHD 
Reply Quote 
I created a virtual image of Windows 2003 R2 with antivirus and service packs then burned it to DVD so I would have a base image without taking up HD space on the server (WAIK is probably better, but I haven’t tried it yet).  It seemed like a great idea until I realized that the VHD was setup for 50GB.  So I did some research and found a pretty simple way to deal with this issue:

 
First, to make things easier on myself, I used VHDResizer to create a new VHD and copy the existing VHD into the new size.  This increases the HD size, but not the partition (keep the original around until you complete the process, just in case).

 
Second, I used VHDmount to mount the VHD and used diskpart.exe from the host to expand the VHD’s partition.  Shut down the guest VM.  In the host, open the command prompt and type ‘cd Program Files\Microsoft Virtual Server\Vhdmount’

 
Mount the image

C:\>Program Files\Microsoft Virtual Server\Vhdmount>vhdmount /m “C:Documents and Settings\All Users\Documents\Shared Virtual Machines\<server name>\<server name>.vhd” <drive letter>
Start diskpart

C:\>Program Files\Microsoft Virtual Server\Vhdmount>diskpart
Expand the partition

DISKPART>list disk
DISKPART>select disk 3 -----check the number in the list
DISKPART>list part
DISKPART>select part 1 -----check the number in the list
DISKPART>extend
DISKPART>list part -----check the new size
DISKPART>exit
Dismount and save changes

C:\>Program Files\Microsoft Virtual Server\Vhdmount>vhdmount /u /c “C:Documents and Settings\All Users\Documents\Shared Virtual Machines\<server>\<server>.vhd”
 
After booting up the VHD again, you’ll be prompted to restart since Windows installed new hardware (your new HD).  After reboot, your new HD partition should be ready.

그러다가 가만히 생각해 보니, Windows Server 2008이 있는 사람이라면 굳이 diskpart를 이용하지 않더라도 해결이 가능한 방법이 있습니다. 어차피 VHD이니까, VM을 종료하고 해당 VHD 파일을 Windows Server 2008(VM 또는 호스트 머신)에 하드 디스크로 인식시킨 다음 디스크 관리자에서 확장을 시켜주면 되는 것입니다.



[이 토픽에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]

[연관 글]






[최초 등록일: ]
[최종 수정일: 6/27/2021]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




... 151  152  [153]  154  155  156  157  158  159  160  161  162  163  164  165  ...
NoWriterDateCnt.TitleFile(s)
1224정성태1/21/201237193개발 환경 구성: 139. 아마존 EC2에 새로 추가된 "1년 무료 Windows 서버 인스턴스"가 있다는데, 직접 만들어 볼까요? ^^ [11]
1223정성태1/20/201227249.NET Framework: 296. 괜찮은 문자열 해시함수? - 두 번째 이야기 [1]파일 다운로드1
1222정성태1/18/201234980.NET Framework: 295. 괜찮은 문자열 해시 함수? [4]파일 다운로드1
1221정성태1/17/201223937오류 유형: 147. System.Runtime.InteropServices.COMException (0x80005000)
1220정성태1/15/201224079.NET Framework: 294. Master web.config 파일을 수정하려면?파일 다운로드1
1219정성태1/15/201226517.NET Framework: 293. Microsoft PowerPoint 슬라이드를 HTML 파일로 ".files" 폴더 없이 저장하는 방법 (C# 코드)파일 다운로드1
1218정성태1/15/201238950.NET Framework: 292. RSACryptoServiceProvider의 공개키와 개인키 구분 [1]파일 다운로드2
1217정성태1/14/201241086.NET Framework: 291. .NET에서 WAV, MP3 파일 재생하는 방법 [1]파일 다운로드1
1216정성태1/14/201229787오류 유형: 146. Microsoft Visual C++ 재배포 패키지 - 설치 로그 남기는 방법 [1]
1215정성태1/9/201227339제니퍼 .NET: 20. 제니퍼 닷넷 적용 사례 (3) - '닷넷'이 문제일까? '닷넷 개발자'가 문제일까? [6]
1214정성태1/3/201224192제니퍼 .NET: 19. 제니퍼 닷넷 설치/제거 방법 - IIS
1213정성태12/31/201124141.NET Framework: 290. WCF - 접속된 클라이언트의 IP 주소 알아내는 방법 - 두 번째 이야기
1212정성태12/31/201124234오류 유형: 145. The trust relationship between this workstation and the primary domain failed.
1211정성태12/31/201128992.NET Framework: 289. WindowsFormsHost를 사용하는 XBAP 응용 프로그램파일 다운로드1
1210정성태12/30/201148033.NET Framework: 288. FFmpeg.exe를 이용한 C# 동영상 인코더 예제 [9]파일 다운로드1
1209정성태12/29/201122658개발 환경 구성: 138. BizTalk 2006 설치 방법
1208정성태12/28/201145630.NET Framework: 287. Excel Sheet를 WinForm에서 사용하는 방법 [8]파일 다운로드2
1207정성태12/26/201124928.NET Framework: 286. x86/x64로 구분된 코드를 포함하는 경우, 다중으로 어셈블리를 만들어야 할까요?파일 다운로드1
1206정성태12/25/201125950.NET Framework: 285. Shader 강좌와 함께 배워보는 XNA Framework (3) - 텍스처 매핑 예제파일 다운로드1
1205정성태12/25/201131687.NET Framework: 284. Thread 개체의 Interrupt와 Abort의 차이점파일 다운로드1
1204정성태12/22/201125150.NET Framework: 283. MEF를 ASP.NET에 성능 손실 없이 적용하려면? [7]
1203정성태12/21/201125551제니퍼 .NET: 18. MEF가 적용된 ASP.NET 웹 사이트를 제니퍼 닷넷으로 모니터링 해본 결과! [6]
1202정성태12/21/201125944오류 유형: 144. The database '...' cannot be opened because it is version 661.
1201정성태12/14/201141002디버깅 기술: 47. .NET Reflector를 이용한 "소스 코드가 없는" 어셈블리 디버깅 [4]
1200정성태12/11/201126906디버깅 기술: 46. Windbg 확장 DLL 만들기 (2) - Debugger Extension API 사용파일 다운로드1
1199정성태12/11/201128216VC++: 55. JNI DLL 컴파일 시 x86과 x64의 Export된 함수의 이름이 왜 다를까요? [2]파일 다운로드1
... 151  152  [153]  154  155  156  157  158  159  160  161  162  163  164  165  ...