Autostart for VM

Hello, is there any “autostart” parameter for VMs virtualized on KVM inside RouterOS?
After router reboot all VMs are waiting for manual start.

Solution alredy exist on stadard linux KVM “virsh autostart vmName”
Thank you in advance

guests should be started after the reboot of the host. What version and what guest you are running that is not started on reboot?

The router is currently running v5.9 on x86.
Guest OS is Ubuntu 10.04.4 LTS

try newer RouterOS release. Latest should start guest on boot-up if guest was running before reboot/shut-down.

After router reboot with the latest RouterOS (v5.19) my VM has only “vnc cant bind” in the status and it is necessary to start it manually

how you have configured your guest entry in /kvm menu. Maybe you can post here so we could see the parts regarding VNC.

[admin@XXXX] > kvm print
Flags: X - disabled
0 name=“VM” cpu-count=2 memory=512MiB
disk-images=hda:ubuntu.img,cdrom:ubuntu-10.04.3-server-i386.iso kernel=“”
kernel-cmdline=“console=ttySO” initrd=“” vnc-server-address=192.168.80.1
vnc-server-display=1 snapshot=no state=running

do this address exists on the router

 vnc-server-address=192.168.80.1

on on what interface it is assigned? You could try to create empty bridge interface and assign address on it and try to bind vnc on that address or set this attribute value to 0.0.0.0 so it will accept connections on all available ip addresses on the router.

Yes, this IP address belongs to ether2 however I did exactly what you suggested.
I changed vnc-server-address to 0.0.0.0 and now the VM starts after reboot automatically.

Thank you for your support!

what interface is that, as only thing i can think of - at the time when KVM starts its guests - interface is not there as result, IP address is invalid and KVM cannot bind VNC to that ip address.

It’s one interface of QuadGigabit Ethernet PCI-Express card from Supermicro (S9AOCSGI4). It has an Intel 82571EB chipset.

and is the address static or assigned dynamically.

The IP address is static

thank you for additional information.

I thank you janisk.

It might be also related to link establishment delay between router NIC and switch. I’m using WS-C2960S-24TS-L switch here and I’m sure that it has auto-negotiation configured on all ports.
It might be worth to try set up link speed and duplex manualy on these ports and on both devices and redo this test with the previous config.

Let me know if you are interested in the result of such a test because for me yours solution is sufficient enough.

if that is gigabit link you have to have auto-negotiation enabled for the port since gigabit is negotiating not only link speed and duplex as that was for Fast Ethernet interfaces. We will check what we can do with links that could become active later on and thus force guest to fail, since address is not ready to be bind()ed to.