vmware (4)

在VMWare中增加Linux文件系统空间

  有时候会遇到这样的情况:刚开始给VMWare分配了一个虚拟硬盘,安装Linux后,随着工作中使用得越来越多,虚拟硬盘容量逐渐变得不够用,需要扩充空间。下面说明如何在VMWare中增加Linux的文件系统空间。 我的VMWare中安装的是Fedora 9,不过其它Linux应该大同小异。 首先在VMWare中调整虚拟硬盘的大小(在“Virtual Machine Settings”的Hardware选项卡里选择“Hard Disk(SCSI)”,在右侧的Utilities里选择Expand进行扩展),也可以直接Add一块新的虚拟硬盘。 启动Linux,键入df -h查看磁盘信息: [plain] view plaincopy [root@localhost ~]# df -h   Filesystem            Size  Used Avail Use% Mounted on   /dev/mapper/VolGroup00-LogVol00                          29G   26G  2.3G  92% /   /dev/sda1             190M   13M  168M   7% /boot   tmpfs                 506M   48K  506M   1% /dev/shm   gvfs-fuse-daemon       29G   26G  2.3G  92% /root/.gvfs   可以看到新增加的硬盘容量并没有体现在Linux中。使用fdisk -l查看分区表信息。我的信息是: [plain] view plaincopy [root@localhost ~]# fdisk -l      Disk /dev/sda: 42.9 GB, 42949672960 bytes   255 heads, 63 sectors/track, 5221 cylinders   Units = cylinders of 16065 * 512 = 8225280 bytes   Disk identifier: 0x000f1526         Device Boot      Start         End      Blocks   Id  System   /dev/sda1   *           1          25      200781   83  Linux   /dev/sda2              26        3916    31254457+  8e  Linux LVM   注意Disk /Dev/sda有40多G空间(刚刚通过VMWare扩展的),但两个Device /dev/sda1和/dev/sda2加起来只有30多G,有10G空间没有被使用。 从调整分区表入手,调整分区表用fdisk。这个过程需要人机交互,我在需要输入的地方加注释来说明 [plain] view plaincopy [root@localhost ~]# fdisk /dev/sda      The number of cylinders for this disk is set to 5221.   There is nothing wrong with that, but this is larger than 1024,   and could in certain setups cause problems with:   1) software that runs at boot time (e.g., old versions of LILO)   2) booting and partitioning software from other OSs      (e.g., DOS FDISK, OS/2 FDISK)      Command (m for help): n       //选择n表示新建分区   Command action      e   extended      p   primary partition (1-4)   e                             //选择e表示建立扩展分区   Partition number (1-4): 3     //选择3是因为1和2都被占了(/dev/dsa1和/dev/dsa2)   First cylinder (3917-5221, default 3917):                               //此分区起始柱面,直接按回车,使用默认值   Using default value 3917   Last cylinder or +size or +sizeM or +sizeK (3917-5221, default 5221):   //此分区大小,直接按回车,使用默认值(表明包含所有剩余空间)   Using default value 5221      Command (m for help): n       //在扩展分区基础上新建逻辑分区   Command action      l   logical (5 or over)      p   primary partition (1-4)   l                             //选择l表示新建逻辑分区   First cylinder (3917-5221, default 3917):                               //直接按回车   Using default value 3917   Last cylinder or +size or +sizeM or +sizeK (3917-5221, default 5221):   //直接按回车   Using default value 5221      Command (m for help): p       //选择p查看新的分区表,发现已经新建成功      Disk /dev/sda: 42.9 GB, 42949672960 bytes   255 heads, 63 sectors/track, 5221 cylinders   Units = cylinders of 16065 * 512 = 8225280 bytes   Disk identifier: 0x000f1526         Device Boot      Start         End      Blocks   Id  System   /dev/sda1   *           1          25      200781   83  Linux   /dev/sda2              26        3916    31254457+  8e  Linux LVM   /dev/sda3            3917        5221    10482412+   5  Extended   /dev/sda5            3917        5221    10482381   83  Linux      Command (m for help): w       //选择w保存   The partition table has been altered!      Calling ioctl() to re-read partition table.      WARNING: Re-reading the partition table failed with error 16: Device or resource busy.   The kernel still uses the old table.   The new table will be used at the next reboot.   Syncing disks.   可以看到新增了/dev/sda3扩展分区和/dev/sda5逻辑分区。如果是新增了一块硬盘,也可以直接新建一个主分区,步骤更简单些。 键入partprobe命令,这个命令用于在硬盘分区发生改变时,更新Linux内核中读取的硬盘分区表数据。 [plain] view plaincopy [root@localhost ~]# partprobe   我们使用ext3格式化/dev/sda5这个新的分区 [plain] view plaincopy [root@localhost ~]# mkfs -t ext3 /dev/sda5  …
Read more...

VMware vsphere center 【配置问题】主机的SSH已启用 感叹号

VMware HA 配置的时候,主机开始SSH的话会出现,主机前面出现感叹号,并且在主机的“摘要”出现“【配置问题】主机的SSH已启用 ”解决办法:1. VI连接到VC或者ESX服务器2. 在Home -> Inventory -> Hosts and Clusters里展开选中你的ESX服务器3. 右边选择Configuration,然后点击Software栏目里的Advanced Settings4. 在Advanced Settings里选择左边列表中的UserVars5. 选中左边列表中的UserVars后,在右边拖到最下面,将UserVars.SuppressShellWarning的值改为1即可,不需要重启。
Read more...

vmware 最小化到托盘

VM 是支持关闭后在后台运行的。Edit>Preferences>Workspace,把Run powered on virtual machine in background after close 选中,当关闭VMware Workstation 的时候,即可最小化在托盘区,在后台运行了。
Read more...

( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/category.php on line 191
Call Stack
#TimeMemoryFunctionLocation
10.0007411904{main}( ).../index.php:0
20.08694261776Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.08694261776Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.301511451512Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.302111475776Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.302811531104Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.303111558504require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.310311893696K2ControllerItemlist->execute( ).../k2.php:64
90.310311893696K2ControllerItemlist->display( ).../BaseController.php:710
100.321612800640K2ControllerItemlist->display( ).../itemlist.php:49
110.321612800640K2ControllerItemlist->display( ).../controller.php:19
120.324513014904Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.326013035592K2ViewItemlist->display( ).../ViewController.php:102
140.406415902944K2ViewItemlist->display( ).../view.html.php:1407
150.406415902944K2ViewItemlist->loadTemplate( ).../HtmlView.php:230
160.407415971416include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/category.php' ).../HtmlView.php:701