Skip to content

Commit

Permalink
Merge pull request #34 from Cray-HPE/MTL-2367
Browse files Browse the repository at this point in the history
MTL-2367 Define management-vm
  • Loading branch information
rustydb authored Jan 16, 2024
2 parents 388ade2 + 1aebc2a commit ad527f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crucible/scripts/management-vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ xorriso -as genisoimage \
"${MGMTCLOUD}/network-config"
yq --xml-attribute-prefix='+@' -o xml -i -p xml eval '(.domain.devices.disk.[] | select(.source."+@file" == "*cloud-init.iso").source) |= {"+@file": "'"${MGMTCLOUD}/cloud-init.iso"'"}' "${BOOTSTRAP}/domain.xml"
yq --xml-attribute-prefix='+@' -o xml -i -p xml eval '(.domain.devices.filesystem | select(.target."+@dir" == "assets").source) |= {"+@dir": "/vms/store0/assets"}' "${BOOTSTRAP}/domain.xml"
virsh create "${BOOTSTRAP}/domain.xml"
virsh define "${BOOTSTRAP}/domain.xml" || echo "Domain already defined"
virsh autostart "${BOOTSTRAP}/domain.xml" || echo "Autostart already enabled"
virsh start "${BOOTSTRAP}/domain.xml"

echo -en 'Management VM created ... observe startup with:\n\n'
echo -en '\tvirsh console management-vm\n\n'
Expand Down

0 comments on commit ad527f5

Please sign in to comment.