Lab3: Server1部署
Target: Creating Virtual Machine- vserver
1. 準備kickstart檔案: vserver.cfg
可以從/root/anaconda-ks.cfg , 複製為vserver.cfg , 再修改
# Kickstart file automatically generated by anaconda.
install
nfs --server=192.168.0.254 --dir=/var/ftp/pub/RHEL5
key --skip
lang en_US.UTF-8
keyboard us
xconfig --driver vesa --resolution 800x600 --depth 16
network --device eth0 --bootproto dhcp
rootpw --iscrypted $1$lvU6kOK5$wzGy5BlTgkfyXjFO8C0Qo0
firewall --disabled
authconfig --enableshadow --enablemd5
selinux --enforcing
..略.....
2. virt-manager建立Virtual Machine
(1)可由圖形介面建立 #virt-manager
(2) 文字模式下: virt-install (詳請查#man virt-install)
[root@server1 conf]# cat virt-install_vserver.sh
#!/bin/bash
virt-install --paravirt --location=ftp://192.168.0.254/pub/RHEL5 --file=/var/lib/xen/images/vserver.img --name=vserver --vcpus=1 --ram=256 --bridge=xenbr0 --extra-args="text ks=ftp://192.168.0.254/pub/conf/vserver.cfg"
3. 建立空白file: 4G, 放在/var/lib/xen/images/目錄
#dd if=/dev/zero of=/var/lib/xen/images/vserver.img bs=1M count=4000
4000+0 records in
4000+0 records out
4194304000 bytes (4.2 GB) copied, 81.4794 seconds, 51.5 MB/s
4. 準備好了,就開始安裝啦
#./virt-install_vserver.sh (把virt-install長長指令寫成script, 以免打錯字)
如果很順利是不會卡住,如果有...就只好TroubleShoot囉
TroubleShoot:
%因為vserver.cfg是用nfs去捉Packages, 故nfs server必須要先設定好再啟動, #chkconfig nfs on; #chkconfig nfslcok on #chkconfig portmap on
%IP 分享器的dhcp無法提供, 虛擬PC旳網卡xenbr0:IP Adddress, 必須設定好dhcp server, 由server1提供dhcp服務(IP分享器的dhcp要關閉)
%如IP分享器與server1為同一網段, 則可使用IP分享器的dhcp server, 可以捉到IP addres
%檢查Firewall, 必要的port都要打開, 進行安裝時才不會卡住(小弟的慘痛經歷...=.=", 找了半天才發現是Firewall....偶是豬頭)
...(No Trouble....)
5. 檢查vserver
[root@server1 images]# xm list
Name ID Mem(MiB) VCPUs State Time(s)
Domain-0 0 713 1 r----- 2973.8
vserver 14 255 1 -b---- 33.4
[root@server1 images]# ssh 192.168.0.118
root@192.168.0.118's password:
Last login: Thu Jul 9 00:29:13 2009 from 192.168.0.254
[root@server118 ~]#
6. 為了後面的Lab. 必須設定固定IP(192.168.0.118),修改Hostname(server118.example.com)
至於為什麼要設18...是偶上課座號, 習慣囉^^
Previous post in this category: [雜記]RHCE筆記整理-RH133-Server1部署(2)
Next post in this category: [雜記]RHCE筆記整理-RH133-Unit1(1)
[雜記]RHCE筆記整理-RH133-Server1部署(2) - 2009
[雜記]RHCE筆記整理-RH133-Server1部署(1) - 2009
學習(2)
[雜記]RHCE筆記整理-考試綱要(2)












Recommend to Front page
Comment Permissions: Only members may comment. If you are not a PIXNET member, click here to sign up.