Created
December 1, 2014 00:55
-
-
Save rubenerd/825376092d73ed96936a to your computer and use it in GitHub Desktop.
virt-install CentOS Xen
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
#!/bin/sh | |
## CentOS 6 Xen HVM install, with VNC access | |
## Works decently, but Packer.io more flexible | |
name='centos-6' | |
ram=1024 | |
cpus=1 | |
description="CentOS 6 x86_64 Xen HVM" | |
location="http://mirror.internode.on.net/pub/centos/6.6/os/x86_64/" | |
disksize=2 | |
network='bridge=xenbr0' | |
kickstart='centos-6-kickstart.cfg' | |
virt-install | |
--connect xen:/// \ | |
--hvm \ | |
--name="${name}" \ | |
--ram="${ram}" \ | |
--vcpus="${cpus}" \ | |
--description="${description}" \ | |
--location="${location}" \ | |
--os-type="linux" \ | |
--disk "path=${name}.img,size=${disksize}" \ | |
--network="${network}" \ | |
--graphics vnc,listen=0.0.0.0 \ | |
--noautoconsole \ | |
--initrd-inject="${kickstart}" \ | |
--extra-args="text ks file:/${kickstart}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment