enlarge the space of linux based on vmware
2015-03-20 16:01
302 查看
增加VMware下LINUX的虚拟机磁盘空间
原因:当初虚拟机分了20GB,结果太小了,装了一些软件后都不能update了,所以需要增加虚拟机的硬盘空间。使用vmware-vdiskmanager.exe 程序增加磁盘空间
VMware6.0安装目录下有一个命令行工具vmware-vdiskmanager.exe 程序,可用来修改虚拟机硬盘的大小。方法如下: 1. 关闭虚拟机;启动Windows下的命令提示符界面; 2. 命令进入VMware的安装目录(如:D:\VMware),输入“vmware-vdiskmanager”后按回车键,可显示关于该命令的说明。 3. 执行如下命令:vmware-vdiskmanager -x 30Gb "D:\Program Files\vmvare\ubuntu.vmdk",参数-x表示要扩展虚拟机硬盘空间;紧随其后的数字指要扩展的大小(如20Gb,表示磁盘总量[/b],包含原来的磁盘容量,而不是新增加的容量);最后是要操作的虚拟机Linux的具体文件。若路径名中有空格,必须以双引号括起来。 等待一会,具体时间应该和机器以及容量大小有关系,执行完毕,显示 Grow: 100% done. Disk expansion completed successfully. 退出命令提示符窗口,重启VMware,这时虚拟机硬盘空间已变成30GB了。这个过程中,已安装的Linux系统不会被破坏。 如果原来的虚拟机硬盘已被分成了多个分区[/b],那么在通过 vmware-vdiskmanager.exe扩大了硬盘空间后,还需要在虚拟机系统中将增加的分区划分、格式化。并且会在执行扩容命令的时候会有Warning如下: WARNING: If the virtual disk is partitioned, you must use a third-party utility in the virtual machine to expand the size of the partitions. For more information, see: http://www.vmware.com/support/kb/enduser/std_adp.php?p_faqid=1647 4. 启动虚拟机系统,用root登录(后续所有步骤都应以root用户身份登录操作),在 命令行用fdisk -l查看。由于这里是直接修改了原始空间大小,因此可以看到/dev/sda空间改变为32.2GB。 [helloworld@localhost Desktop]# fdisk -l 5. 使用fdisk /dev/sda进入菜单项,m是列出菜单,p是列出分区表,n是增加分区,w是保存并推出。通过n和w来进行操作即可。通过vmware的菜单进行增加
1. 对虚拟机选择Edit virtual machine setting; 2. 在Hardware下方选择Add… 3. 然后选择Hard Dist.. 4. 一步步进行操作即可。 5. 启动虚拟机,df –h并没有看到增加的硬盘空间,执行fdisk –l,可以看到已经多出一个/dev/sd?,这里的?代表硬盘编号,第一个硬盘编号为a即sda,第二个就是sdb,第三个是sdc,以此类推,一般来说,如果以前没有增加过硬盘,那么原来的硬盘就是sda,通过VMware菜单增加的虚拟硬盘编号就是sdb。如果添加的第二块硬盘是IDE硬盘,就应该看到hdb,如果是 SCSI硬盘,看到的就应该是sdb。 6. 使用fdisk /dev/sdb进行分区操作; 7. 然后格式化mkfs /dev/sdb1; 8. 挂载到目录,mount /dev/sdb1 /yourdir,其中yourdir是自己创建的; 9. 如果希望开机就挂载,那么可以将上面的mount添加到/etc/profile,或者修改/etc/fstab也可以。相关文章推荐
- enlarge the space of linux based on vmware
- GuestStealer allows for the stealing of VMware guests from vulnerable hosts based on the Directory Traversal Vulnerability
- How to restore ASM based OCR after complete loss of the CRS diskgroup on Linux systems[ID 1062983.1]
- How to restore ASM based OCR after complete loss of the CRS diskgroup on Linux/Unix systems [ID 1062
- 关于VMware提示there is not enough space on the file system for the selected operation
- About install linux ON virtual PC by use of VMware
- How To Get The Size of RAW Devices On Linux
- Upon startup of Linux database get ORA-27102: out of memory Linux-X86_64 Error: 28: No space left on device
- Upon startup of Linux database get ORA-27102: out of memory Linux-X86_64 Error: 28: No space left on device
- vmware:Cannot open the disk 'XXX' or one of the snapshot disks it depends on. reason: failed to lock the file.
- 虚拟机异常关闭,重新打开vmware:Cannot open the disk 'XXX' or one of the snapshot disks it depends on. reason: fa
- The Design and Implementation of Two-dimensional Vector Graphics Interactive Tools Based on “Smart Handle”
- 解决Cannot open the disk 'F:/vmware/Ubuntu.vmdk' or one of the snapshot disks it depends on.
- Get the equivalent of GetModuleFileName on Linux
- dbca ORA-27102: out of memory Linux-x86_64 Error: 28: No space left on device
- install linux on the window by using VMware
- The solution of Websphere create profiles failed on Linux
- Upon startup of Linux database get ORA-27102: out of memory Linux-X86_64 Error: 28: No space left on device
- ORA-27102: out of memory Linux-x86_64 Error: 28: No space left on device
- Upon startup of Linux database get ORA-27102: out of memory Linux-X86_64 Error: 28: No space left on device