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-------

  • 相关阅读:
    改变this指向的三个函数call, apply, bind的实现
    vscode 前端常用插件推荐
    Java SPI详解
    数据技术分享
    深入SpringMVC视图解析器
    .gitignore文件失效的解决方案
    Spring的事件监听机制
    Spring MVC 配置类 WebMvcConfigurerAdapter
    一起来读Netty In Action之传输(三)
    Tomcat性能调优参数简介
  • 原文地址:https://www.cnblogs.com/xautlmx/p/3997446.html
Copyright © 2011-2022 走看看