Commonly Asked Questions¶
RemoteLabZ Logs location¶
RemoteLabz's logs are located under /opt/remotelabz/var/log/
and RabbitMQ's log under /var/log/rabbitmq
Change password of phpmyadmin¶
sudo mysql -h localhost -u root -p
CREATE USER 'phpmyadmin'@'localhost' IDENTIFIED BY '<New-Password-Here>';
GRANT ALL PRIVILEGES ON *.* TO 'phpmyadmin'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
List the RabbitMQ messages waiting¶
On the RabbitMQ server To list the number of message in each queues
sudo rabbitmqctl list_queues
How to modify the image of the device¶
To avoid a teacher or an user include a corrupted image, only the administrator can modify an existing default image. With the menu Device Sandbox
, a new lab is created and after the export button is click, a new device template and new Operating Systems are created. To make an export, you have to :
- Click on
Device Sandbox
- Click on the Modify button of the device whose image you wants to modify
- Start the device
- Make your modification
- Stopped the device
- Click on Export and choose a name for you new device template
- Leave the lab
How to increase size of disk on LVM virtual machines¶
- Shutdown the VM
- Right click the VM and select Edit Settings
- Select the hard disk you would like to extend
- On the right side, make the provisioned size as large as you need it and confirm
- Power on the VM and connect to it.
- Identify your disk name with
sudo fdisk -l
for example /dev/sda sudo fdisk /dev/sda
- Enter
p
to print the partition table - Enter
n
to add a new partition - Enter
p
again to make it a primary partition - Enter the number of your new partition
- Pick the first cylinder which will most like come at the end of the last partition (this is the default value)
- Enter the amount of space (default is the rest of space available)
- Enter
w
to save these changes - Restart the VM and log in
- Type
sudo fdisk -l
and check that a new partition is present - Find your volume group with
df -h
.- Example:
/dev/mapper/ubuntu--vg-root 15G 4.5G ...
- Volume group is:
ubuntu-vg
- Example:
- Extend the volume group :
sudo vgextend [volume group] /dev/sdaX
- Example:
sudo vgextend ubuntu-vg /dev/sda3
- Example:
- Find the amount of free space available :
sudo vgdisplay [volume group] | grep "Free"
- Expand the logical volume :
sudo lvextend -L+[freespace]G /dev/[volgroup]/[volume]
- Example 1:
sudo lvextend -L+64G /dev/ubuntu-vg/root
- Example 2:
sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu
- Example 1:
- Expand the ext3 file system in the logical volume :
sudo resize2fs /dev/[volgroup]/[volume]
- Example:
sudo resize2fs /dev/ubuntu-vg/root
- Example:
- You can now run the df command to very that you have more space
df -h
How to import a new image from an OVA¶
We assume your image has the name import_vm.ova
in OVF format and in your home directory.
cd ~
mkdir new_image
cd new_image
tar xvf ../import_vm.ova new_image.img -O qcow2
sudo mv Rocky_Linux.img /opt/remotelabz-worker/images/
How to remove all bridge OVS on a worker manually¶
for i in $(sudo ovs-vsctl show | grep "Bridge" | grep "br-" | cut -d " " -f 6); do sudo ovs-vsctl del-br $i; done;
How to check the the queue and exchange with RabbitMQ¶
To list the queues
rabbitmqadmin list queues
To list the exchange
rabbitmqadmin list exchanges
To delete an exchange
sudo rabbitmqadmin delete exchange name="worker"
To create an exchange with a specific type (direct or fanout)
sudo rabbitmqadmin declare exchange name="worker" type="direct"
To clear a queue
sudo rabbitmqadmin purge_queue queue_name
How to list all routes of the proxy¶
On the front
curl http://localhost:8001/api/routes
Too many file opened¶
Many parameters have to be modify. Add following lines in /etc/sysctl.conf
and execute a sysctl -p
the system read this file.
fs.inotify.max_user_watches=60000
fs.inotify.max_user_instances=10000
fs.file-max=9793398
You can also modify the file /etc/security/limits.conf
which is read on boot and use the command prlimit --nofile=300000:500000 --pid Process_Number
(ulimit
is obsolete) to change this value for a given process
without reboot your server
* soft nofile 65535
* hard nofile 524288