zoukankan      html  css  js  c++  java
  • Redhat6.x下如何进行远程安装虚拟机

    远程主机IP192.168.122.1   远程主机名:server1.example.com

    本地主机IP192.168.122.2   本地主机名:server2.example.com

     

    1、登录到远程主机上,通过virt-install建立虚拟机

    [root@server2 ~]$ ssh root@192.168.122.1

    [root@server1 ~]# virt-install --prompt --vnc --vncport=6000 --vnclisten=192.168.122.1

    注:

    --prompt   采用交互式安装(一种询问式的安装,而不是自动的)

    --vncport=6000  开启vnc端口

    --vnclisten=192.168.122.1   vnc监听的远程主机IP

     

    What is the name of your virtual machine?

    koen

    How much RAM should be allocated (in megabytes)?

    1024

    What would like to use as the disk (file path)?

    /var/lib/libvirt/images/koen.img

    How large would you like the disk (/var/lib/libvirt/images/likai.img) to be (in gigabytes)?

    8

    What is the install CD-ROM/ISO or URL?

    ftp://192.168.122.1/pub/yum


    2.在本地主机上安装vnc的客户端,通过以下命令开启安装图形界面,完成虚拟机的安装步骤

    [root@server2 ~]# vncviewer 192.168.122.1:6000


     

    相关命令:

    virsh list   查看当前正在运行的虚拟机

    virsh list --all   查看所有虚拟机

    virsh start exam   开启exam虚拟机

    virsh shutdown exam   关闭exam虚拟机

    virsh destroy exam   直接关闭exam虚拟机

     

    -------end-------

  • 相关阅读:
    OEP
    壳的执行过程
    JavaScript RSA算法简单实现(转)
    创建根证书及其子证书
    从零开始学习Sencha Touch MVC应用之十四
    javascript base64
    discuz 文档地址
    虚拟机共享数据
    转Javascript到PHP RSA加密通讯的简单实现
    PHP RSA研究
  • 原文地址:https://www.cnblogs.com/xautlmx/p/3997446.html
Copyright © 2011-2022 走看看