noVNC VM restart after installation from ISO

lubr

New Member
May 13, 2024
10
1
3
Hi,

I have implemented noVNC via API into my client's webapp. Usually, noVNC console is used for installing OS from ISO attached in IDE0 CD-ROM. There is a requirement from client to automatically detach ISO from CD-ROM once installation in noVNC is done and signal SIGKILL is used to reboot VM. I thought I would see this VM reboot in tasks, but since it is not called via API, there is none, as well as there is none in Syslog itself from which I thought I would parse it. So question is: is there any way how to handle this, I mean to detect restart after installation in noVNC has been performed and detach medium from IDE0 on this event?

Thx.
 
Hi,

I have implemented noVNC via API into my client's webapp. Usually, noVNC console is used for installing OS from ISO attached in IDE0 CD-ROM. There is a requirement from client to automatically detach ISO from CD-ROM once installation in noVNC is done and signal SIGKILL is used to reboot VM. I thought I would see this VM reboot in tasks, but since it is not called via API, there is none, as well as there is none in Syslog itself from which I thought I would parse it. So question is: is there any way how to handle this, I mean to detect restart after installation in noVNC has been performed and detach medium from IDE0 on this event?

Thx.
Hi,

As I understand it you're triggering the sigkill instead of using the API...

Have a look here: https://pve.proxmox.com/pve-docs/api-viewer/

With the API you can achieve what you're trying to do - IMHO a nicer way to script automatic deployment

Tobias
 
As I wrote above, I am using API. But when you are inside VNC console and you install eg. OS from ISO, there is reboot from within this ISO installation inside VNC console. So VM se rebooted "inside" VNC console, not via API. I cannot stop installation before reboot from within the console and say "please, use button below to reboot" to user where this button would call API to reboot. It is like forcing user to press hard-reset on PC case instead clicking Restart link on the screen in the end of the OS installation.

So, my question was if there is a way how to know about this "inside-VNC-reboot" event to remove ISO from CD-ROM to avoid booting from it after restarting VM again.
 
Hi,

Ah, now I get it.

Maybe you could trigger the os status from the qemu-agent? At least once it's up and the agent is running you then could remove the ISO that way?

Tobias
 
Thx for giving me some hints. But the issue is QEMU agent will not be always available on VM. Which means I have to find the other way. Don't you know if there are any other logs besides syslog/tasks log I could parse and find the information about that SIGKILL signal execution?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!