latest
This commit is contained in:
30
ubuntu-makevm/2004/Makefile
Normal file
30
ubuntu-makevm/2004/Makefile
Normal file
@@ -0,0 +1,30 @@
|
||||
export VMNAME := ubuntu2004
|
||||
export DISK_DIR := /storage/scratch/tmp
|
||||
export THAT_DIR := /storage/admin/vms/2004
|
||||
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):/$(THAT_DIR)/
|
||||
|
||||
rrun: rcopy
|
||||
ssh -t root@$(HOST) "cd /$(THAT_DIR) && make reinstall"
|
||||
|
||||
rclean: rcopy
|
||||
ssh -t root@$(HOST) "cd /$(THAT_DIR) && make clean"
|
||||
|
||||
Reference in New Issue
Block a user