设为首页 收藏本站
查看: 432|回复: 0

[经验分享] Resize a VMWare disk (zz)

[复制链接]

尚未签到

发表于 2016-1-4 19:03:31 | 显示全部楼层 |阅读模式
  重新 设置 vmware 硬盘 大小 扩容 扩大 加大 增加

This blog post describes how you canresize your VMWare virtual disks.
  There are multiple ways to performthis task. Paul wrote me a comment saying that there is an easy way that Ididn't know before:VMWare Converter.So I added this info to mypost.
  AS ALWAYS, BEFORE YOU BEGIN, MAKESURE YOU HAVE A GOOD BACKUP!
  Method 1: Using VMWare Converter (tested with v3):

  • Turn off the virtual machine;
  • Start the VMWare Converter application;
  • Open the Convert Machine wizard;
  • Select 'standalone virtual machine' as the source anddestination system;
  • Choose 'Select volumes and resize to save or add space';
  • Enter a new size and voilá, you're done!
  Some say that the expand process is slow and that VMWare Tools might need to bereinstalled. A disadvantage is that Converter will create a new (many GB) copyof your VM.
  Method 2: Using the VDiskManager:

  • Turn off the virtual machine;
  • Commit/remove all the snapshots first! (I forgot to mention this, thanks JimO). Or make a Full Clone if you use Link Clones.
  • Open a Command Prompt and go to:
    C:\Program Files\VMWare\VMWare Server or C:\Program Files\VMware\VMware Workstation
  or for 64-bit
C:\Program Files (x86)\VMWare\VMWare Server or C:\Program Files(x86)\VMware\VMware Workstation

  • Run this command to expand the virtual disk:
    vmware-vdiskmanager -x 12GB "My harddisk.vmdk" (in this case, 12 GB will be the new size). The file name can contain spaces because of the double quotes.
  • Note: Because this only expands the disk and not the partition, you'll need to resize the partition table as well. This can be done by 3rd party tools like'Partition Magic', but alsowith'diskpart.exe', a built-in tool of Windows. VMWare provides a list of tools on their web site:http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004071

    I prefer to use Microsoft diskpart.exe and that’s where this post is about (more info).
  Instructions for Windows Vista, 7and 2008R2 are below!
  If your VM runs Windows 2000, XP,Server 2003 or Server 2003 R2
If your resized virtual disk isbootable, you cannot use diskpart from the virtual machine itself. Use a 3rdparty tool or use another virtual machine. Here I describe how to usediskpart.exe with a 2nd virtual machine.

  • Add the increased virtual hard disk to a second virtual machine;
  • Power on this 2nd virtual machine;
  • Open a Command Prompt and type:
    diskpart
  • Type:
    list volume

    Remember the volume number (#) of your volume!
  • Type:
    select volume <volume number> (the number from step 8)
  • Type:
    extend
  • Turn off this 2nd virtual machine and remove the virtual hard disk from the virtual machine configuration. This won't delete the hard disk file from disk;
  • Your now finished! You can boot your VM with the resized disk. Windows automatically recognizes the new and correct disk and volume size.
  
If your VM runs Windows Vista, Windows 7, Windows Server 2008 or WindowsServer 2008 R2
These versions of Windows ship with a more enhanced version of diskpart.exethat supports partition extension for bootable disks.

  • Power on your virtual machine;
  • Open a Command Prompt and type:
    diskpart
  • Type:
    list volume

    Remember the volume number (#) of your volume!
  • Type:
    select volume <volume number> (the number from step 8)
  • Type:
    extend
  • Your now finished! You do not have to reboot.
  
  Please leave me a comment about yourresults. If somebody has an advice, please post it. I'll add it to this post(with your name) so that others can benefit from it too.
  Hope this helps,
  Update 2008-04-23: Refreshed thepost. Fixed some spelling errors. Improved text formatting.
  Update 2008-06-12: Found anothergood site with up to 6 methods! Have a look here:http://vmware-land.com/Resizing_Virtual_Disks.html
  Update2009-08-26: Fixed a space in vmware-vdiskmanager, added x64-info and WindowsVista/7/2008R2 information
  

  重新 设置 vmware 硬盘 大小 扩容 扩大 加大 增加

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-160267-1-1.html 上篇帖子: Vmware虚拟主机上网设置 下篇帖子: 启动/停止VMWare服务
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表