| Image Tasks / Create an HVM Image | |
This topic shows how to install a Linux distribution ISO and prepare an image for registration with Eucalyptus.
virt-install --name centos7 --ram 1024 --os-type linux --os-variant rhel7 -c /tmp/CentOS-7.0-x86_64-bin-DVD1.iso --disk path=/tmp/centos7.img,device=disk,bus=virtio --graphics vnc,listen=0.0.0.0 --force
<domain type='kvm'>
<name>eucalyptus-centos</name>
<os>
<type>hvm</type>
</os>
<features>
<acpi/>
</features>
<memory>1073741</memory>
<vcpu>1</vcpu>
<devices>
<!--<emulator>/usr/bin/kvm</emulator>-->
<disk type='file'>
<source file='/tmp/centos7.img'/>
<target dev='hda'/>
</disk>
<interface type='bridge'>
<source bridge='br0'/>
<model type='virtio'/>
</interface>
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
</devices>
</domain>
DEVICE="eth0" BOOTPROTO="dhcp" #HWADDR="B8:AC:6F:83:1C:45" IPV6INIT="yes" MTU="1500" NM_CONTROLLED="yes" ONBOOT="yes" TYPE="Ethernet" UUID="499c07cc-4a53-408c-87d2-ce0db991648e" PERSISTENT_DHCLIENT=1
# grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro root=/dev/sda2 # initrd /initrd-[generic-]version.img #boot=/dev/sda default=0 timeout=5 #splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title Eucalyptus (n.n.32-358.18.1.el7.x86_64) root (hd0,0) kernel /vmlinuz-n.n.32-358.18.1.el7.x86_64 ro root=UUID=062b9c31-95f3-424f-8b47-35107cfdfc08 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb initrd /initramfs-n.n.32-358.18.1.el7.x86_64.img
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm # yum install cloud-init
# adduser ec2-user # passwd ec2-user
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
ec2-user ALL=(ALL) NOPASSWD: ALL