Chia Sẽ Kinh Nghiệm Về IT



Tìm Kiếm Với Google
-


Gởi Ðề Tài Mới  Gửi trả lời
 
Công Cụ Xếp Bài
Tuổi 30-12-2009, 11:47 AM   #1
hoctinhoc
Guest
 
Trả Lời: n/a
How to Expand a Microsoft Virtual Hard Disk File
How to Expand a Microsoft Virtual Hard Disk File

Bài 1:




Have you ever created a virtual machine hard disk file, installed the operating system and configured everything the way you want only to find out there is not enough room to install the applications you need on the virtual computer because of lack of space? Now there is an easy way to grow to the size of the virtual hard disk (.VHD) file and extend the operating system or other disk partitions without a complete system rebuild. Read on to find out how.




Difficulty: Moderate
Instructions

Things You'll Need:

  • VMTOOLKIT.COM VHDRESIZER
  • Microsoft .NET Framework 2.0 installed on your computer
  • Microsoft Virtual Server 2005 R2 SP1
  • Optional (
  • Windows PE or BartPE CD or .ISO image)

  1. Step 1
    First, obtain VHD Resizer from VMTOOLKIT.COM. Download the .zip compressed file, extract the .msi file to a temporary location ie: C:\temp and install it. Follow the default installation prompts. Click 'Close' to complete the installation.
  2. Step 2
    Run VHDResize.exe, browse and select the .VHD file from your Virtual Machine directory that you wish to expand.
  3. Step 3
    Select the location you wish to store the new .VHD file in and enter the name of the new .VHD file you are going to create.
  4. Step 4
    Determine the type (fixed or dynamic) of .VHD file you are expanding/creating and enter the size of the new .VHD file.
  5. Step 5
    Click Expand and wait for process to complete.
  6. Step 6
    Click Exit to close the program.
  7. Step 7
    After the virtual drive has been expanded you will need to expand the partition(s) within the virtual drive. To do this will require DISKPART.EXE from Microsoft.
  8. Step 8
    There are three software packages you can use to mount the new virtual drive file to expand the partition. BartPE, Windows PE or Microsoft Virtual Server 2005 R2 SP1. BartPE and Microsoft Virtual Server are free while Windows PE requires special licensing from Microsoft. Choose whichever software package is best suited to your needs.
  9. Step 9
    To expand the virtual drive using BartPE or Windows PE see my article: How to extend the size of VMware disk file on VMware Server or Workstation. For this article I will use Microsoft Virtual Server. Download Microsoft Virtual Server 2005 R2 SP1 from Microsoft, http://www.microsoft.com/virtualserver.
  10. Step 10
    Install Virtual Server using a custom install, selecting only VHD Mount or from a RUN box or command prompt type: msiexec /i "Virtual Server 2005 Install.msi" /qn ADDLOCAL=VHDMount and press 'Enter'.
  11. Step 11
    Open a command prompt window and navigate to C:\Program Files\Microsoft Virtual Server\VHDMount. Mount the .VHD file using the following commands:

    vhdmount /m /f (path and name of .vhd file)
  12. Step 12
    Run diskpart to expand disk.

    c:\>DISKPART --> press Enter
    DISKPART> type 'list disk' --> press Enter
    DISKPART> type 'list volume' --> press Enter
    DISKPART> type 'select volume=#' (where # is the number of the volume you wish to extend) --> press Enter
    DISKPART> type 'extend' --> press Enter to extend the disk file.
    DISKPART> type 'detail volume' --> press Enter to verify the size of the new partition.
    DISKPART> type 'exit' --> press Enter to exit diskpart.
  13. Step 13
    To dismount the .VHD file, type vhdmount /u (path and name of file)
  14. Step 14
    Attach new .VHD file to virtual machine.
Bài 2:


Have you ever created a virtual hard disk and reached the allocated hard disk space?
If the answer is yes, you will be glad to know the problem can be fixed irrespective of the disk type (dynamic or fixed).
In order to accomplish the task you require two tools for resizing and merging. VHD Resizer is a resizing tool that creates an additional partition on a virtual hard disk. Gparted is a disk utility used to merge multiple partitions.
1. Resize a Full Virtual Hard Disk


Figure 1: Resizing virtual hard disk using VHD Resizer

After completion of the resize load the new virtual hard disk into Virtual PC or Virtual Server and view the Disk Management console. Notice how there is an extra 9GB (difference between existing 16384 MB and the 25 GB)

Figure 2: Disk Management Console

2. Merge Disk Partitions

  • Download Gparted from http://gparted-livecd.tuxfamily.org/
  • Capture the Gparted iso image into the virtual machine that requires the disk partitions to be merged
    • Click on CD from the Virtual PC 2007 Console
    • Click Capture ISO Image

Figure 3: Capturing gparted iso image

  • Restart the virtual machine

Figure 4: Gparted boot menu

  • Select Gparted-liveCD Force VESA driver from the boot menu

  • Press Enter on prompt from command line

  • Press Enter on prompt from command line

Figure 5: Merge Disk Partitions

  • Select the main partition using the TAB key
  • Select the resize/move button
  • Press enter

Figure 6: Specify size of merged disks

  • Enter the new size to be equal to the maximum size i.e. 30718
  • Select the Resize/Move button
  • Press Enter

Figure 7: View Merge Disk

  • Select the Apply button
  • Press Enter

  • Select the Apply button
  • Press Enter

  • Select the Close button
  • Press Enter





Source:


http://martyg.com.au/2008/01/05/resi...al-hard-disks/

http://www.ehow.com/how_5730329_expa...disk-file.html




  Trả lời ngay kèm theo trích dẫn này
Gửi trả lời



Quyền Hạn Của Bạn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Hình Cảm xúc đang Mở
[IMG] đang Mở
Mã HTML đang Tắt




Bây giờ là 10:32 PM. Giờ GMT +7



Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.