VHD工具-VHDTOOL
因為想對Hyper-V上Guest?VM的VHD進行擴容.開始想找有沒有online的辦法,結果發現網上都說需要把VM關機后通過Disk?configure?extend?.后來發現MSDN?Archive上有個叫VHDTool.exe?的工具,可以快速對VHD文件進行操作,比如?新建?,擴展,轉換.速度還很快.經過試驗后,確實很好用:)
?
附上使用方法:
VhdTool.exe?/create?<FileName>?<Size>?[/quiet]
VhdTool.exe?/convert?<FileName>?[/quiet]
VhdTool.exe?/extend?<FileName>?<NewSize>?[/quiet]
VhdTool.exe?/repair?<BaseVhdFileName>?<FirstSnapshotAVhdFileName>?[/quiet]
Create:?Creates?a?new?fixed?format?VHD?of?size?<Size>.
????????WARNING?-?this?function?is?admin?only?and?bypasses
????????file?system?security.??The?resulting?VHD?file?will
????????contain?data?which?currently?exists?on?the?physical?disk.
Convert:?Converts?an?existing?RAW?disk?p_w_picpath?file?to?a?fixed-format?VHD.
?????????The?existing?file?length,?rounded?up,?will?contain?block?data
?????????A?VHD?footer?is?appended?to?the?current?end?of?file.
Extend:?Extends?an?existing?fixed?format?VHD?to?a?larger?size?<Size>.
?????????WARNING?-?this?function?is?admin?only?and?bypasses
?????????file?system?security.??The?resulting?VHD?file?will
?????????contain?data?which?currently?exists?on?the?physical?disk.
Repair:?Repairs?a?broken?Hyper-V?snapshot?chain?where?an?administrator
????????has?expanded?the?size?of?the?root?VHD.??The?base?VHD?will?be
????????returned?to?its?original?size.?THIS?MAY?CAUSE?DATA?LOSS?if?the
????????contents?of?the?base?VHD?were?changed?after?expansion.
Example:
新建?一個1G左右大小的Test.VHD
vhdtool.exe?/create?D:\Test.vhd?1000000000
把test.vhd?擴展到2G左右
vhdtool.exe?/extend?D:\test.vhd?2000000000
后面size的計算是根據byte大小,和實際產生的文件會有誤差.
?
下面是原文地址:
http://archive.msdn.microsoft.com/vhdtool
?
?
?
?
轉載于:https://blog.51cto.com/yeppfly/1231526
總結
以上是生活随笔為你收集整理的VHD工具-VHDTOOL的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: days matter怎么用
- 下一篇: 社保是什么意思