create-vmachine: Create libvirt domain earlier in the process
By moving the domain definition task earlier in the provisioning process, it allows the administrator the option of opening the virtual console in preparation for the virtual machine's first boot. This may be necessary if, for example, the boot needs to be closely monitored, as there may not be enough time to launch the console before the machine starts.master
parent
42f54e4f63
commit
b420683c70
|
@ -140,11 +140,12 @@ sed -i 's/#s0/s0/' "${MOUNTPOINT}"/etc/inittab
|
|||
|
||||
trap - INT TERM EXIT
|
||||
|
||||
echo "Creating libvirt domain..."
|
||||
virsh -c qemu:///system define <(m4 -P -DNAME="${DOMNAME}" "${DOMXML_TMPL}")
|
||||
|
||||
echo "Cleaning up..."
|
||||
umount "${MOUNTPOINT}"/{run,usr,var,home,}
|
||||
vgchange -an ${VMNAME}
|
||||
|
||||
echo "Creating libvirt domain..."
|
||||
virsh -c qemu:///system define <(m4 -P -DNAME="${DOMNAME}" "${DOMXML_TMPL}")
|
||||
echo "Starting virtual machine..."
|
||||
virsh -c qemu:///system start ${DOMNAME}
|
||||
|
|
Loading…
Reference in New Issue