On 06/07/2018 14.04, Fred Liu wrote:

Hi,

Not sure there are already similar discussions here.
As far as I know, if I just reboot smartos, the server will *simultaneously* 
boot all the VMs in running status before the reboot.
That will give the following issues:

1): huge io pressure on storage. It will take longer time to finalize all the 
VMs' boot compared with non-simultaneous boot pattern.

2): If there are dependancies among these VMs, there would be failed VM boots.

 From my thinking, the VM boots are just like the service we initialize.

Is it possible to boot VMs the way like SMF?


Hi Fred,

One way would be to set specific VM's (or all) to "autoboot: false" and use a SMF controlled script in /opt/custom for starting up VM's in specific order and/or with per VM delay.
https://smartos.org/man/1m/vmadm
https://wiki.smartos.org/display/DOC/Administering+the+Global+Zone#AdministeringtheGlobalZone-CreatingPersistentServicesUsingSMF

[root@sol ~]# vmadm get e34d768c-6ab4-c02e-93c3-d44b67ca71d1 | json autoboot
true
[root@sol ~]# vmadm update e34d768c-6ab4-c02e-93c3-d44b67ca71d1 autoboot=false
Successfully updated VM e34d768c-6ab4-c02e-93c3-d44b67ca71d1
[root@sol ~]# vmadm get e34d768c-6ab4-c02e-93c3-d44b67ca71d1 | json autoboot
false

There might be some more sophisticated way but that would do the trick to begin with.

--
autoboot:

Controls whether or not a VM is booted when the system is rebooted.
This property can be set with the initial create but any time the VM is
started this will also get set true and when the VM is stopped it will
get set false. This is to ensure that the compute node will always
reboot into the intended state.

type: boolean
vmtype: OS,KVM
listable: yes
create: yes
update: yes
--

-Jussi


-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125
Powered by Listbox: https://www.listbox.com

Reply via email to