Community discussions

 
chemil
just joined
Topic Author
Posts: 17
Joined: Thu Jun 23, 2011 10:33 am

Autostart for VM

Tue Jul 17, 2012 4:35 pm

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
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Autostart for VM

Wed Aug 01, 2012 9:07 am

guests should be started after the reboot of the host. What version and what guest you are running that is not started on reboot?
 
chemil
just joined
Topic Author
Posts: 17
Joined: Thu Jun 23, 2011 10:33 am

Re: Autostart for VM

Fri Aug 03, 2012 12:17 pm

The router is currently running v5.9 on x86.
Guest OS is Ubuntu 10.04.4 LTS
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Autostart for VM

Fri Aug 03, 2012 12:25 pm

try newer RouterOS release. Latest should start guest on boot-up if guest was running before reboot/shut-down.
 
chemil
just joined
Topic Author
Posts: 17
Joined: Thu Jun 23, 2011 10:33 am

Re: Autostart for VM

Fri Aug 03, 2012 1:56 pm

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
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Autostart for VM

Fri Aug 03, 2012 1:57 pm

how you have configured your guest entry in /kvm menu. Maybe you can post here so we could see the parts regarding VNC.
 
chemil
just joined
Topic Author
Posts: 17
Joined: Thu Jun 23, 2011 10:33 am

Re: Autostart for VM

Fri Aug 03, 2012 2:03 pm

[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
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Autostart for VM

Fri Aug 03, 2012 3:48 pm

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.
 
chemil
just joined
Topic Author
Posts: 17
Joined: Thu Jun 23, 2011 10:33 am

Re: Autostart for VM

Mon Aug 06, 2012 8:37 pm

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!
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Autostart for VM

Tue Aug 07, 2012 9:26 am

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.
 
chemil
just joined
Topic Author
Posts: 17
Joined: Thu Jun 23, 2011 10:33 am

Re: Autostart for VM

Tue Aug 07, 2012 10:11 am

It's one interface of QuadGigabit Ethernet PCI-Express card from Supermicro (S9AOCSGI4). It has an Intel 82571EB chipset.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Autostart for VM

Tue Aug 07, 2012 10:15 am

and is the address static or assigned dynamically.
 
chemil
just joined
Topic Author
Posts: 17
Joined: Thu Jun 23, 2011 10:33 am

Re: Autostart for VM

Tue Aug 07, 2012 12:11 pm

The IP address is static
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Autostart for VM

Tue Aug 07, 2012 12:37 pm

thank you for additional information.
 
chemil
just joined
Topic Author
Posts: 17
Joined: Thu Jun 23, 2011 10:33 am

Re: Autostart for VM

Tue Aug 07, 2012 2:17 pm

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.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Autostart for VM

Tue Aug 07, 2012 2:50 pm

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.

Who is online

Users browsing this forum: No registered users and 1 guest