hacks/ubuntu-makevm/1804/Makefile

30 lines
525 B
Makefile
Raw Normal View History

2020-02-15 21:38:59 +00:00
export VMNAME := ubuntu1804
export DISK_DIR := /storage/scratch/tmp
export HOST := las1.local
.PHONY: clean install reinstall rcopy rrun
default: remote
clean:
-virsh destroy $(VMNAME)
-virsh undefine $(VMNAME)
rm -f $(DISK_DIR)/$(VMNAME).qcow2
install:
bash install.sh
reinstall: clean install
remote: rrun
rcopy:
rsync -avP ./ root@$(HOST):/storage/admin/vms/
rrun: rcopy
ssh -t root@$(HOST) "cd /storage/admin/vms && make reinstall"
2020-02-20 04:26:02 +00:00
rclean: rcopy
ssh -t root@$(HOST) "cd /storage/admin/vms && make clean"