国产宅男网站在线|亚洲A级性爱免费视频|亚洲中精品级在线|午夜福利AA毛

  • <dd id="gf5jf"><th id="gf5jf"></th></dd>

    <cite id="gf5jf"><label id="gf5jf"></label></cite>
  • <div id="gf5jf"><listing id="gf5jf"></listing></div>
    學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 操作系統(tǒng) > Linux教程 > CentOS下怎么安裝xen虛擬機(jī)

    CentOS下怎么安裝xen虛擬機(jī)

    時(shí)間: 春健736 分享

    CentOS下怎么安裝xen虛擬機(jī)

      從RHEL6版本開始,RedHat就不在原生支持Xen,改為投奔KVM的懷抱。那么大家知道CentOS下怎么安裝xen虛擬機(jī)嗎?今天學(xué)習(xí)啦小編與大家分享下CentOS下安裝xen虛擬機(jī)的具體操作步驟,有需要的朋友不妨了解下。

      CentOS下安裝xen虛擬機(jī)方法

      centos 6.5 64位操作系統(tǒng)安裝xen

      注意:virtualbox下安裝centos時(shí)注意磁盤空間,要不然會提示磁盤空間不足

      WARNING The filesystem will not have enough freespace to fully allocate the sparse

      file when the guest is running. 3072 Mrequested > 310 M available

      ERROR The filesystem will not have enough freespace to fully allocate the sparse

      file when the guest is running. 3072 Mrequested > 310 M available (Use --prompt or

      --force to override)

      如果看到輸出中有pae,那么cpu就支持半虛擬化,如果輸出中同時(shí)有pae和vmx/svm(注:vmx為intel,svm為amd),那么cpu支持全虛擬化

      第一:

      將Xen4CentOS資料庫連接到你的機(jī)器,以便安裝可以輕松完成。要做到這一點(diǎn),請輸入:

      yum install centos-release-xen

      第二:現(xiàn)在已經(jīng)將Xen4CentOS資料庫添加到y(tǒng)um系統(tǒng),接下來安裝xen

      yum install xen

      第三:加載了虛擬機(jī)管理程序軟件?,F(xiàn)在,我們需要新的內(nèi)核添加到GRUB菜單。要做到這一點(diǎn),執(zhí)行腳本:

      /usr/bin/grub-bootxen.sh

      查看/boot/grub/grub.conf應(yīng)該會有這樣的條目

      title CentOS (3.10.43-11.el6.centos.alt.x86_64)

      root(hd0,0)

      kernel/xen.gz dom0_mem=1024M,max:1024M loglvl=all guest_loglvl=all

      module/vmlinuz-3.10.43-11.el6.centos.alt.x86_64 roroot=/dev/mapper/vg00-lvroot rd_NO_LUKS.UTF-8 rd_LVM_LV=vg00/lvrootrd_NO_MD SYSFONT=latarcyrheb-sun16 rd_LVM_LV=vg00/lvswap crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgbquiet

      module/initramfs-3.10.43-11.el6.centos.alt.x86_64.img

      第四:如果查看/boot/grub/grub.conf,default=1,則將default=0默認(rèn)支持xen的內(nèi)核啟動

      第五:重啟系統(tǒng),重啟完成后,查看當(dāng)前內(nèi)核

      第六:xen安裝完成,執(zhí)行xm info 查看相關(guān)信息。

    uname-r

      xm info

      第七:安裝libvirt 和virt-manager:

      [root@localhost ~]#yum install libvirtvirt-manager

      啟動libvirt

      [root@localhost ~]# libvirtd –d

      第八:開始安裝xen虛擬主機(jī)準(zhǔn)備工作(利用命令行安裝xen虛擬機(jī))

      1、安裝apache,在apache根目錄下創(chuàng)建tree目錄,并創(chuàng)建/data

      [root@localhost xen]# yum install httpd

      [root@localhost ~]# service httpd start

      [root@localhost xen]# cd /var/www/html/

      [root@localhost html]# mkdir tree

      [root@localhost ~]# mkdir /data

      2、將centos的鏡像文件ftp上傳到/data目錄下

      3、將centos鏡像文件掛載到/var/www/html/tree/下

      [root@localhost ~]# mount -o loop/data/CentOS-6.5-x86_64-bin-DVD1.iso /var/www/html/tree/

      在瀏覽器下查看,這樣表示成功掛載:

      第九:開始用命令行創(chuàng)建虛擬機(jī)

      [root@localhost ~]# virt-install -nxentest -f /data/xentest.img -s 3 -r 782 --nographics -l http://192.168.1.147/tree/

      -n 指定創(chuàng)建虛擬機(jī)的名稱

      -f 作為磁盤映像使用的文件

      -s 磁盤映像的大小,單位為G

      -r 指定內(nèi)存的大小,單位為M

      --nographics 表示不安裝圖形控制臺

      -l 安裝的源

      然后根據(jù)系統(tǒng)提示安裝系統(tǒng),使用文本模式安裝,安裝過程跟真實(shí)機(jī)一樣,虛擬機(jī)的配置文件存放在

      /etc/xen下面

      提示:當(dāng)我指定內(nèi)存-r 384時(shí)

      安裝過程中提示內(nèi)存不足:You do nothave enough RAM to install ││ CentOS on this machine.

      第十:安裝完成后,查看真實(shí)機(jī)上的虛擬機(jī)列表

      第十一:連接到安裝好的xentest虛擬控制臺,并輸入用戶名和密碼

      [root@localhost ~]# xm console xentest

      附相關(guān)操作命令:

      ls /etc/xen #xen配置文件目錄

      xm list #查看各個域狀態(tài)

      xm shutdown xentest #關(guān)閉xentest這個虛擬機(jī)

      xm start xentest #啟動xentest這個虛擬機(jī)

      xm console xentest 連接xentest控制臺,連接到虛擬機(jī)上面可以用組合鍵 ctrl + ] 鍵切換到物理機(jī)

      

    看過“CentOS下怎么安裝xen虛擬機(jī)”的人還看了:

    1.CentOS 6.6系統(tǒng)怎么安裝

    2.如何在CentOS系統(tǒng)中安裝搭建

    3.怎么安裝Ubuntu操作系統(tǒng)

    4.如何用u盤安裝linux系統(tǒng)

    5.用U盤怎么安裝Linux系統(tǒng)

    6.服務(wù)器上怎么安裝linux系統(tǒng)

    916612