KVM
To recover your EMS user password on KVM:
-
Shut down the EMS VM using the following command:
sudo virsh shutdown <vm-name>
Alternatively, shut down the VM via virt-manager if you prefer using the GUI.
-
Wait until the VM is completely powered off before proceeding.
-
Attach the recovery ISO to the VM as a read-only CD-ROM device (via SCSI):
sudo virsh attach-disk <vm-name> <full-path-to-forticlient_vm_password_recovery.iso> sdb --type cdrom --mode readonly --config
<vm-name>Replace with your VM’s name <full-path-to-forticlient_vm_password_recovery.iso>Replace with the absolute path to the ISO file on the host. sdbDevice name assigned to the CD-ROM. Ensure it matches what you will configure in the VM XML. --configThe flag makes this persistent across VM reboots.
-
Edit the VM configuration to set ISO as boot priority:
-
Open the VM XML configuration for editing:
sudo virsh edit <vm-name>
-
Under the <os> section, remove any existing boot device line, such as
<boot dev='hd'/>, so it looks like this (no boot lines):<os> <type arch='x86_64' machine='pc-q35-6.2'>hvm</type> </os>
-
Under the <devices> section:
-
Ensure the SCSI controller exists:
<controller type='scsi' model='virtio-scsi'/>
-
Add or verify the CD-ROM device entry is configured to match the attached ISO path and device:
<disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='<full-path-to-forticlient_vm_password_recovery.iso>'/> <target dev='sdb' bus='scsi'/> <readonly/> <boot order='1'/> </disk>
Replace
<full-path-to-forticlient_vm_password_recovery.iso>with the ISO’s absolute path.
-
-
Save and exit the editor.
-
-
Start the VM:
sudo virsh start <vm-name>Alternatively, use virt-manager to start the VM.
The VM will boot from the recovery ISO.
-
Open the VM console and wait for the recovery process to finish. You should see a message similar to the following:
SUCCESS: Password for ‘ems’ has been reset
-
Once the password reset is confirmed, eject the recovery ISO:
sudo virsh change-media <vm-name> sdb --eject --config
-
To safely remove the CD-ROM device, first force stop the VM:
sudo virsh destroy <vm-name>
Alternatively, stop the VM from virt-manager.
-
Remove the CD-ROM device from the VM configuration by editing the VM config again:
sudo virsh edit <vm-name>
Inside
<devices>, remove the entire<disk ... device='cdrom'>...</disk>block that you previously added for the recovery ISO. Or, if you want to keep the device, just remove the<boot order='1'/>line so the VM boots from disk normally. -
Save and exit.
-
To verify the result, start the VM again using the following command (or virt-manager):
sudo virsh start <vm-name>
You should now be able to log in with the default credentials (username and password are both ems). On the first login, you will be prompted to set a new password, which you should do immediately for security.