zoukankan      html  css  js  c++  java
  • ESXi 5.5 命令行克隆虚拟机

    1. 开启ESXi的SSH功能,用vSphere Client登录ESXi, 选中服务器, 在右侧标签栏选择Configuration->SecurityProfile->Services->Properties…

    2. SSH登入服务器, 在类似于/vmfs/volumes/datastore1的目录下, 建立新的文件夹用于放新的虚拟机文件

    3. 克隆

    /vmfs/volumes/539c1544-eb91cdce-ddcc-3c07544cc9ea # vmkfstools -i 02-centos-5.8/01-centos-5.8.vmdk 03-centos-5.8/03-centos-5.8.vmdk -d thin
    Destination disk format: VMFS thin-provisioned
    Cloning disk '02-centos-5.8/01-centos-5.8.vmdk'...
    Clone: 100% done.
    

    4. 在vSphere Client下, 新建虚拟机, 选择自定义, (注意在网卡配置时, 网卡选择不对可能会让网络无法启动). 在Select a disk 的时候, 选择使用之前克隆产生的硬盘.

    5. 如果网络出现问题, 出现

    service network restart
    Shutting down loopback insterface: [ OK ]
    Bringing up loopback insterface: [ OK ]
    Bringing up interface eth0: Device eth0 does not seem to be present,delaying initialization. [FAILED]
    

    在我的Mac mini上, 在虚拟机Summary -> Edit Settings 删除网卡, 添加时选择类型为E1000可以解决问题. 设置静态IP, 修改/etc/sysconfig/network-script/ifcfg-eth0

    DEVICE=eth0
    BOOTPROTO=static
    ONBOOT=yes
    BROADCAST=192.168.1.255
    HWADDR=00:0C:29:AC:89:0E
    TYPE=Ethernet
    IPADDR=192.168.1.201
    NETMASK=255.255.255.0
    

    设置网关, 修改 /etc/sysconfig/network

    NETWORKING=yes
    NETWORKING_IPV6=no
    HOSTNAME=localhost.localdomain
    GATEWAY=192.168.1.1
    

    设置DNS 修改 /etc/resolv.conf, 使用 nameserver 8.8.8.8 nameserver 192.168.1.1 在Centos6.2下, 会让你到相应的ifcfg-eth* 文件里添加

    DNS1=192.168.1.1
    DNS2=8.8.8.8
    
  • 相关阅读:
    Longest Substring Without Repeating Characters
    Valid Palindrome
    Longest Common Prefix
    模型压缩之网络剪枝(Network Pruning)篇
    不使用现有检测框架实现一个简单的物体检测网络
    Mac 上传本地项目到GitHub
    Ubuntu 解决Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend)
    github clone 速度慢解决方法
    bibitem格式参考文献批量生成
    python matplotlib给图中的点加标签
  • 原文地址:https://www.cnblogs.com/milton/p/4215138.html
Copyright © 2011-2022 走看看