| [ | mood |
| | crazy | ] |
Все еще ничего в Hyper-V только вот резать вменяемым образом диски виртуальные никоим образом невозможно. А производственная необходимость в таких вещах как уменьшение 100гб дисков до 45гб - есть.
Для начала изменения размеров мне понадобилось сделать дефрагментацию диска в самой гостевой ОС, потом загрузившись в winPE нашинковать зарезать том (diskpart -> ... shrink ....), а дальше отличной утилитой с vmtools.com VHD Resize уже отрезать сам VHD-файл.
Тут всё выглядит просто и тривиально, кроме того что штатные средства windows 2000\XP\2003 и даже Vista\2008 НЕ хотят правильно дефрагментировать складывая все файлы в начало диска. Они оставляют где-то под самый конец диска кучку "дефрагментированных" файлов. Радостно говоря об успешной дефрагментации. А это не позволяет зарезать том :( Я посмотрел в сторону windows 7 и сделал приятное открытие. Дефрагментатор сильно "обновился". теперь есть опция позволяющая консолидировать свободное пространство. Причем называется ключик также как в прошлых версиях ОС, только выполняет совершенно другую функцию.
Vista\2008: C:\>defrag Windows Disk Defragmenter Copyright (c) 2006 Microsoft Corp. Description: Locates and consolidates fragmented files on local volumes to improve system performance. Parameters: <volume> Specifies the drive letter or mount point path of the volume to be defragmented or analyzed. -c Defragments all volumes on this computer. -a Performs fragmentation analysis only. -r Performs partial defragmentation (default). Attempts to consolidate only fragments smaller than 64 megabytes (MB). -w Performs full defragmentation. Attempts to consolidate all file fragments, regardless of their size. -f Forces defragmentation of the volume when free space is low. -v Specifies verbose mode. The defragmentation and analysis output is more detailed.
Windows 7: X:\windows\system32>defrag Microsoft Disk Defragmenter Copyright (c) 2007 Microsoft Corp. Description: Locates and consolidates fragmented files on local volumes to improve system performance. Parameters: /a Perform analysis on the specified disks. /c Perform the operation on all disks. /d Perform defragmentation on the specified disks. /e Perform the operation on all disks except those specified. /f Perform free space consolidation on the specified disks. /h Run the operation at higher priority. /r Run the operation on each disk in parallel. /t Track an operation already in progress on the specified disk. /u Print the progress of the operation on the screen. /v Print verbose output containing the disk's fragmentation statistics. |