Login

AUTOVM Blog > News > RockyLinux 9.1…

RockyLinux 9.1 is available

By Alireza Mahdavi | 23 December 2022 | 1787 views

RockyLinux 9.1 is available

AlmaLinux version 9.1 has been released for the AutoVM platform.

Download and deploy OVA templates into your servers through this address.

Then go to “AutoVM admin area > Template > Template > Create” and enter the following details:

Name: Rocky 9 64
Username: root
Password: 123QWEqwe
Clue: rocky_9_64
Icon: Rocky

Click on save and go to “Template > Script > Create” and enter the following details:

Category: Rocky (Create it if you don’t have it)
Name: Setup
Template: Rocky 9 64
Type: Setup
Where is program: /bin/bash
Where to upload: /home/setup.sh
How to execute: /home/setup.sh

Enter the following code into the “Content” part:

#!/bin/bash

# FIND NAME
name=$(ls /sys/class/net | head -n 1)

# Rocky
function rockyIP {

cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-$name
DEVICE=$name
TYPE=Ethernet
IPADDR=@address
NETMASK=@netmask
GATEWAY=@gateway
ONBOOT=YES
DNS1=4.2.2.4
DNS2=8.8.4.4
EOF

systemctl restart NetworkManager
}

rockyIP


# RESIZE PARTITION
function commonPartition {

    # RESIZE PARTITION
    (echo d; echo n; echo p; echo ; echo ; echo ; echo N; echo w) | fdisk /dev/sda

    # RESIZE FILESYSTEM
    partprobe && xfs_growfs /dev/sda1
}


commonPartition


# PUBLIC KEY
if [ ! -z "@publicKey" ]; then

    # SSH DIRECTORY
    mkdir -p $HOME/.ssh

    # PUBLIC KEY
    echo "@publicKey" > $HOME/.ssh/authorized_keys
fi

# PASSWORD
(echo "@password"; echo "@password") | passwd @username

# HOSTNAME
if [ ! -z "@name" ]; then

    hostnamectl set-hostname "@name"
fi

# DELETE FILE
rm /home/setup.sh

Related Blogs

AlmaLinux 9.1 is available

AlmaLinux version 9.1 has been released for the AutoVM platform. Download and deploy OVA templates into your servers through this address. Then go to […]

VMware network traffic monitoring

By having AutoVM as your infrastructure manager, you can limit your user’s virtual machine consumption regarding the transmitted and received amount of traffic through […]

Add Ubuntu 22.04 and Debian 11 on AutoVM

Ubuntu 22.04 and Debian 11 has been released for AutoVM platform. Download and deploy OVA templates into your servers. Ubuntu and Debian link. Then […]

Subscription for email

Future-proof your business by moving to AutoVM