Hello,
I’m trying to deploy a server using a template that contains a start_script = “touch /root/TEST.txt” in the context section but it doesn’t work, any suggestions?
Thank you.
Hello,
I’m trying to deploy a server using a template that contains a start_script = “touch /root/TEST.txt” in the context section but it doesn’t work, any suggestions?
Thank you.
my start script looks like this and works:
#!/bin/bash
if [ -d “/etc/this_folder” ]; then
:
else
mkdir /etc/this_folder
fi
i put a bash script in the start script to rule everytime the VM power ups.
Hello, dont work for me . My template is:
CONTEXT = [
CONTEXT = “true”,
DNS = “8.8.8.8”,
ETH0_GATEWAY = “192.168.4.1”,
ETH0_IP = “192.168.4.48”,
ETH0_MASK = “255.255.255.192”,
ETH0_NETWORK = “192.168.4.0”,
ETH0_SEARCH_DOMAIN = “mydomain.es”,
HOSTNAME = “redhatAnsible”,
START_SCRIPT_BASE64 = “#!/bin/bash
touch /root/TEST.txt” ]
CPU = “1”
DESCRIPTION = “Máquina virtual creada con ansible”
DISK = [
DRIVER = “qcow2”,
IMAGE = “redhat7.9_ansible”,
IMAGE_UNAME = “oneadmin” ]
GRAPHICS = [
KEYMAP = “es”,
LISTEN = “0.0.0.0”,
TYPE = “VNC” ]
HYPERVISOR = “kvm”
INPUTS_ORDER = “”
LOGO = “images/logos/redhat.png”
MEMORY = “1024”
MEMORY_UNIT_COST = “MB”
NIC = [
NETWORK = “VLAN 1111”,
NETWORK_UNAME = “oneadmin” ]
OS = [
ARCH = “x86_64”,
BOOT = “disk0” ]
SCHED_RANK = “-RUNNING_VMS”
SCHED_REQUIREMENTS = "ID=“5"”
VCPU = “1”
there is any error?
Thank you.
Hello @jeyc,
The problem is that your START_SCRIPT_BASE64
is not in base64 form, you should have something like: IyEvYmluL2Jhc2gKdG91Y2ggL3Jvb3QvVEVTVC50eHQK
.
Best,
Álex.
Go to Templates - VMs - select your VM template
Then “update” - “context” - and there you enter the bash script
after that you click on the “update” button and then you’ll see in the template the BASE64 hash mentioned by Alex above me.
Hello,
I have tried the following:
and I have also tried the following:
but dont work for me
Thank you.
Hello,
I have managed to make it work by installing the one_context package in the virtual machine and restarting it, but curiously I have lost the IP address. I’m still investigating.
Thank you.