..
Category : xcp-ng
# Install Xen: sudo apt-get update sudo apt-get upgrade sudo apt-get install xen-system # Edit interfaces sudo nano /etc/network/interfaces # and add the xen bridge: # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto ..
# Get the UUID of the VM by specifying the name, ex: “112-mail” UUID=`xe vm-list name-label=”112-mail” –minimal` # set the VM to autostart: xe vm-param-set uuid=$UUID other-config:auto_poweron=true Check that it actually worked: Restart dom 0 (main server), check that VM starts up auto..
how to start a VM by passing the VM name #!/bin/bash if [ -z “$1” ]; then echo “syntax: startVm.sh VM_NAME” exit 1 fi VMNAME=$1 echo “starting vm: $VMNAME now” xe vm-start vm=”$VMNAME” 2>&1 How to start all available VMs #!/bin/bash ALL=`xe vm-list power-state=halted –minimal` for UUID in $(echo $ALL | sed “s/,/ /g”) do ..
Scripting the creation of VMs will save you a ton of hours, and it’s quite awesome. This works best if you have an Ubuntu UNATTENDED install ISO created, which installs the whole OS without any input. Example script run, one-liner: ./createBox2021.sh k1 1 10 2 86:a9:a3:b0:99:01 Or with menu selections: You’ll need your install ISO ..
I used this guide: https://github.com/xcp-ng/xcp/wiki/Create-a-local-ISO-repository On the xen DOM0, create a place to store all ISOs, max 18gigs of space will be available. Then: Created: It shows up in xcp-ng center: Then, use git bash scp or FileZilla to sftp the files over to the dom0 /opt/mylocalisos directory, so that xen can ..
Setup: sudo su echo “up” > /root/nasstatus.txt Mount point check is a simple empty file sitting at: /mnt/nas/file.txt If this file goes missing, we call speak.sh to say that the NAS is down. nano /root/checkSamba.sh #!/bin/bash FILE=/mnt/nas/file.txt STATUSFILE=/root/nasstatus.txt # keep track of last status NASDOWN=$(cat “$STATUSFILE”) if [ ! -f $FILE ]; then nohup /opt/settings/scripts/speak.sh ..
As the user (don’t need to be root). # one time setup: echo “down” > xenstatus.txt checkXenSsh.sh: #!/bin/bash # one time setup: echo “down” > xenstatus.txt STATUSFILE=/home/pi/xenstatus.txt LASTSTATUS=$(cat “$STATUSFILE”) # check connection ssh -q root@xen.florida exit # status of ssh is stored in $? if [ `echo $?` = 255 ]; then nohup /opt/settings/scripts/speak.sh “zen ..
Using Ubuntu 18. Calling this service “shutdown” sudo nano /etc/systemd/system/shutdown.service Contents. Include the full path to your down.sh shell script. In this example, it’s /opt/settings/scripts/down.sh, and it calls a service using curl which then speaks to a speaker that the server is shutting down. [Unit] Description=My shutdown [Service] Type=oneshot RemainAfterExit=true ExecStop=/opt/settings/scripts/down.sh [Install] WantedBy=multi-user.target Enable the ..
First the samba share must exist. Then, go to the linux box, and: Install cifs utils which lets you mount samba shares: Create a credentials file with the login/password to the samba share, and store this credentials file in /etc/ nano /etc/nas.credentials Enter your network share login and password in this nas.credentials file: username=mysambauser password=mysecretpassword ..
Watch it ge..
Boot up and wait for the PERC card which manages your PowerVault drives, press Control R Verify all drives show up, and create an array, ex: RAID 10 Let it build the array… wait 24 hours Boot into XCP-NG Open a shell on the xcp-ng server Find your disk In this case, it’s /dev/sdb Create ..
..
..