Was this page helpful?

RHEL5 - virt-install 指令安裝 Guest 的方法


    Linux 的傳統就是指令集,所以不能避免的就是安裝 Guest 也可以用指令 "virt-install" 方式如下所示:

    [[email protected] xen]# virt-install
    Would you like a fully virtualized guest (yes or no)?  This will allow you to run unmodified operating systems. no
    #yes 為 fully virtualized guest,no 為 para-virtualized guest
     What is the name of your virtual machine? rhel4.6
     How much RAM should be allocated (in megabytes)? 256
    #要指定多少記憶體空間給 Guest. 單位為 MBs
     What would you like to use as the disk (file path)? /var/lib/xen/images/rhel4.6.img
    # 虛擬磁碟(virtual disk) ,disk 或是 image 皆可! 要使用 nonsparse image disk 請先加入參數 virt-install -nonsparse.
     How large would you like the disk (/var/lib/xen/images/rhel4.6.img) to be (in gigabytes)? 8
    #虛擬磁碟(virtual disk) 空間大小
     Would you like to enable graphics support? (yes or no) yes
     What is the install location? nfs:
    #NFS :  nfs:主機IP:Linux 實際可以安裝的目錄
    #WWW :   http://主機IP/可以安裝的目錄
    #FTP :   ftp://主機IP/可以安裝的目錄

    Starting install...
    Creating storage file...                                | 8.0 GB     00:00    
    Creating domain...                                      |    0 B     00:00    
    Domain installation still in progress. You can reconnect to
    the console to complete the installation process.

    由 FTP 來安裝,請確定 ftp 的服務已經開預設路徑為 /var/ftp,並且目錄 /var/ftp/rhel4-as-u6-64/ 存放著 RHEL4 光碟的所有內容.

    [[email protected] ~]# service vsftpd restart

    由 NFS 來安裝,編輯 "/etc/exports" 並將 "/var/ftp/as3u2" 目錄分享(因為我們將把光碟內的檔案放在此目錄下,此為FTP預設的分享目錄)

    [[email protected] ~]# vi /etc/exports
    /var/ftp/ 192.8.1.*(ro,all_squash)
    [[email protected] ~]# service nfs start

    由 HTTP 來安裝
    編輯 "/etc/httpd/conf/httpd.conf" 並將 Document 設為 /var/ftp(因為我們將把光碟內的檔案放在此目錄下,此為FTP預設的分享目錄)

    [[email protected] ~]# vi /etc/httpd/conf/httpd.conf
    Document Root "/var/ftp"
    [[email protected] ~]# service httpd restart

    完整版內容請看 : http://benjr.tw/?q=node/378

    Was this page helpful?
    標籤 (Edit tags)
    • No tags
    您必須 登入 才能發佈評論。
    Powered by MindTouch Core