Skip to content

Commit

Permalink
Add addtional commands
Browse files Browse the repository at this point in the history
  • Loading branch information
gbraad committed Jan 22, 2025
1 parent 7c6d6bf commit fe1e18e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions zsh/.zshrc.d/machine.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,22 @@ mcn() {
download "$(mcnini --get disks.${PREFIX})" "${DISKFOLDER}/${PREFIX}.qcow2"
;;
"system" | "create")
sudo virt-install "${START_ARGS[@]}" --name "mcn-${PREFIX}" --import --disk "${DISKFOLDER}/${PREFIX}.qcow2"
;;
"start")
sudo virsh start "mcn-${PREFIX}"
;;
"stop")
sudo virsh destroy "mcn-${PREFIX}"
;;
"kill" | "rm" | "remove")
sudo virsh undefine "mcn-${PREFIX}"
;;
"console" | "shell")
sudo virsh console "mcn-${PREFIX}"
;;
"switch")
sudo bootc switch $(mcnini --get images.${PREFIX})
;;
*)
echo "Unknown command: dev $PREFIX $COMMAND"
Expand Down

0 comments on commit fe1e18e

Please sign in to comment.