The virsh network and volume pool made persistent
1. The network pool persistent and autostarted 2. The volume pool made persistent and autostarted 3. The vms are made autostarted Change-Id: Ie6c66a1862e002c5cf7e2911a39dc051b50faab3
This commit is contained in:
parent
683dfc8190
commit
83fe3e1682
@ -96,7 +96,9 @@ net_clean() {
|
||||
net_declare() {
|
||||
if ! virsh net-list --name | grep ^airship_gate$ > /dev/null; then
|
||||
log Creating Airship gate network
|
||||
virsh net-create "${XML_DIR}/network.xml" &>> "${LOG_FILE}"
|
||||
virsh net-define "${XML_DIR}/network.xml" &>> "${LOG_FILE}"
|
||||
virsh net-start airship_gate
|
||||
virsh net-autostart airship_gate
|
||||
fi
|
||||
}
|
||||
|
||||
@ -104,7 +106,9 @@ pool_declare() {
|
||||
log Validating virsh pool setup
|
||||
if ! virsh pool-uuid "${VIRSH_POOL}" &> /dev/null; then
|
||||
log Creating pool "${VIRSH_POOL}"
|
||||
virsh pool-create-as --name "${VIRSH_POOL}" --type dir --target "${VIRSH_POOL_PATH}" &>> "${LOG_FILE}"
|
||||
virsh pool-define-as --name "${VIRSH_POOL}" --type dir --target "${VIRSH_POOL_PATH}" &>> "${LOG_FILE}"
|
||||
virsh pool-start "${VIRSH_POOL}"
|
||||
virsh pool-autostart "${VIRSH_POOL}"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -184,6 +188,7 @@ vm_create() {
|
||||
--import \
|
||||
--disk "vol=${VIRSH_POOL}/airship-gate-${NAME}.img,${DISK_OPTS}" &>> "${LOG_FILE}"
|
||||
fi
|
||||
virsh autostart "${NAME}"
|
||||
}
|
||||
|
||||
vm_create_validate() {
|
||||
|
Loading…
Reference in New Issue
Block a user