Imaging - Davos Debug
Launch Davos, then press CTRL+C
From here, there are two options: Local connection or SSH
From here, there are two options: Local connection or SSH
Local connection:
# in the Davos console sudo su dpkg-reconfigure keyboard-configuration systemctl restart keyboard-setup python3
SSH connection:
First, retrieve the machine's IP address, then from the relay server:
ssh user@<IP>
Password: live
sudo su python3
- To register the machine:
from davos import davosManager from davos.inventory import Inventory davos = davosManager() inv = Inventory(davos) # # Enter the hostname in the input # this will send the XML to pulse2-register-pxe
print("mac address: {}".format(inv.macaddress))
print("ip address: {}".format(inv.ipaddress))
print("netmask: {}".format(inv.netmask))
print("disk : {}".format(inv.disk))
# The inventory (unmodified) is located in: less /tmp/inventory.xml # There must be a missing / between tmp and macaddress, causing the file to be generated in / /tmp<macaddress.xml
- To debug the backup
from davos import davosManager from davos.image_saver import imageSaver davos = davosManager() saver = imageSaver(davos) saver.start()
Save the backup:
saver.imaging_api.imageDone(saver.manager.mac, saver.image_uuid)
- To debug the restore:
from davos import davosManager from davos.image_restorer import imageRestorer davos = davosManager() img = imageRestorer(davos, "unicast")
To start a full restore:
img.start()
To run only the post-installs
img.run_postimaging()
The Davos logs are located in:
/var/log/davos.log
/var/log/davos_restorer.log
The post-install logs are located in:
/tmp/postinst.xxx.log
Postinstalls are located in /imaging_server/masters/<master_uuid>/postinst.d/
The master UUID can be retrieved from the imaging.Image table in the database.