Installation guide

04.rhel:rhel5:iscsi.kvmguest-lun-2</path>
<format type='unknown'/>
<permissions>
<mode>0660</mode>
<owner>0</owner>
<group>6</group>
<label>system_u:object_r:fixed_disk_device_t:s0</label>
</permissions>
</target>
</volume>
4. Act ivat in g t h e st o rag e at bo o t t ime
Once correctly configured, the pool can be set to start automatically upon booting of the host:
# virsh pool-autostart kvmguest
Pool kvmguest marked as autostarted
5. Pro visio n in g a gu est o n iSC SI
The virt-install command can be used to install new guests from the command line. The
--disk argument can take the name of a storage pool, followed by the name of any contained
volumes. Continuing this example, the following command will begin the installation of a
guest with two disks; the first disk is the root file system, the second disk can be shared
between multiple guests for common data:
# virt-install --accelerate --name rhelx86_64 --ram 800 --vnc --disk \
vol=kvmguest/10.0.0.1 --disk vol=kvmguest/10.0.0.2,perms=sh --pxe
Once this rh elx86 _6 4 guest is installed, the following command and output shows the XML
that virt-install used to associate the guest with the iSCSI LUNs:
# virsh dumpxml rhelx86_64
<domain type='kvm' id='4'>
<name>rhelx86_64</name>
<uuid>ad8961e9-156f-746f-5a4e-f220bfafd08d</uuid>
<memory>819200</memory>
<currentMemory>819200</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64' machine='rhel'>hvm</type>
<boot dev='network'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/disk/by-path/ip-192.168.122.170:3260-iscsi-iqn.2004-
04.rhel:rhel5:iscsi.kvmguest-lun-1'/>
<target dev='hda' bus='ide'/>
<alias name='ide0-0-0'/>
Chapt er 2 4 . Using shared st orag e wit h virt ual disk images
253