win2003 OK
驱动
wget
wget
http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/virtio-win-0.1-30.iso生成文件
kvm-img create -f qcow2 windowsxp.img 5G
安装
kvm -m 512 -cdrom win2003sp2In.iso -drive file=windowsxp.img,if=virtio,boot=on -fda virtio-win-1.1.16.vfd -boot d -nographic -vnc :1
启动安装网卡
kvm -m 512 -cdrom virtio-win-0.1-30.iso -drive file=windowsxp.img,if=virtio,boot=on -net nic,model=virtio -net user -usb -usbdevice tablet -boot c -nographic -vnc :1 //安装网卡驱动 -usb可以解决鼠标问题
glance add name="Windows 2003 EE" is_public=true container_format=ovf disk_format=qcow2 < windowsxp.img
centos6.3 ok
qemu-img create -f qcow2 centos.img 10G
安装
qemu-system-x86_64 -m 1024 -boot d -drive file=centos.img,cache=writeback,if=virtio,boot=on -cdrom CentOS-6.3-x86_64-minimal.iso -usb -nographic -vnc :1 //坑爹呀,,给512不出图型的,亲们,,记住呀!!
启动
qemu-system-x86_64 -m 1024 -boot c -drive file=centos.img,cache=writeback,if=virtio,boot=on -cdrom CentOS-6.3-x86_64-minimal.iso -usb -nographic -vnc :1
配置
chkconfig sshd on
vi /etc/fstab
..
LABEL=cec-rootfs / ext4 defaults 0 0
vi /etc/sysconfig/network-scripts/ifcfg-eth0
改为dhcp
vi /etc/rc.local
...
mkdir -p /root/.ssh
echo >> /root/.ssh/authorized_keys
curl -m 10 -s | grep 'ssh-rsa' >> /root/.ssh/authorized_keys
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
echo "AUTHORIZED_KEYS:"
echo "--------------------"
cat /root/.ssh/authorized_keys
echo "--------------------"
vi /etc/ssh/sshd_config
...
RSAAuthentication yes
PubkeyAuthentication yes
PermitRootLogin without-password
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
# vi /etc/selinux/config
SELINUX=disabled
SELINUXTYPE=targeted
rm -rf /etc/udev/rules.d/70-persistent-net.rules
shutdown -h now
glance add name="CentOS 6.3" is_public=true container_format=ovf disk_format=qcow2 < centos.img
阅读(1817) | 评论(0) | 转发(0) |