[#662] 4.0b1 | Start on boot not working when order is set

mjb2000

New Member
Jul 16, 2015
22
1
1
I have Proxmox VE 4.0 beta 1 working pretty well in my home environment, but I have run in to an issue with starting machines automatically when the node starts.

If I select "Start on boot" then everything works fine and all machines with the flag start when the node starts.

The problem comes if I set an 'Startup order', 'Startup delay', or 'Shutdown timeout'. If any of these variable is set then the task list shows an error when that particular VM is started. For example...

Code:
[COLOR=#000000][FONT=tahoma]Undefined subroutine &PVE::JSONSchema::parse_startup called at /usr/share/perl5/PVE/API2/Nodes.pm line 1162.[/FONT][/COLOR]
[COLOR=#000000][FONT=tahoma]Starting VM 101[/FONT][/COLOR]
[COLOR=#000000][FONT=tahoma]trying to aquire lock... OK[/FONT][/COLOR]
[COLOR=#000000][FONT=tahoma]TASK OK
[/FONT][/COLOR]

In this error above VM's 100 and 101 were both set to start at boot. VM 100 had a startup delay of "60" specified. As you can see, rather than starting VM 100 and error has been recorded. Whereas VM 101 has no additional startup variables defined and it started normally.
 
Re: 4.0b1 | Start on boot not working when order is set

Wow - Thanks for taking a look and for your quick reply. I didn't want to raise a bug in case I was doing something wrong.

I have created the bug here: https://bugzilla.proxmox.com/show_bug.cgi?id=662

Do you know what the typo is and how it should be fixed? I'd like to just fix it manually on my installation if possible.

M
 
Re: 4.0b1 | Start on boot not working when order is set

Yes, on line 1152 and 1162 in your Nodes.pm file, should be in /usr/share/perl5/PVE/API2/Nodes.pm change
Code:
# line 1152
$startup = PVE::JSONSchema::parse_startup($conf->{'pve.startup'});
# to 
$startup = PVE::JSONSchema::pve_parse_startup_order($conf->{'pve.startup'});

# line 1162
$startup =  PVE::JSONSchema::parse_startup($conf->{startup});
# to
$startup =  PVE::JSONSchema::pve_parse_startup_order($conf->{startup});
you noticed the function 'parse_startup' got replaced with 'pve_parse_startup_order'.

It's also misspelled in QemuServer.pm (/usr/share/perl5/PVE/QemuServer.pm) on line 4400, there should be:
Code:
my $opts = PVE::JSONSchema::pve_parse_startup_order($conf->{startup});
You can fix it for yourself there too, to be sure that this bug doesn't affect you anymore :)
 
Last edited by a moderator:
Re: 4.0b1 | Start on boot not working when order is set

Thank you VERY much :)

This has got it working.

I will leave this post as unresolved until the bug is fixed centrally, but hopefully this will help anyone experiencing this issue.

M
 

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!