zoukankan      html  css  js  c++  java
  • VMware基本用法

    ###VMware tools

    介绍
    只有在VMware虚拟机中安装好了VMware Tools,才能实现主机与虚拟机之间的文件共享,同时可支持自由拖拽的功能,鼠标也可在虚拟机与主机之前自由移动(不用再按ctrl+alt),且虚拟机屏幕也可实现全屏化
    安装

    1. 在CD-ROM虚拟光驱中选择使用ISO镜像,找到VMWARE TOOLS 安装文件,如D:VMwarewindows.iso
      请根据自己的系统来选择镜像(freebsd/linux/netware/solaris/windows/winPre2k)
    2. 点击虚拟机-> 安装 VMWARE TOOLS,此时虚拟机开始加载光驱
    3. 将光驱文件拷贝出来,解压
    4. ./vmware-install.pl 安装

    ###设置共享
    设置 -> 选项 -> 共享文件夹
    注:

    1. 共享完成后,需要重启主机
    2. Linux共享目录在/mnt/hgfs/

    ###复制虚拟机
    此方法不如直接应用克隆,但是克隆的没有快照
    复制完的虚拟机,因为MAC地址是一样的,必然会导致后启动的那个虚拟机无法启动
    解决办法:
    设置 -> 硬件 -> 网络适配器 -> 桥接 -> 高级 -> 生成新的MAC地址

    ###添加硬盘
    如果是改变当前容量,虚拟机不能存在快照

    # fdisk -l
    
    Disk /dev/sdb: 107.4 GB, 107374182400 bytes
    255 heads, 63 sectors/track, 13054 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    
    Disk /dev/sdb doesn't contain a valid partition table
    
    # fdisk /dev/sdb 	//分区
    
    Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
    Building a new DOS disklabel with disk identifier 0xd0aa90b9.
    Changes will remain in memory only, until you decide to write them.
    After that, of course, the previous content won't be recoverable.
    
    Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
    
    WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
             switch off the mode (command 'c') and change display units to
             sectors (command 'u').
    
    Command (m for help): n
    Command action
       e   extended                 #逻辑分区
       p   primary partition (1-4)  #主分区
    p
    Partition number (1-4): 2		#主分区为第几个主分区(如果sdb1存在)
    First cylinder (1-13054, default 1): 	#分区的起始磁盘数
    Using default value 1
    Last cylinder, +cylinders or +size{K,M,G} (1-13054, default 13054): 	#分区的大小
    Using default value 13054
    
    Command (m for help): w			#写入分区
    The partition table has been altered!
    
    Calling ioctl() to re-read partition table.
    Syncing disks.   
    
    # fdisk -l		//完成
    
    Disk identifier: 0xcdc833e9
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1               1       13054   104856223+  83  Linux
    
    # mkfs -t ext3 -c /dev/sdb1		//格式化
    # mount /dev/sdb1 /media/		//挂载
    # ls /media/
    lost+found
    
    # vi /etc/fstab
    加入:
    /dev/sdb1    /www    ext3    defaults 1 2
    

    设置系统启动自动挂载
    /dev/sdb1:代表哪个分区
    ext3:分区的格式
    defaults:挂载时所要设定的参数(只读,读写,启用quota等),defaults包括的参数有(rw、dev、exec、auto、nouser、async)
    1:使用dump是否要记录,0是不要
    2:开机时检查的顺序,是boot系统文件就为1,其他文件系统都为2,如不要检查就为0

    ###vm安装错误
    failed to create the requested registry key…
    解决办法:
    运行regedit。找到HKEY_LOCAL_MACHINESOFTWAREVMware, Inc,删除即可

  • 相关阅读:
    datagrid
    SQL语句
    JavaScript事件
    DOM和BOM
    JavaScript基础知识
    css
    网络编程常识
    集合框架
    多线程常识
    面向对象常识
  • 原文地址:https://www.cnblogs.com/zhangxuechao/p/11709953.html
Copyright © 2011-2022 走看看