User Tools

Site Tools



defining virsh iscsi pools

How to use iscsi to store virtual machines?

  • requires already setup iscsi target
cat >/root/iscsi_target.xml<<EOT
<pool type='iscsi'>
        <host name=''/>
        <device path=''/>

pool-define /root/iscsi_target.xml

# shows the pool as inactive:
pool-list --all

pool-start iscsi_target
vol-list iscsi_target
vol-info /dev/disk/by-path/
vol-dumpxml /dev/disk/by-path/
pool-autostart iscsi_target

using virsh iscsi pool

virt-install -n $HOSTNAME -r 1024 --cpu host --disk vol=iscsi_target/unit:0:0:1 \
        --location /mnt/store/cobbler/x86_64/$DISTRO/  \
        --vcpus 2 -w bridge=virbr0 --os-variant rhel5.4 --graphics vnc \
        --extra-args "ip=$IPADDR netmask= ks=$HOSTNAME repo=$DISTRO"
software/iscsi/virsh_iscsi_vm.txt ยท Last modified: 2021/03/23 12:22 (external edit)