如何给VMware虚拟机添加新硬盘
虚拟机添加硬盘RAID5并分区、格式化、挂载使用
虚拟机添加硬盘RAID5并分区、格式化、挂载使⽤当全新安装了⼀块新的硬盘设备后,为了更充分、安全的利⽤硬盘空间⾸先要进⾏磁盘的分区,然后格式化,最后挂载使⽤。
1.开启虚拟机之前,先添加硬盘设备,在这⾥我添加了5块硬盘(5块磁盘,3块做RAID5,2块做备份)点击“添加”选择硬盘,点击“下⼀步”选择磁盘类型选择“创建新的虚拟硬盘”设置磁盘⼤⼩默认的磁盘名称就好,点击“完成”成功添加的硬盘出现在列表中,这⾥是按照以上步骤已经建好的5个硬盘,点击“确定”后,打开虚拟机,给磁盘分区2.打开终端输⼊命令:fdisk -l 查看磁盘分区3.创建备份盘在mdadm命令中 -x 参数创建备份盘 -l 指定RAID级别 -n 指定设备数量[root@huming-hbza ~]# mdadm -Cv /dev/md0 -n 3 -l 5 -x 2 /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdfmdadm: layout defaults to left-symmetricmdadm: layout defaults to left-symmetricmdadm: chunk size defaults to 512Kmdadm: size set to 20954112Kmdadm: Defaulting to version 1.2 metadatamdadm: array /dev/md0 started.[root@huming-hbza ~]#4.格式化ext4⽂件系统,当然也可换成别的,如ext4,ext3,xfs等 xfs性能⾼,可⽀持上百万T字节的存储空间,在这⾥我使⽤的是ext4 [root@huming-hbza ~]# mkfs.ext4 /dev/md0mke2fs 1.42.9 (28-Dec-2013)⽂件系统标签=OS type: Linux块⼤⼩=4096 (log=2)分块⼤⼩=4096 (log=2)Stride=128 blocks, Stripe width=256 blocks2621440 inodes, 10477056 blocks523852 blocks (5.00%) reserved for the super user第⼀个数据块=0Maximum filesystem blocks=2157969408320 block groups32768 blocks per group, 32768 fragments per group8192 inodes per groupSuperblock backups stored on blocks:32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,4096000, 7962624Allocating group tables: 完成正在写⼊inode表: 完成Creating journal (32768 blocks): 完成Writing superblocks and filesystem accounting information: 完成[root@huming-hbza ~]#5.挂载磁盘[root@huming-hbza ~]# mkdir /home/news //新建⼀个挂载点[root@huming-hbza ~]# mount /dev/md0 /home/news/6.查看磁盘状况 mdadm命令中 -D 参数查看详细信息[root@huming-hbza ~]# mdadm -D /dev/md0 //查看磁盘详细信息/dev/md0:Version : 1.2Creation Time : Mon Oct 2101:45:482019Raid Level : raid5Array Size : 41908224 (39.97 GiB 42.91 GB)Used Dev Size : 20954112 (19.98 GiB 21.46 GB)Raid Devices : 3Total Devices : 5Persistence : Superblock is persistentUpdate Time : Mon Oct 2101:54:322019State : cleanActive Devices : 3Working Devices : 5Failed Devices : 0Spare Devices : 2Layout : left-symmetricChunk Size : 512KConsistency Policy : resyncName : huming-hbza:0 (local to host huming-hbza)UUID : d7544320:d9e3eea0:3fefd0b6:5df6848dEvents : 18Number Major Minor RaidDevice State08160 active sync /dev/sdb18321 active sync /dev/sdc58482 active sync /dev/sdd3864 - spare /dev/sde4880 - spare /dev/sdf可以发现已经挂载好,并且已经将磁盘准备好两个备份盘。
如何在VMWare WS的虚拟机里扩展和增加磁盘
如何在vmware ws的Ubuntu虚拟机里扩展和增加磁盘2012-11-19by douglasjpd@一般在虚拟机中,磁盘空间不够了,首先应该用扩展(expand)的方法,如果没有可扩展的空间,再用增加硬盘的方式。
扩展和新增磁盘的步骤对于虚拟机是Windows的系统(XP以后的系统)比较容易。
不过如果该虚拟机有snapshot,VMWare不允许再增加空间。
不过一旦扩展或者新增了空间,Windows系统就会自动识别该新增的空间,只要打开“计算机管理”中的“磁盘管理”,立即就可以发现有新的未分区的空间,这时只要直接在“磁盘管理”界面进行分区和格式化并分配盘符即可使用。
下面的示范是在Ubuntu 12.04 Server虚拟机上操作。
一、扩展假设需要将vmware中ubuntu 12.04 LTS虚拟机的磁盘大小由20G扩展到25G。
操作之前,先记录目前磁盘的信息:(先进入root用户)root@test:~# fdisk -lDisk /dev/sda: 21.5 GB, 21474836480 bytes255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x0009e946Device Boot Start End Blocks Id System/dev/sda1 * 2048 39845887 19921920 83 Linux/dev/sda2 39847934 41940991 1046529 5 Extended/dev/sda5 39847936 41940991 1046528 82 Linux swap / Solaris关闭虚拟机,然后在VMWare界面:vm->settings->hard disk->utilities->expand->输入大小(增加后的大小,如25GB),点击“Expand”按钮,等待扩展完成。
详解VMware虚拟机中添加新硬盘的方法
详解VMware虚拟机中添加新硬盘的⽅法随着在虚拟机中存储的东西的逐渐的增加,虚拟机的硬盘也逐渐告急,因此急需拓展⼀块新的虚拟磁盘。
以下便是在VMware 中添加新的虚拟磁盘的⽅法:⼀、VMware新增磁盘的设置步骤(建议:在设置虚拟的时候,不要运⾏虚拟机的系统,不然添加了新的虚拟磁盘则要重启虚拟机)1、选择“VM”----“setting”并打开,将光标定位在hard Disk这⼀选项,然后点击下⽅的Add按钮2、点击next,执⾏下⼀个步骤3、根据提⽰,创建⼀个虚拟的磁盘,并点击下⼀步4、按照默认的,选择SCSI格式的磁盘即可,点击next执⾏下⼀步5、按照默认的点击下⼀步即可完成虚拟磁盘的添加以下是对虚拟机中Linux和widows中对于新的虚拟磁盘的挂载的⽅式的介绍⼆、虚拟机中windows对于虚拟的磁盘的挂载⽅法⽐较的简单,和在实际的电脑中操作⼀样,只要在“设备管理器”中将新建的虚拟磁盘进⾏分区格式化后即可正常使⽤基于windows中设置较为简单,故⽽没有截图1、右击“我的电脑”-“管理”-“磁盘管理”,然后会看到新分配的磁盘没有分区2、右键“新加卷”(未分区的磁盘),选择“新建”,按照向导,⼀步步,选择硬盘分区模式、格式化硬盘即可使⽤三、虚拟机中Linux对于虚拟的磁盘的挂载1、使⽤“fdisk -l”的命令查看当前系统的分区(如果刚才设置VMware--setting的时候运⾏了系统,则会出现下图情况:没有识别到新的磁盘即sdb),解决办法,重启虚拟机:shutdown -r now2、如果执⾏第⼀步的时候是关闭虚拟机中的系统的,则使⽤“fdisk -l 命令的时候则会出现新的磁盘sdb(不过提⽰未分区)3、对新建的磁盘进⾏分区及格式化的⼯作:输⼊ fdisk /dev/sdb终端会提⽰:Command (m for help):4、在上⼀步骤的基础上输⼊:m 则会出现下列的提⽰:5、然后根据提⽰输⼊:n会出现下⾯的提⽰,依次输⼊p 和 1 即可接着便会提⽰卷的起始地址和结束地址,都保持默认按回车的即可(意思是只分⼀个区)6、输⼊“w”保存并推出7、再次使⽤ “fdisk -l ”这个命令来查看会发现出现了/dev/sdb1(说明已经完成了分区⼯作)8、对新建的分区进⾏格式化:格式化成ext3的⽂件系统即可9、下⾯便是对于分好区的/dev/sdb1 这⼀个分区进⾏挂载及访问9、1⼿动挂载:使⽤mount /dev/sdb1 /要挂载的⽬录(⾃⼰⾃定义)访问时:cd /挂载的⽬录即可对其进⾏存储和访问9、2⾃动挂载:修改/etc/fstab即可使⽤vim /etc/fstab打开配置的⽂件,然后将下⾯的⼀⾏⽂字添加即可/dev/sdb1 /media(这个挂载的⽬录你⾃⼰设置即可) ext3 defaults 0 1以上就是本⽂的全部内容,希望对⼤家的学习有所帮助,也希望⼤家多多⽀持。
虚拟机中如何扩展一个虚拟磁盘的大小(图解)
虚拟机中如何扩展一个虚拟磁盘的大小(图解)2009-12-07 00:14:59| 分类:PC | 标签:|字号大中小订阅问题的提出:非常多的虚拟机使用者开始没有能预估到在虚拟机上安装系统后最后需要多少空间,使用了一段时间后发现虚拟机的磁盘空间不够了。
怎么去解决呢?方法一、在虚拟机配置处增加一个硬盘。
点击Edit virtual machine settings点击下一步,增加一块硬盘接下来就是按照提示操作就可以了。
这个方法不是最好的。
增加了一个硬盘,对虚拟机的性能并没有什么太大的影响。
方法二:使用VMware自身带的工具进行扩展硬盘1、首先找到VMware的安装路径,从vm的快捷方式的属性去寻找安装路径在安装文件夹下我们可以看到这个命令:vmware-vdiskmanager.exe这个命令必须在命令行下运行。
进入命令行状态。
C:\Program Files\VMware\VMware Workstation>vmware-vdiskmanager.exe VMware Virtual Disk Manager - build 19175.Usage: vmware-vdiskmanager.exe OPTIONS diskName | drive-letter:Offline disk manipulation utilityOptions:-c : create disk; need to specify other create options建立一个新的磁盘-d : defragment the specified virtual disk磁盘碎片整理-k : shrink the specified virtual disk压缩一个指定的磁盘-n <source-disk> : rename the specified virtual disk; need tospecify destination disk-name重新命名磁盘的名称-p : prepare the mounted virtual disk specified bythe drive-letter for shrinking-q : do not log messages-r <source-disk> : convert the specified disk; need to specifydestination disk-type转换磁盘类型-x <new-capacity> : expand the disk to the specified capacity扩展磁盘的容量Additional options for create and convert:-a <adapter> : (for use with -c only) adapter type (ide, buslogic or lsilogic)-s <size> : capacity of the virtual disk-t <disk-type> : disk type idDisk types:0 : single growable virtual disk1 : growable virtual disk split in 2Gb files2 : preallocated virtual disk3 : preallocated virtual disk split in 2Gb filesThe capacity can be specified in sectors, Kb, Mb or Gb.The acceptable ranges:ide adapter : [100.0Mb, 950.0Gb]scsi adapter: [100.0Mb, 950.0Gb]ex 1: vmware-vdiskmanager.exe -c -s 850Mb -a ide -t 0 myIdeDisk.vmdkex 2: vmware-vdiskmanager.exe -d myDisk.vmdkex 3: vmware-vdiskmanager.exe -r sourceDisk.vmdk -t 0 destinationDisk.vm dk示例:ex 4: vmware-vdiskmanager.exe -x 36Gb myDisk.vmdk把myDisk.vmdk的容量扩展到36Gex 5: vmware-vdiskmanager.exe -n sourceName.vmdk destinationName.vmdkex 6: vmware-vdiskmanager.exe -k myDisk.vmdkex 7: vmware-vdiskmanager.exe -p m:(A virtual disk first needs to be mounted at m:using the VMware Diskmount Utility.)可是问题我的硬盘分区表格NTFS,dos不可以访问,怎么办?使用VMware DiskManager GUI来对虚拟硬盘进行调整为了确保程序在你的机器上的可以正常使用请先安装(一定要先装喔~)/Software/Files/CoreSetup.exeVMware DiskManager GUI下载地址:/Software/Files/VMwareDis kManagerSetup.exe下载后直接安装,使用操作如下图在浏览对话框中要选择下图,选中的灰色的vmdk文件,这是虚拟硬盘的“起始标志”(应该可以这么说吧!)不是后面那些001,002,003……喔~确定后就会出现这样一个对话框,提示你的硬盘当前的信息是什么,笔者当前是8G单击“确定”然后在DiskSize这里写入你要改变的硬盘大小,是修改后的大小喔~然后单击“Expand Disk”键过一会就会弹出对话框,提示你扩展成功。
如何给VMware虚拟机添加新硬盘
如何给VMware虚拟机添加新硬盘最近需要在虚拟机里面实际操作些东西,需要至少两个盘,一个系统盘,一个普通盘,结果发现安装完虚拟机后默认只有一个C盘,本来还想打算采用工具无损分区从C盘分出来一些,后来发现不行,太麻烦不说,而且不符合虚拟机的自由玩精神,后来发现原来可以从虚拟机里面自行添加,这里简单介绍下:环境介绍:VMware8.0,装的系统是XP SP3。
先把已经可以运行XP系统的虚拟机关闭,点击编辑(Edit vitual machine settings):打开后的界面如下可以看到我已经多添加一个盘了,现在再添加一个,点击下面的Add按钮,添加一个盘符:选择第一项:Hard Disk,然后点击Next:如图:选择第一项,并点击Next,如图:还是选默认的第一项,并点击Next,如图:这里大小40G是默认的不用担心占用你的硬盘,应为是虚拟的,当实际存储文件有多大时才会相应在你硬盘上显示出这个虚拟硬盘文件有多大,这里选择第二项,并点击Next,如图:这里的名字是在你实际硬盘上显示的文件名,作为虚拟硬盘使用,名字是默认的,不用管,存储位置在你的虚拟系统文件夹下,也可以点击后面的Browse 来自定义存储位置。
点击Finish完成设置,这不算完,呵呵,看下我们在硬盘上的显示大小:这里清楚的显示,此刻这个40G的虚拟硬盘实际占用空间才5M,好了,启动虚拟机:一路点yes后进入系统如图:奇怪?不是添加了吗?怎么还是原来的两个,新添加的那个哪里去了,不用担心,这是因为添加了,但还没有格式化,所以没显示出来,在虚拟机里,右键我的电脑—管理—磁盘管理,会弹出如下界面:点击下一步:按照默认,点击下一步:注意:默认是没有选中的,生成的磁盘是基本的磁盘(可以选择是否为逻辑磁盘等),如果想生成动态简单卷,就选中。
点击下一步:出现完成界面,点击完成:发现有个未指派的40G空间,这个就是啦,在上面右键点击,选择“新建卷”:然后接下来就是一连串的下一步,下一步,呵呵,最后就可以看到一个新盘40G供你是使用了,上面说了那么多,其实很简单,就是从虚拟机里面添加一个盘符,你可以添加N个,只要你喜欢,点的最多的就是下一步,Next,呵呵。
虚拟机中如何挂载物理磁盘(VMware操作)
虚拟机中如何挂载物理磁盘(VMware操作)
测试的时候难免会遇到,从真是机器拷贝东西到虚拟机中,虽说安装了VMware tools(Vm→Install VMware tools...),就可以将文件直接拖到虚拟机里面去,但是这样拷贝总是需要花费时间的,今天给大家介绍一个更简便的方法.
我的虚拟机版本VMware5.53(没有安装汉化补丁)
1.打开虚拟机下图为我的虚拟机
2.选择"edit virtual machine settings"(中文的为:编辑虚拟机设置)会出现下面图
上面界面可以更改虚拟机基本设置
3.需要将物理磁盘与虚拟机关联起来,就在这里设置,点击"Add"(添加)按钮;
3.选择"hard disk"(硬盘),单击"下一步"
关键在这里,第一个是在虚拟机里面创建一个新的盘符,第二个是加载一个已经创建了的虚拟
盘符(可以把其它虚拟机中的盘符加载过来,时间问题没有去弄,大家可以试一试),第三个则是加载一个物理磁盘,即真实机的本地磁盘,点击"下一步"
这一部选择的意思上面很清楚,不用我翻译了吧,点下一步(我选择是单个磁盘)
这里就开始选择挂载哪一个物理磁盘,0是c盘,依次类推,选择好了"下一步"吧
这个窗口就是虚拟机将挂载物理磁盘信息文件,"Browse"选在保存的位置,至于位置保存在
哪,用脑子想想吧,
选择好位置点击"完成"
4.Ok,"start this virrual machine",
上面步骤就是我加载物理磁盘的步骤新闻网:。
VMWAREESXi6共享硬盘添加设置
VMWAREESXi6共 享 硬 盘 添 加 设 置
VMWARE ESXi 6.5 共享硬盘添加 1.选择需要添加的虚拟机
2.选择“编辑设置”
3.添加“SCSI” 设置“SCSI总线共享”:ቤተ መጻሕፍቲ ባይዱ拟或物理4.添加“硬盘”
设置“硬盘”: 类型:后置备,置零 虚拟设备节点:SCSI控制器1 磁盘模式:独立-持久 注:这时再启动电源,如果说设置正在进行中,就需要等等,再启动,等的时间还比较长。 5.其他虚拟机添加硬盘,选择“现有硬盘”
6.Fdisk操作共享磁盘 n add a new partition 注:添加一个分区; t change a partition's system id 注:t 改变分区类型;(8e)linux LVM p print the partition table 注:p 列出分区表; w write table to disk and exit 注:把分区表写入硬盘并退出;
Vmware 虚拟机中添加新硬盘
Vmware 虚拟机中添加新硬盘平时用虚拟机经常出现,用到磁盘空间不够了,那是不是要重新创建一个新虚拟机,分配一个更大的硬盘呢,显然很浪费时间,怎样在现有的虚拟机操作系统中添加新的磁盘空间呢?首先需要在虚拟系统power off的状态才能操作,下面是操作步骤1.选择编辑“虚拟机设置”选项,(也可以点击“VM”选择“setting”)2.选择“添加”3.“下一步”:(图略)4.选择“硬盘”,“下一步”,这里大家注意到,也可以添加其他硬件,有时间试验一下5.建立一个新的虚拟磁盘6.分配所创建硬盘空间以及分配形式7.所添加磁盘在虚拟机中显示为硬盘形式,在实际主机中,显示为“.vmdk”文件名,可以修改,注意不要修改扩展名以上可以完成添加硬盘了,还有最后一步,就是启动系统,看不到添加的硬盘,是吧?怎么回事?哈哈,还差最后一步,磁盘管理,格式化硬盘。
8.“我的电脑”(右键)-“管理”-“磁盘管理”,会看到新分配的磁盘没有格式化,9.象新买到硬盘类似的方式,点击未指派磁盘,右键-“新加卷”,按照向导,一步步,选择硬盘分区模式、格式化硬盘,最后。
启动虚拟机的linux,root用户登录。
在终端输入:fdisk -l ,可以看到---------------------------------------------------------------------------- Disk /dev/sda: 10.7 GB, 10737418240 bytes255 heads, 63 sectors/track, 1305 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk identifier: 0x000af383Device Boot Start End Blocks Id System/dev/sda1 * 1 1244 9992398+ 83 LinuxDisk /dev/sdb: 5368 MB, 5368709120 bytes255 heads, 63 sectors/track, 652 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk identifier: 0x00000000这里可以看到/dev/sdb 就是新添加的硬盘,需要给新的硬盘分区。
vmware中如何为虚拟机增加硬盘容量
vmware中如何为虚拟机增加硬盘容量第⼀种⽅法:增加新硬盘分区:1.打开vmware(不⽤启动虚拟机内的系统),=>虚拟机=>设置=>add,选择Hard Disk,然后⼀直点 next,(中间有⼀步是设置需要添加磁盘的⼤⼩,按照⾃⼰的需求设置,这⾥就忽略了)最后点OK2.=>启动该虚拟机,在虚拟的系统⾥⾯再执⾏以下操作: =>控制⾯板=>管理⼯具=>计算机管理=>磁盘管理,会跳出⼀个“欢迎使⽤磁盘初始化和转换向导”的界⾯。
⼀直点“下⼀步”,(在右下区域找到刚初始化的磁盘,你会发现是“未指派”的),选中该磁盘后执⾏以下操作:=>操作=>所有任务=>新建磁盘分区=>⼀直下⼀步直到完成。
第⼆种⽅法:扩展已有硬盘容量:界⾯中并没有提供增加硬盘容量的⽅法。
只能在命令⾏形式下执⾏。
安装所在盘的Program Files\VMware\VMware Workstation下有⼀个vmware-vdiskmanager.exe,就是它。
命令参数如下:Usage: vmware-vdiskmanager.exe OPTIONS <disk-name> | <mount-point>Offline disk manipulation utilityOptions:-c : create disk; need to specify other create options-d : defragment the specified virtual disk-k : shrink the specified virtual disk-n <source-disk> : rename the specified virtual disk; need tospecify destination disk-name-p : prepare the mounted virtual disk specified bythe drive-letter for shrinking-q : do not log messages-r <source-disk> : convert the specified disk; need to specifydestination disk-type-x <new-capacity> : expand the disk to the specified capacityAdditional options for create and convert:-a <adapter> : (for use with -c only) adapter type (ide, buslogic or lsilogic)-s <size> : capacity of the virtual disk-t <disk-type> : disk type idDisk types:0 : single growable virtual disk1 : growable virtual disk split in 2Gb files2 : preallocated virtual disk3 : preallocated virtual disk split in 2Gb filesThe capacity can be specified in sectors, Kb, Mb or Gb.The acceptable ranges:ide adapter : [100.0Mb, 950.0Gb]scsi adapter: [100.0Mb, 950.0Gb]ex 1: vmware-vdiskmanager.exe -c -s 850Mb -a ide -t 0 myIdeDisk.vmdkex 2: vmware-vdiskmanager.exe -d myDisk.vmdkex 3: vmware-vdiskmanager.exe -r sourceDisk.vmdk -t 0 destinationDisk.vmdkex 4: vmware-vdiskmanager.exe -x 36Gb myDisk.vmdkex 5: vmware-vdiskmanager.exe -n sourceName.vmdk destinationName.vmdkex 6: vmware-vdiskmanager.exe -k myDisk.vmdkex 7: vmware-vdiskmanager.exe -p <mount-point>(A virtual disk first needs to be mounted at <mount-point>)-----------------------------------------------------------------其中的-x参数就是⽤来扩容的……如这个:vmware-vdiskmanager.exe -x 36Gb myDisk.vmdk-------------------------------------------------------我的执⾏过程:E:\Program Files\VMware\VMware Workstation>set path=%path%;E:\Program Files\VMware\VMware WorkstationE:\Program Files\VMware\VMware Workstation>e:E:\Program Files\VMware\VMware Workstation>cd E:\VM_MachineE:\VM_Machine>cd Windows Server 2003 Standard EditionE:\VM_Machine\Windows Server 2003 Standard Edition>dir *.vmdk2007/07/20 11:17 1,588,527,104 Windows Server 2003 Standard Edition-s001.vmdk2007/07/20 11:17 65,536 Windows Server 2003 Standard Edition-s002.vmdk2007/07/20 10:56 448 Windows Server 2003 Standard Edition.vmdkE:\VM_Machine\Windows Server 2003 Standard Edition>vmware-vdiskmanager.exe -x 4G"Windows Server 2003 Standard Edition.vmdk"Using log file C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1\vmware-Administrator\vdiskmanager.logThe specified disk size does not fall within acceptable range.The acceptable ranges:ide adapter : [100.0Mb, 950.0Gb]scsi adapter: [100.0Mb, 950.0Gb]E:\VM_Machine\Windows Server 2003 Standard Edition>vmware-vdiskmanager.exe -x 4Gb "Windows Server 2003 Standard Edition.vmdk"Using log file C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1\vmware-Administrator\vdiskmanager.logThe old geometry C/H/S of the disk is: 261/255/63The new geometry C/H/S of the disk is: 522/255/63Disk expansion completed successfully.需要强调的⼀点是,调整硬盘⼤⼩之后的效果,相当于增加了原来物理硬盘的柱⾯数⽬,因此,⽂件系统并不会⾃动增长。
如何在vmware虚拟机中加入第二块硬盘(Linux)
Adding a new disk to a VMWare Virtual Machine in LinuxI've been using VMWare for a while now and I always get asked some common questions about it. One of those is how to add a new virtual disk to a Linux virtual machine. So in response to that, here are the steps to adding a new SCSI based virtual disk to a CentOS Linux virtual machine. The steps for adding a disk to a Windows machine is very much the same except you would use the Disk Management utility from the Control Panel.Step 1: Open virtual machine settingsSelect your virtual machine, as you can see from the photo I selected the Infrastructure virtual machine. Next press the "Edit virtual machine settings' to open the Virtual Machine Settings dialog.Step 2: Add new hardwareFrom the "Virtual Machine Settings" dialog select the "Add..." button at the bottom of thescreen. From this dialog you can also modify how much memory you dedicate to themachine when it boots.mutube » IM OnlineWhat I'm Tweeting...Wondering if I need to update my SF86 after sniffing all these paint fumes tonight 2 hrs agoFYI turn signals save lives, but testing and driving is cool too #fb 2 days ago RT @rmanalan : @jkuramot congrats! 6 days ago More updates...Hit Me on IMAkanshah on Adding a new disk to a VMWare Virtual Machine in Linux Chris Dillon on Adding a new disk to a VMWare Virtual Machine in Linux venkat on Adding a new disk to a VMWare Virtual Machine in Linux CaioToOn! on Adding a new disk to a VMWare Virtual Machine in Linux Saravanan Sundaresan on Adding a new disk to a VMWare Virtual Machine in Linux ArchivesOctober 2010 (4) September 2010 (4) February 2010 (1) December 2009 (1) June 2008 (2) January 2008 (5) December 2007 (2) November 2007 (1) October 2007 (5) September 2007 (1) August 2007 (4) June 2007 (2) May 2007 (1) April 2007 (3) March 2007 (2) January 2007 (1).::.A WORLD OF RANDOM TOPICS FROM A CORPORATE THORNSubscribe via RSS提交HOMEABOUT MELINKSPAPERS AND PRESENTATIONSStep 3: Start hardware wizardNext we will walk through the "Add Hardware Wizard" the process makes it very simple to add additional hardware to a predefined virtual machine. From this screen we want to select the "Next >" button.Step 4: Select new hard diskFrom this screen we can see the many types of hardware we can add to a virtual machine. You can emulate just about any piece of hardware that one can expect in a modern operating system. It definitely makes testing with different configurations and devices much easier. For our example we want to select "Hard Disk" and then select the "Next >" button. Step 5: Create the virtual diskIn the next screen we see the three options for adding a new disk. We can "Create a new virtual disk", this will create a brand new disk on the guest operating system. The second option, "Use an existing virtual disk", allows you to mount a disk from another virtual machine. I like to do this with my "source" drive. I have one virtual disk that I've made that has all the Oracle and Linux CDs on it, that way I can just mount it to the machine I need when I have to do a new install instead of copying the binaries I need across disks, its definitely a big time saver. The last option is to "Use a physical disk", this allows you to mount a local physical disk to the operating system. This option is akin to NFS mounting adrive to a virtual machine. To add a new disk we select the "Create a new virtual disk" optionand select the "Next >" button. October 2006 (1) September 2006 (3)July 2006 (5)June 2006 (3)May 2006 (4)April 2006 (1)November 2005 (1)October 2005 (2) September 2005 (1)August 2005 (1)June 2005 (2)January 2005 (3) December 2004 (3)CategoriesAuto IndustryBI ServerBIEEBusiness IntelligenceData IntegratorDiscovererGeneralIdentity Management MapViewer / GISMusicora-clickOracleOracle Access Manager Oracle Adaptive Access Manger (OAAM)Oracle Identity Manager Oracle Virtual Directory PersonalPortalTechnologyVMWareStep 6: Select type of diskNext we want to select the type of disk. I've been using VMWare for a long time and agree that the recommended Virtual Disk Type should be SCSI. I don't know why, but I've had much better success with the SCSI virtual disks than the IDE ones. So in this step we want to select "SCSI (Recommended)" and the "Next >" button.Step 7: Set disk size and optionsNow we want to set the size of the disk we are creating. One of the nice features of VMWare is that you don't have to allocate all of the disk when you create it. So if you create a 40 GB disk it doesn't have to take it all right away, the disk will grow as your virtual machine needs it. I will say this is a big performance hit you take when the disk has to extend, but for most applications its OK. Also, I will warn that if the virtual disk grows and there is no physical disk left on the host operating system you will see a catastrophic failure and in most cases both the host and guest operating systems lock up and become unusable. (Don't say I didn't warn you) Lastly, you can split the files into 2GB sizes, while this isn't necessary, it just makes all the disks much easier to manage and move around. For this step we want to set our disk size (12 GB in this case), I chose not to allocate the disk space right now (the machine has a 300 GB drive and has only 20 GB on it) and Split disk into 2 GB files.Step 8: Name the disk fileThis is actually pretty simple in that you decide what you want to physically call the disk and where to put it. .vmdk is the extension for VMWare virtual disks. After we name the disk we can select the "Finish" button which adds the disk to the virtual machine.Step 9: Ensure new disk existsSo now we can see that the new disk has been added to the "Virtual Machine Settings" within the selected virtual machine. From here the disk acts just like it would if you added a new disk to a standalone server. So we select the "OK" button to continue.Step 10: Boot the virtual machineFrom here we just start the virtual machine like we would normally, either by selecting the button on the toolbar or selecting the "Start this virtual machine" link.Step 11: Virtual machine start upThe machine boots normally as it would any other time.Step 12: Create the PartitionAfter we've logged in and accessed a terminal window as root (or another user withroot/sudo privs) we first want to run fdisk on the newly created drive. In Linux the first SCSI drive is sda, the second sdb, the third sdc, etc. since this was the second SCSI drive we added to the system, the device is known as /dev/sdbThe first command we want to run is fdisk /dev/sdb(NOTE: Thanks to everyone that caught my typo here) this utility works very much like the DOS utility of the old days and allows you to create and manage partitions. To create a new partition we enter the command n to create a new partition. This is going to be a primary partition p, and the first partition number 1. Because I want this disk to consume the full 12 GB I specified earlier we start at the first cylinder and end it at the last cylinder. We then want to write the partition table with the new partition we have just created so we enter the command w which writes the new table and exits fdisk.Step 13: Format the partitionNow that we've create the partition, we now want to format the first with the new file system. I've decided to use ext3 filesystem for this disk, ext3 provides all the features of the classic ext2 file system plus journaling which helps to prevent disk corruption in the event of an improper shutdown and speeds up the recovery process. For a good overview of Linux standard file systems check out this article: .mt/article/filesystems So, to format the new partition we enter the command mkfs -t ext3 /dev/sdb1. This command makes a new files system with the type t ext3 on the /dev/sdb1partition, this is the first partition on the sdb disk.Step 14: Create the mount pointDetermine where you want to add the new virtual disk you've created. I like to create a partition specifically for all the software I install after the basic Linux installcalled /software to do that we run mkdir /software, just a simple make directory command. Once that is complete we then want to mount the newly created partition. Because we haven't added the partition to the /etc/fstab yet we have to mount it manually. To do that we run mount -t ext3 /dev/sdb1 /software. To break down this command we run mount with the ext3 filesystem type, the partition /dev/sdb1 to the directory /software. Pretty simple and straight forward. To check that the partition is properly mounted we run df -k which shows us the mounted partitions and the amount of available space.Step 15: Open the fstab fileThe fstab file holds all of the used disks and partitions, and determines how they are supposed to be used by the operating system. So we edit the file to add the newly created partition/images/blog/adding_disk_to_vmware/15.jpgStep 16: Modify the fstab for the new partitionAfter we open the fstab file in the previous step we add the following line:/dev/sdb1 /software ext3 defaults 1 1The first column is the partition name, the second is the default mount point, the third is the filesystem type. The fourth is the mount options, in this case I used default which mounts the drive rw, suid, dev, exec, auto, nouser and asynchronous. The 5th and 6th options are for the dump and fsck options. If dump is set to 1 the filesystem is marked to be backed up, if you are going to have sensitive material on the drive its a good idea to set it to 1. If fsck is set to greater than 1, then the operating system uses the number to determine in what order fsck should be run during start up. If it is set to 0 it will be ignored such as in the case of a cdrom drive since its a solid state disk. For more information on the fstab file check out this article: /linuxhelp/fstab.htmlLastly, we write and quit the file with the :wq command.So now that the fstab has been written the drive will be mounted and unmounted when the machine is either started or shutdown. So there you have it, the quick and dirty process for adding a brand new disk to a virtual machine. Until next time...ShareThisFiled under: General, Technology, VMWareLeave a commentHi Matt,SalihJuly 11th, 2009 - 06:19Just checked it and it worked fine. Thanks, Salih KMThnx for this, saved me alot of time =)John DoeJuly 30th, 2009 - 10:14Good work. BuddynareshAugust 17th, 2009 - 04:45Good tutorial, I never knew that I can create an additional virtual hard disk for RAID configuration.RonnieAugust 17th, 2009 - 07:44Comments (137)Trackbacks (3)( subscribe to comments on this post )Great tutorial!JimmySeptember 8th, 2009 - 06:43Quick and Easy!NehaSeptember 15th, 2009 -15:30Nice description and document is easy to understand with screen shots. Before finding this reference I have spend my 1 hr to add new HD. But now, I have added new HD to my vmware without any problem. Thanks a lot.Very useful tutorial, again saved a lot of time. Thanks for posting.Alan N-DSeptember 21st, 2009 - 05:10Thanks for the tutorialSaved me a ton of timeArvindSeptember 23rd, 2009 - 17:31Excellent Work Buddy.DeepakOctober 7th, 2009 - 14:41Thnaks a lot ,this tutorial is very nice and useful,i was able to create a new partitionusing this documentsravanthiOctober 8th, 2009 - 17:36Thank you!! Simple and perfect!ChristerOctober 15th, 2009 - 07:10Thank you for the great tutorial!Diogo NomuraNovember 3rd, 2009 - 10:42really usefull guideGladlyNovember 6th, 2009 - 10:41Juan Gyou are the man…..thanksNovember 12th, 2009 - 15:07The tutorial is good but I couldn’t go through with the process. All the first 12 stepspassed quite ok but I got stucked at step 13. Indeed, after I entered the following“mkdir -t ext3 /sdb1″ I got the following error: /dev/sdb1: Invalid argument passed toext2 library while setting up superblock.AdomiDecember 9th, 2009 - 08:19Am using RHEL4. Any tips?Thanks in advance.It worked fine. I was making a mistake in the mkfs command. Thanks again for the tuto.AdomiDecember 9th, 2009 - 10:36Thanks. Very useful.prasannaDecember 14th, 2009 -02:56Good Tutorial. Well Explained and very detailed!!Sergi December 17th, 2009 - 04:30 3.5 years and it’s still helping us n00bs out.chetDecember 23rd, 2009 -01:24Mr. Tumy pointed me this way as I was trying to add a second drive to VirtualBox.Worked like a charm. Thanks! chet Oh. Very nice explaination article. Thanks for such a great knowledge sharing. RahulDecember 25th, 2009 - 01:43It is very helpful and useful guide. Unfortunately, I did everything as mentioned and got virtual disk mounted but drive is not visible at all. I can see drive being mounted withmount command. There is also an entry in fstab file but still not visible. I have triedrestarting couple of times.AngadDecember 28th, 2009 -07:58Can you please help and tell me what I am missing here? Cheers,Angad RussellCJanuary 14th, 2010 - 07:52Really helpful article – thanksComprehensive Survey of techniques to Extend / Expand virtual disks – VMWare, Fusion,VMware Server, VM Workstation, esx, including this postPaul Evans January 14th, 2010 - 20:48/2010/01/11/survey-extend-expand-vmware-virtual-disk/Thanks for useful information , I wasn’t aware that you have already documented it insuch nice way .Atul KumarJanuary 15th, 2010 - 15:04Other location/index.php/2009/12/30/how-to-add-disk-in-linuxoel-virtual-linux-on-vmware-server/ Adding to what others have already mentioned here – GREAT ARTICLE and very helpfulGavin SoormaApril 16th, 2010 - 19:08Hey Matt,never saw such a straight forward explanation before. U Rock. killerquestApril 22nd, 2010 - 00:57THxxxx.Really helpful. Thanks a lot!RJSMay 2nd, 2010 - 16:39Excellent! My first time mounting san space and other than a few fat fingers (on my part) the process worked perfectly. Only suggestion is to do a df -h instead of df -k thisputs the usable space in MB and GB instead of blocks. Thanks!TravisJune 1st, 2010 - 09:36After 4yrs of this being published it’s saved me. Great guide; concise, thorough, complete with graphics (only thing that really differed for me due to version of VC).Thanks for this incredibly helpful guide!HelenK June 10th, 2010 - 00:37Great info! Thank you very much. kangaroosterus July 8th, 2010 - 00:48Leave a comment Thank you for the well documented and easy to understand instructions. Very well done!Travis GJuly 12th, 2010 - 12:44thanx buddy, much appreciated Halim AnsariAugust 7th, 2010 - 04:26Matt,Saravanan Sundaresan August 12th, 2010 - 19:31I’m new to using VMWare and also I have always wanted to get some idea about partitioning, mounting etc. This article helped me achieve both. Thanks for the veryclear documentation.Saravanan.Wonderfull tutorial on setting up a new VMWare disk on Linux. Straight and clear!CaioToOn! August 13th, 2010 - 07:55Thank you!CaioToOn!.Matt, this is awesome. It was really a guie for a beginner like me entering into technicalworld for the first time.venkat September 6th, 2010 - 22:29You are a god among men, all hail M-Topps and his infinite wisdom sauce! *horns**angels* *a goddamn torrent of blog hits and comments* Chris DillonSeptember 8th, 2010 - 09:17Great Document…. It saved my lot of time ) Akanshah September 16th, 2010 -17:38« Older CommentsName (required) Mail (will not be published) (required)WebsiteSubmitAnalysis of vs Free Navteq Data for San Francisco Starbucks»« Discoverer with 10gR2DatabaseCopyright © 2010 .::. · Powered by WordPressGo to top ↑Lightword Theme by Andrei LucaPodcast powered by podPress (v8.8 /v8.8.6.3)。
Vmware添加磁盘的方法:扩展磁盘
Vmware添加磁盘的⽅法:扩展磁盘这篇⽂章介绍了⼀下如何在Vmare下添加或扩展磁盘并使之有效。
场景创建Linux时分配磁盘空间随着使⽤的增加,使⽤率逐渐升⾼,此时需要在添加或者扩展⼀下磁盘。
⽐如:此Linux(CentOS 7.3)的磁盘为20G,⽬前已经使⽤到接近80%[root@mail ~]# cat /etc/redhat-releaseCentOS Linux release 7.3.1611 (Core)[root@mail ~]# dfFilesystem 1K-blocks Used Available Use% Mounted on/dev/mapper/cl_angular-root 17811456 13985948 3825508 79% /devtmpfs 1521180 0 1521180 0% /devtmpfs 1532160 0 1532160 0% /dev/shmtmpfs 153**** **** 1523384 1% /runtmpfs 1532160 0 1532160 0% /sys/fs/cgroup/dev/sda1 1038336 123500 914836 12% /boottmpfs 306432 0 306432 0% /run/user/0[root@mail ~]#扩展磁盘或者添加磁盘Vmware下有两种⽅式:添加磁盘扩展磁盘注意:扩展磁盘需要在此虚拟机停⽌的状态下进⾏,同时扩展的数字是扩展后的预期⼤⼩,⽐如事前为20G,希望扩展10G,应该输⼊30。
这篇⽂章使⽤扩展磁盘的⽅式。
确认状态扩展后,重新启动linux,发现df状态没有变化[root@mail ~]# dfFilesystem 1K-blocks Used Available Use% Mounted on/dev/mapper/cl_angular-root 17811456 13985948 3825508 79% /devtmpfs 1521180 0 1521180 0% /devtmpfs 1532160 0 1532160 0% /dev/shmtmpfs 153**** **** 1523384 1% /runtmpfs 1532160 0 1532160 0% /sys/fs/cgroup/dev/sda1 1038336 123500 914836 12% /boottmpfs 306432 0 306432 0% /run/user/0[root@mail ~]#使⽤fdisk确认磁盘空间是否已经扩展[root@mail ~]# fdisk -lDisk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk label type: dosDisk identifier: 0x0005ba89Device Boot Start End Blocks Id System/dev/sda1 * 2048 2099199 1048576 83 Linux/dev/sda2 2099200 41943039 19921920 8e Linux LVMDisk /dev/mapper/cl_angular-root: 18.2 GB, 182******** bytes, 35643392 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk /dev/mapper/cl_angular-swap: 2147 MB, 2147483648 bytes, 4194304 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytes[root@mail ~]#可以看到“Disk /dev/sda: 32.2 GB”,已经扩展了10G空间。
VM虚拟机硬盘扩容步骤精
本文记述如何在虚拟机中增加一个虚拟硬盘: 步骤1:关掉虚拟机,在虚拟机配置里增加一个硬盘,如下图选择“add”后一路 next (注意中间有个步骤选容量)步骤2:开机,用root权限登陆。
用fdisk -l可以看到除了原来的/dev/sda之外,系统里多了/dev/sdb 执行: >fdisk /dev/sdbp——显示当前情况n --- 新建选择“p"-》“1”,起止位置就用默认的,新增的空间为/dev/sdb1w——保存修改步骤3:格式化.退出fdisk之后,需要对新增加的分区格式化>mkfs.ext3 /dev/sdb1 步骤4:挂载。
在/目录下建一个目录:/simout编辑“/etc/fstab”,在其中添加如下信息:A t* g T. *& Thi R ril» |fe hdl I id . It IM "U^Bk>Z ,I TT^■ Wti Nr ■ ■■Hi■ >'R*"w 4fai ■~n ih' d iinqj-d iiTfllw/HB ■ffrtti'll^niF ie!i S9E3C -i■ TTWH I'F V士红总的造一丁怔是冷圃的步骤4:重启虚拟linux,把/simout权限设为777,普通用户就可以正常读写了>chmod 777 /simout (用root的权限才可以另外在如果原盘空间不够在VM中扩容后也需要:也先用fdisk命令新建分区也然后格式化:mkfs.ext3 /dev/sda3也挂载:编辑/etc/fstab, /dev/sda3 /workspace ext3 default 0 0 也在/目录下建立“亚。
球5口2。
0”目录,权限设为777重启以下是网上搜到的,也许有用问题已经解决了。
确实如10楼所言。
重中之重,操作之前,先分空间,VMWARE下有个小工具。
Vmware linux 新增新磁盘-扩容磁盘-yvan
Vmware linux
新增新磁盘
lvdisplay命令之后,可以得到以下2个lv信息:root和swap,
一般扩容工作也就针对这两个lv卷。
名字会因系统而不同,这里供参考:
/dev/VolGroup/lv_root
/dev/VolGroup/lv_swap
一、开始操作:添加硬盘
1、卷组扩容:
2、给逻辑卷root 扩容
CentOS 7 下面由于使用的是XFS:
xfs_growfs /dev/mapper/centos-root
3、给逻辑卷swap 扩容,例如:20GB
==============我是分割线,以下是虚拟硬盘扩容情况================= Vmware linux
原磁盘扩容
lvdisplay命令之后,可以得到以下2个lv信息:root和swap,
一般扩容工作也就针对这两个lv卷。
名字会因系统而不同,这里供参考:
/dev/VolGroup/lv_root
/dev/VolGroup/lv_swap
一、开始操作:虚拟机里扩容硬盘(关机在扩容,然后开机)
1、新建分区:区别于增加整块硬盘,由于施分区,,必须经过分区操作
不重启办法:kpartx -a /dev/sda #重新加载分区
2、卷组扩容:
3、给逻辑卷root扩容
CentOS 7 下面由于使用的是XFS:
xfs_growfs /dev/mapper/centos-root
4、给逻辑卷swap扩容,例如:20GB。
vclient为虚拟机添加磁盘
虚拟机磁盘空间不够的时候,可以为虚拟机分配新的磁盘空间。
1.添加磁盘
连接物理机,
选择虚拟机,在右侧摘要部分,选择编辑设置,会出现下面的界面。
选择添加,添加磁盘
下一步
下一步
设置磁盘大小和磁盘格式,下一步
选择设备节点,下一步
选择完成,完成添加过程。
2.把虚拟机和所添加的磁盘连接起来
使用vclient连接虚拟机。
选择配置---存储适配器-----添加
选择添加iscsi适配器,确定
出现所添加的iscsi适配器
选择配置---存储器------添加存储器
选择磁盘/LUN,,下一步
选择要添加的磁盘,下一步
选择文件系统版本,下一步
下一步
输入磁盘名称,下一步
选择容量,下一步
点击完成,完成磁盘添加到虚拟机
出现新添加的磁盘。
虚拟机中增加一个新虚拟硬盘的步骤
VMWARE虚拟机的ubuntu10.10系统中增加新的虚拟硬盘1.Vmware中增加虚拟磁盘1.1编辑虚拟机属性1.2增加一个新的虚拟硬盘1.3按步骤设置虚拟机2.通过dmesg查看新增加硬盘的设备号启动虚拟机,通过终端获取新加硬盘设备的设备号$dmesg|grep sdb(查看新添加的硬盘的设备号,一般为sdx或者hdx,通过查看容量,确认所找到的硬盘是新加的硬盘)2.fdisk/dev/sdb(假设新加的硬盘为sdb)farsight@HappyARM:~$sudo fdisk/dev/sdbCommand(m for help):pDisk/dev/sdb:32.2GB,32212254720bytes255heads,63sectors/track,3916cylindersUnits=cylinders of16065*512=8225280bytesDisk identifier:0xbc0d8772Device Boot Start End Blocks Id SystemCommand(m for help):nCommand actione extendedp primary partition(1-4)pPartition number(1-4):1First cylinder(1-3916,default1):Using default value1Last cylinder,+cylinders or+size{K,M,G}(1-3916,default3916):Using default value3916Command(m for help):wThe partition table has been altered!Calling ioctl()to re-read partition table.Syncing disks.farsight@HappyARM:~$mkfs.ext3/dev/sdb1farsight@HappyARM:~$mkdir~/addedfarsight@HappyARM:~$sudo mount/dev/sdb1~/added3.让系统启动的时候自动挂载新的硬盘:挂载方法:首先获得各分区的uuidls-all/dev/disk/by-uuid//显示分区的信息可以查看到各分区的uuid,我的分区如下:farsight@HappyARM:~$ls-al/dev/disk/by-uuid/lrwxrwxrwx1root root102009-05-2404:126dd1f031-0423-48a1-b0e7-459ea9e3e6f3 ->../../sda5lrwxrwxrwx1root root102009-05-2404:12be9dae48-4381-4b85-a631-0af6619d7876 ->../../sdb1lrwxrwxrwx1root root102009-05-2404:12de54c3b1-de9e-4a7a-b66a-35ca13558692 ->../../sda1取得新加硬盘的UUID,增加到下面的/etc/fstab中编辑/etc/fstabsudo vi/etc/fstab添加一行:/dev/sdb1??UUID=be9dae48-4381-4b85-a631-0af6619d7876/home/farsight/added ext3 relatime,errors=remount-ro00保存退出,并通过下面的命令进行测试:$sudo mount–a下次系统重新启动的时候就会自动挂载了。
vmware磁盘文件(vmdk)迁移
vmware磁盘⽂件(vmdk)迁移
原因:由于虚拟机安装时硬盘分配20G,随着虚拟机数据增多,磁盘占⽤也增多。
磁盘总可⽤空间不能满⾜虚拟机数据增多。
虽然虚拟机数据还没到20G,但磁盘总可⽤空间⼩,导致虚拟机继续运⾏时报空间不⾜。
解决办法:将虚拟机磁盘放在具有更⼤可以磁盘空间中。
vmware磁盘⽂件(vmdk)迁移。
步骤
1、⾸先将虚拟机下所有磁盘⽂件(vmdk),复制到其它存储设备(移动硬盘)。
2、将原来的磁盘删除掉
2、添加新硬盘。
硬件添加向导:“使⽤现有的虚拟磁盘”,指定虚拟磁盘位置。
3、创建新磁盘成功,可以正常启动虚拟机了。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
如何给VMware虚拟机添加新硬盘
最近需要在虚拟机里面实际操作些东西,需要至少两个盘,一个系统盘,一个普通盘,结果发现安装完虚拟机后默认只有一个C盘,本来还想打算采用工具无损分区从C盘分出来一些,后来发现不行,太麻烦不说,而且不符合虚拟机的自由玩精神,后来发现原来可以从虚拟机里面自行添加,这里简单介绍下:
环境介绍:VMware8.0,装的系统是XP SP3。
先把已经可以运行XP系统的虚拟机关闭,点击编辑(Edit vitual machine settings):
打开后的界面如下
可以看到我已经多添加一个盘了,现在再添加一个,点击下面的Add按钮,添加一个盘符:
选择第一项:Hard Disk,然后点击Next:如图:
选择第一项,并点击Next,如图:
还是选默认的第一项,并点击Next,如图:
这里大小40G是默认的不用担心占用你的硬盘,应为是虚拟的,当实际存储文件有多大时才会相应在你硬盘上显示出这个虚拟硬盘文件有多大,这里选择第二项,并点击Next,如图:
这里的名字是在你实际硬盘上显示的文件名,作为虚拟硬盘使用,名字是默认的,不用管,存储位置在你的虚拟系统文件夹下,也可以点击后面的Browse 来自定义存储位置。
点击Finish完成设置,这不算完,呵呵,看下我们在硬盘上的显示大小:
这里清楚的显示,此刻这个40G的虚拟硬盘实际占用空间才5M,好了,启动虚拟机:一路点yes后进入系统如图:
奇怪?不是添加了吗?怎么还是原来的两个,新添加的那个哪里去了,不用担心,这是因为添加了,但还没有格式化,所以没显示出来,在虚拟机里,右键我的电脑—管理—磁盘管理,会弹出如下界面:
点击下一步:
按照默认,点击下一步:
注意:默认是没有选中的,生成的磁盘是基本的磁盘(可以选择是否为逻辑磁盘等),如果想生成动态简单卷,就选中。
点击下一步:
出现完成界面,点击完成:
发现有个未指派的40G空间,这个就是啦,在上面右键点击,选择“新建卷”:
然后接下来就是一连串的下一步,下一步,呵呵,最后就可以看到一个新盘40G供你是使用了,上面说了那么多,其实很简单,就是从虚拟机里面添加一
个盘符,你可以添加N个,只要你喜欢,点的最多的就是下一步,Next,呵呵。