安装好的虚拟机扩展磁盘容量大磁盘

&nbsp>&nbsp
&nbsp>&nbsp
&nbsp>&nbsp
虚拟机增加磁盘大小
摘要:我用的是VMwareworkstation10。首先先在vmware中增加磁盘空间大小。点击虚拟机-》设置-》硬盘-》实用工具。。。这样增加了之后只是增加了实际可用的空间,但是在虚拟机中的系统的分区大小是没改变的。我安装的虚拟机为ubuntu12.04,没有分区。。。要扩展/dev/sda1,要使用分区修改工具:gparted(http://jaist.dl.sourceforge.net/project/gparted/gparted-live-stable/0.16.
我用的是VMware workstation 10。
首先先在vmware中增加磁盘空间大小。点击虚拟机-》设置-》硬盘-》实用工具。。。
这样增加了之后只是增加了实际可用的空间,但是在虚拟机中的系统的分区大小是没改变的。
我安装的虚拟机为ubuntu 12.04, 没有分区。。。要扩展/dev/sda1,要使用分区修改工具:gparted(http://jaist.dl.sourceforge.net/project/gparted/gparted-live-stable/0.16.1-1/gparted-live-0.16.1-1-i486.iso)。修改bios,使用上面下载到的iso镜像作为启动方式,然后进入一直确认,直到进入到gparted的图形操作界面。先把交换分区删除(因为交换分区紧跟着sda1,要扩展sda1必须先删除交换分区),然后选择sda1,点击resize,设置你想要的大小。最后再把交换分区放在sda1的后面,保存操作,重启即可。
以上是的内容,更多
的内容,请您使用右上方搜索功能获取相关信息。
若你要投稿、删除文章请联系邮箱:zixun-group@service.aliyun.com,工作人员会在五个工作日内给你回复。
云服务器 ECS
可弹性伸缩、安全稳定、简单易用
&40.8元/月起
预测未发生的攻击
&24元/月起
为您提供0门槛上云实践机会
你可能还喜欢
你可能感兴趣
阿里云教程中心为您免费提供
虚拟机增加磁盘大小相关信息,包括
的信息,所有虚拟机增加磁盘大小相关内容均不代表阿里云的意见!投稿删除文章请联系邮箱:zixun-group@service.aliyun.com,工作人员会在五个工作日内答复
售前咨询热线
支持与服务
资源和社区
关注阿里云
International新手园地& & & 硬件问题Linux系统管理Linux网络问题Linux环境编程Linux桌面系统国产LinuxBSD& & & BSD文档中心AIX& & & 新手入门& & & AIX文档中心& & & 资源下载& & & Power高级应用& & & IBM存储AS400Solaris& & & Solaris文档中心HP-UX& & & HP文档中心SCO UNIX& & & SCO文档中心互操作专区IRIXTru64 UNIXMac OS X门户网站运维集群和高可用服务器应用监控和防护虚拟化技术架构设计行业应用和管理服务器及硬件技术& & & 服务器资源下载云计算& & & 云计算文档中心& & & 云计算业界& & & 云计算资源下载存储备份& & & 存储文档中心& & & 存储业界& & & 存储资源下载& & & Symantec技术交流区安全技术网络技术& & & 网络技术文档中心C/C++& & & GUI编程& & & Functional编程内核源码& & & 内核问题移动开发& & & 移动开发技术资料ShellPerlJava& & & Java文档中心PHP& & & php文档中心Python& & & Python文档中心RubyCPU与编译器嵌入式开发驱动开发Web开发VoIP开发技术MySQL& & & MySQL文档中心SybaseOraclePostgreSQLDB2Informix数据仓库与数据挖掘NoSQL技术IT业界新闻与评论IT职业生涯& & & 猎头招聘IT图书与评论& & & CU技术图书大系& & & Linux书友会二手交易下载共享Linux文档专区IT培训与认证& & & 培训交流& & & 认证培训清茶斋投资理财运动地带快乐数码摄影& & & 摄影器材& & & 摄影比赛专区IT爱车族旅游天下站务交流版主会议室博客SNS站务交流区CU活动专区& & & Power活动专区& & & 拍卖交流区频道交流区
白手起家, 积分 145, 距离下一级还需 55 积分
论坛徽章:0
物理主机ESXI 5,虚拟机WINDOWS 2008,安装虚拟2008分配了2T空间。安装好之后,只分了C、D两个区。现在因为业务数量备份量很大,D盘空间不够。想通过增加第二块盘来解决。现在的问题是如何将第二块盘的容量直接扩到D盘里呢?
ESXI5为啥分配磁盘空间最大只有2TB?
请有过这方面经验的哥们分享一下经验。谢谢
腰缠万贯, 积分 9890, 距离下一级还需 110 积分
论坛徽章:13
这位朋友,我正好使用i5版本,我虽没有遇到此问题。下面的文章对你有用
ESX/ESXi 3.x/4.x hosts do not support 2-terabyte LUNs
If you present a 2-terabyte (TB) or larger LUN to one or more ESX/ESXi hosts, you may experience these symptoms:
•You are unable to create a datastore on the LUN
•The ESX/ESXi host does not assign a block device to the LUN
•VMkernel log messages may indicate that the ESX/ESXi host cannot read the capacity of the LUN
•The ESX/ESXi host does not report the correct size on an RDM larger than 2TB
•VirtualCenter or vCenter Server reports incorrect size for the LUN
•When attempting to vMotion a virtual machine using an RDM 2TB or larger from an ESX/ESXi 3.5 to an ESX/ESXi 4.0 host fails. These error messages are found in the vmware.log of the virtual machine:
vmx| Msg_Post: Error vmx| [msg.scsi.esx.diskTooBig] Disks bigger than 2TB - 512B are not supported. vmx| [msg.scsi.esx.virtualDevFailed] Unable to create virtual SCSI device for scsi#:#, '/vmfs/volumes/&datastore&/&vm&/&disk&.vmdk' vmx| [msg.moduletable.powerOnFailed] Module DevicePowerOn power on failed.
•In the VMKernel Logs of the ESX Host you see one or more lines similar to this:
vmkernel: 0:00:41:40.802 cpu1:4177)WARNING: ScsiDeviceIO: 1462: Device 'naa.7cc807e60bf': Capacity (numBlocks=0x105e40000) exceeds maximum supported device size of 2TB - 512 Bytes
Note: A cold migration to an ESX 4.0 host followed by a power on attempt has a similar result.
•In vCenter Server 4.0 or later, you see this error:
Error during the configuration of the host: Failed to update disk partition information.
•In the hostd.log file, you see entries similar to:
[F57E1B90 verbose 'HostsvcPlugin' opID=3E815AF8-e] Failed to get disk partition information for /vmfs/devices/disks/naa.7cc807e60bf
[F5AF5B90 warning 'Partitionsvc' opID=3E815AF8-] Unable to get partition information for /vmfs/devices/disks/naa.7cc807e60bf
[F5AF5B90 warning 'Partitionsvc' opID=3E815AF8-] Status : 255
Error : A bug has been detected in GNU Parted. Refer to the web site of parted
for more informations of what could be useful for bug submitting! Please email a bug report to
containing at least the version (1.8.1) and the following message: Unable to determine the size of /vmfs/devices/disks/7cc807e60bf (Numerical result out of range). Unable to get device /vmfs/devices/disks/7cc807e60bf
Note: As of ESXi 5.0, support for LUNs larger then 2TB is available with both VMFS5 datastores and Physical-mode RDMs. However, virtual disks used in virtual machines and Virtual-mode RDMs are still limited to 2TB - 512 bytes. For more information, see vSphere 5 FAQ: VMFS-5 (2003813).
The largest LUN size which can be presented to an ESX/ESXi host is 2TB - 512 bytes. This limitation is outlined in the Configuration Maximums guide for the appropriate version of ESX/ESXi.
Understanding the Limitation
VMware ESX and ESXi uses the SCSI-2 standard. As per the SCSI-2 standard, ESX uses a READ_CAPACITY (10-byte) call which returns a 32-bit number to represent the size of the LUN.
Although the call is capable of returning a 32-bit number, only the 0x to 0xfffffffe values can be used. The value 0xffffffff is reserved.
Based on the standard, the largest valid LUN capacity support is (2^32)-1 sectors. This is the math involved in the calculation:
If we take the above number and multiply it by 512 bytes per sector we get the size limitation in bytes:
The limit of 2TB translates to:
&#295 sectors
&#255040 bytes
Raw Device Mapping Limit
In the case of physical mode RDMs, the SCSI traffic sent by the guest operating system to do reads or writes is passed through by the VMware ESX storage layer to the underlying storage. This allows some guests to break the 2-terabyte limit, but this is an unsupported configuration because the storage stack of the ESX is not designed to handle such capacity.
Note: When migrating and powering on virtual machines, ESX/ESXi 4.0 enforces the 2TB - 512 bytes limit. ESX 3.5 does not enforce this limit.
Workaround
Although the LUN size is limited to 2TB - 512 bytes, the VMFS and datastore volume size limit is much greater. The maximum volume size is 64TB - 16KB. This can be accomplished by leveraging the maximum extents (32) per volume.
If you require a single datastore that is larger than 2TB - 512 bytes in size, you may want to add extents so that the datastore resides on multiple LUNs of 2 TB - 512 bytes or less.
For information on extents, see the ESX Configuration Guide.
Considerations
Keep these considerations in mind when implementing the workaround:
•Once you add an extent to a datastore, you cannot remove the extent.
•The maximum file size which can reside on a datastore is based on the block size of the filesystem. The maximum block size for VMFS version 3 (used by ESX3 and ESX4) is 8MB, which limits the maximum file size to 2TB - 512 bytes in size. For more information about the maximum file size, see the Configuration Maximums for the appropriate version of ESX.
If you install ESX 3.5 Update 4 on a host that has a local disk larger than 2TB, you may have trouble booting. For more information, see Mounting root fails after installing ESX 3.5 when local storage exceeds the 2 terabyte limit (1012757).
腰缠万贯, 积分 9890, 距离下一级还需 110 积分
论坛徽章:13
VMFS-5 Overview
Why switch to VMFS-5?
•VMFS-5 has improved scalability and performance.
•VMFS-5 does not use SCSI-2 Reservations, but uses the ATS VAAI primitives.
•VMFS-5 uses GPT (GUID Partition Table) rather than MBR, which allows for pass-through RDM files greater than 2TB.
•Newly created VMFS-5 datastores use a single block size of 1MB.
•VMFS-5 has support for very small files (&1KB) by storing them in the metadata rather than in the file blocks.
•VMFS-5 uses sub-blocks of 8K rather than 64K, which reduces the space used by small files.
•VMFS-5 uses SCSI_READ16 and SCSI_WRITE16 cmds for I/O (VMFS-3 used SCSI_READ10 and SCSI_WRITE10 cmds for I/O).
What are the limitations for VMFS-5?
•VMFS-5 still limits the number of extents to 32 and the total datastore size to 64TB, but the individual extents are no longer limited to 2TB each. For example, a datastore can be created with a LUN size of 64TB, or a datastore can be created with up to 32 extents up to maximum size of 64TB.
•Only pass-through RDMs can be created with a size &2TB. Non-pass-through RDMs and virtual disk files are still limited to 512B ~ 2TB.
&#8226assthrough RDMs are supported up to ~60TB in size.
•Both upgraded and newly-created VMFS-5 volumes supported the larger Passthrough RDM size.
Non-passthrough RDMs are still limited to 2TB minus 512B.
白手起家, 积分 145, 距离下一级还需 55 积分
论坛徽章:0
谢谢楼主的文章~~~~
白手起家, 积分 145, 距离下一级还需 55 积分
论坛徽章:0
能否将第二块盘空间直接扩容到第一块盘的E盘里呢?
(33.06 KB, 下载次数: 9)
21:12 上传
腰缠万贯, 积分 9890, 距离下一级还需 110 积分
论坛徽章:13
当然是没问题的。
看这篇文章
白手起家, 积分 145, 距离下一级还需 55 积分
论坛徽章:0
本帖最后由 jkdkungfu 于
18:03 编辑
dengbao2001 发表于
当然是没问题的。
看这篇文章
谢谢,按照你给的帖子看了一下。扩展卷选择不了。倒是把新加的两块盘扩展了。
(247.38 KB, 下载次数: 4)
18:03 上传
腰缠万贯, 积分 9890, 距离下一级还需 110 积分
论坛徽章:13
确保你至少有一个没有分配的分区可用,才可以扩展。
从你截图看,你的磁盘全用光了,所以在无法扩展
白手起家, 积分 145, 距离下一级还需 55 积分
论坛徽章:0
dengbao2001 发表于
确保你至少有一个没有分配的分区可用,才可以扩展。
谢谢你的回复,不过我这边确实扩展不了。因为我新加的两块盘联机初始化后,并没有分区使用。直接在E盘上右键里“扩展卷”灰白的,选择不了。
腰缠万贯, 积分 9890, 距离下一级还需 110 积分
论坛徽章:13
测试过,无法再不同磁盘进行扩容的。
你可以讲新的磁盘挂载在E盘的一个空目录,然后使用这个目录
为了测试你这个,我的电脑都挂了,刚弄好
北京盛拓优讯信息技术有限公司. 版权所有 京ICP备号 北京市公安局海淀分局网监中心备案编号:22
广播电视节目制作经营许可证(京) 字第1234号
中国互联网协会会员&&联系我们:
感谢所有关心和支持过ChinaUnix的朋友们
转载本站内容请注明原作者名及出处我们经常会碰到安装了虚拟机之后,因为安装软件的增多或者其他原因,虚拟磁盘空间不足够的情况.
  这里,来简单说说调整虚拟磁盘大小的方法。这些方法均来自互联网资料.
& & &注:必须要先关闭虚拟机电源.
通过VMware Workstation直接修改虚拟机。
然后继续,提示& 创建新的虚拟磁盘,使用现有及使用物理磁盘&3种选择.
物理磁盘就是直接指定宿主机上的物理磁盘分区,这里无意义. 现有的虚拟磁盘可以使用其他虚拟机中的磁盘空间.
我们这里选择创建新的虚拟空间
继续之后,选择磁盘类型,这里直接使用推荐类型,IDE类型可能更适用用物理磁盘吧.
再继续之后就是新磁盘空间的大小配额了.确定之后完成.
扩展虚拟磁盘
扩展虚拟磁盘大小的方式比添加硬盘更方便,相当于新增加了一个未分配的磁盘分区.与新增硬盘的挂载不同,因为是在当前硬盘上扩展的分区。
这里我们可以看到2者明显的区别. 扩展磁盘大小将当前硬盘由80G提升到90G,而新增硬盘是新挂载一个硬盘(10G).
我们进入虚拟机,通过计算机-管理-磁盘管理,可以看到如下:
未分配的都是新增加的空间,1是扩展当前硬盘的分区,2个新增加的硬盘. 这里可以直接右键菜单创建分区即可使用.
注:如果需要将新增的分区合并到一个分区.这里推荐使用Diskgen工具.关于这款工具的强大,这里不叙述.可以直接通过拖动来调整大小,很简单而且好用.这里的重点不在此.
提供下载链接.... &
通过VM自带的磁盘管理器使用命令参数调整大小.
VM自带的磁盘管理工具.vmware-vdiskmanager.exe ,位置在安装目录下.
通过CMD命令,直接CD到VMware的安装目录,为了方便,我们直接拖这个工具到CMD窗口中.如图:
然后通过, -x 参数,来调整指定虚拟机的大小,注:这里的是调整大小,不是增加的大小,因此这里只能大于当前磁盘的大小.这个命令如下:
C:\&"D:\VMware\VMware Workstation\vmware-vdiskmanager.exe" -x 100GB "D:\VMware\Windows 7\Windows 7 x64.vmdk"
为了避免空格,需要对目录加上""双引号. &-x 后是调整之后的大小. 后面的是指定的虚拟机配置文件.
这里的效果等同于上面的扩展硬盘大小(因为虚拟机中已经存在2个分区,所以这种方式只能新增了一个未分配的分区
PS: 当扩展磁盘新分区的时候,如果提示&there is not enough space on the file system for the selected operation
意思是没有足够的空间,这个空间是指虚拟机所在的物理磁盘的剩余空间与调整之后的空间大小计算的.比如 虚拟机Windows 7在物理盘D分区中, D盘的剩余空间是100G,这时候该虚拟机最大能调整的磁盘大小只能是100G...&
VMware Workstation中的硬盘设置还可以压缩硬盘空间和碎片整理,可以做清理之用
关于怎么减少虚拟磁盘的大小,那是后话的......
阅读(...) 评论()第七下载是国内最新、最齐、最安全的软件下载基地!
当前位置:
Unlocker211是VMware苹果虚拟机解锁工具,很多朋友不知道如何解...
授权:免费软件类型:系统其它评分:6.0环境:WinXP, Win7, Win8, Win10语言:国产软件时间:
VMWare虚拟机强制非正常关闭后磁盘错误的解决办法
日 & 作者:佚名 & 来源:本站整理 & 浏览:1078 & 评论: &
很多人为了各种目的电脑上都安装了VMWARE虚拟机软件,或者直接在服务器上安装了VMWARE,但有些时候可能由于各种异常情况导致电脑非正常关机,而来不及关闭虚拟机,或者关机时忘记先关闭虚拟机,导致配置文件没有及时更新,VMWARE虚拟机出现如下的报错信息 ERROR:'This virtual machine appears to be in use'。那遇到这种情况我们怎么办呢?以下就是第七下载为您提供的解决方法!
在日常使用VMware虚拟机中我们可能会因为这样或那样的问题强制结束虚拟机进程甚至是强制关机断电等。
不过强制关机或断电可能引发的问题就是虚拟机损坏,出现损坏的话虚拟机即无法正常启动需要重装或修复。
通常当你尝试启动虚拟机时提示:指定的虚拟磁盘需要进行修复,那么这就说明虚拟机的磁盘已经发生错误。
解决方案适用于以下情况:
1、强制关闭物理机例如长按电源按钮强制关机以及断电等引起的虚拟机提示磁盘需要修复;
2、虚拟机本身在发生故障致使自动关闭后再次启动时虚拟机提示磁盘需要进行修复等等;
3、启动虚拟机提示无法打开磁盘某某某或依赖的某个快照磁盘、虚拟磁盘需要进行修复等。
以下是解决办法:
各个版本操作系统安装VMware Workstation的默认位置如下,如果你修改了安装位置请直接转到对应位置。
Windows XP 系统:C:\Program Files\VMware\VMware Workstation
32位版Windows Vista及以上版本:C:\Program Files\VMware\VMware Workstation
64位版Windows Vista及以上版本:C:\Program Files (x86)\VMware\VMware Workstation
例如在64位Windows 10系统里默认安装位置为:C:\Program Files (x86)\VMware\VMware Workstation
1、打开管理员模式的命令提示符然后进入VMware的安装目录,使用命令 cd 空格加上路径并回车即可进入:
# 例如在Windows 10系统里进入VMware目录的命令如下:
cd C:\Program Files (x86)\VMware\VMware Workstation
2、接着查找需要修复磁盘的虚拟机虚拟磁盘的所在位置, 这个位置就是你在安装虚拟机时选择的安装路径:
# 例如我安装的Mac虚拟机所在位置和虚拟磁盘如下,虚拟磁盘名称即你的虚拟机名称.vmdk
D:\Virtual Machines\Mac\Mac.vmdk
3、执行下列命令对虚拟机的故障虚拟磁盘进行修复,其中双引号内就是你的虚拟磁盘所在位置(第二步的)
vmware-vdiskmanager -R "&path of the vmdk(virtual disk)&"
#举个栗子:双引号中的内容替换为我Mac虚拟机使用的虚拟磁盘,然后按回车即可修复
vmware-vdiskmanager -R "D:\Virtual Machines\Mac\Mac.vmdk"本文地址:VMWare虚拟机强制非正常关闭后磁盘错误的解决办法由整理并发布,欢迎转载!
顶一下(324)
踩一下(83)
1282238216323795156751496410821951083467761729972117189700063206017
10 KB252.17 MB467.5 MB64.63 MB26.3 GB467.5 MB35.6 MB378.31 MB467.17 MB291.95 MB

我要回帖

更多关于 虚拟机扩展磁盘容量 的文章

 

随机推荐