9月 05
[dhcp.yubo.org]
#修改为用来安装虚拟机的ks文件
- [root@dhcp ~]# cat /var/www/html/ks.cfg << EOF
- key 4c10c9d64c6b34c9
- lang en_US.UTF-8
- keyboard us
- xconfig --startxonboot
- network --device eth0 --bootproto static --ip 192.168.1.111 --hostname v1.yubo.org --netmask 255.255.255.0 --gateway 192.168.1.254 --nameserver 202.103.24.68
- rootpw mario
- firewall --disabled
- authconfig --enableshadow --enablemd5
- selinux --disabled
- timezone Asia/Shanghai
- bootloader --location=mbr --driveorder=sda --append="rhgb quiet"
- # The following is the partition information you requested
- # Note that any partitions you deleted are not expressed
- # here so unless you clear all partitions first, this is
- # not guaranteed to work
- clearpart --linux
- part / --fstype ext3 --size=3584
- part swap --size=256
- %packages
- @cluster-storage
- @admin-tools
- @editors
- @text-internet
- @gnome-desktop
- @core
- @base
- @clustering
- @java
- @base-x
- @graphics
- @graphical-internet
- scsi-target-utils
- iscsi-initiator-utils
- kexec-tools
- bridge-utils
- device-mapper-multipath
- xorg-x11-utils
- xorg-x11-server-Xnest
- libsane-hpaio
- -sysreport
- EOF
将rhel5的iso插入dhcp.yubo.org的光驱->挂载->共享到apache的DocumentRoot目录,给v1用来远程安装
[root@dhcp ~]# mkdir /mnt/cdrom
[root@dhcp ~]# mount /dev/cdrom /mnt/cdrom
[root@dhcp ~]# ln -s /mnt/cdrom /var/www/html/cdrom
[root@dhcp ~]# mount /dev/cdrom /mnt/cdrom
[root@dhcp ~]# ln -s /mnt/cdrom /var/www/html/cdrom
[p1.yubo.oirg]
进入图形界面,执行
[root@iscsi ~]# virt-manager
一路forward,途中填入
system Name:v1
Paravirtualized
Install Medai URL: http://192.168.1.5/cdrom
Kickstart URL: http://192.168.1.5/ks.cfg
Simple File->File Location: /var/lib/xen/images/v1.img
Shared physical device -> Device: xenbr0
VM Max Memory(MB): 252
VM Startup Memory(MB): 252
VCPUs:1
Paravirtualized
Install Medai URL: http://192.168.1.5/cdrom
Kickstart URL: http://192.168.1.5/ks.cfg
Simple File->File Location: /var/lib/xen/images/v1.img
Shared physical device -> Device: xenbr0
VM Max Memory(MB): 252
VM Startup Memory(MB): 252
VCPUs:1
等待一段时间后,v1.yubo.org就安装完成了,下面是过程的截图







Leave a Reply
You must be logged in to post a comment.