Last active
August 29, 2015 14:23
-
-
Save kentarosasaki/8ea56b980b5daa558d35 to your computer and use it in GitHub Desktop.
CLI環境しかない状況でKVMのゲストVMのコンソールに入りKickstartで設定する方法 ref: http://qiita.com/kentarosasaki/items/060e734a7f0e0acfa342
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qemu-img create -f qcow2 /tmp/centos-6.3.qcow2 10G | |
virt-install --virt-type kvm \ | |
--name centos-6.3 \ | |
--ram 1024 --hvm --connect qemu:///system \ | |
--nographics --accelerate --network network:default \ | |
--disk /tmp/centos-6.3.qcow2,format=qcow2 \ | |
--os-type=linux --os-variant=rhel6 \ | |
--location=/var/www/html/centos-6.3-x86_64/iso \ | |
--extra-args="ks=http://127.0.0.1/centos-6.3-x86_64/ks.cfg console=ttyS0,115200n8 serial" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
systemctl start httpd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
virsh net-start default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /usr/loca/src/ | |
wget http://archive.kernel.org/centos-vault/6.3/isos/x86_64/CentOS-6.3-x86_64-bin-DVD1.iso |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir /mnt/centos-6.3 | |
mount /usr/loca/src/CentOS-6.3-x86_64-bin-DVD1.iso /mnt/centos-6.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum install httpd | |
mkdir -p /var/www/html/centos-6.3-x86_64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
virt-sysprep -d centos-6.3 | |
virsh undefine centos-6.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /var/www/html/centos-6.3-x86_64 | |
ln -s /mnt/centos-6.3 iso |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment