Opened 2 years ago
Closed 2 years ago
#172 closed defect (fixed)
'/etc/init.d/qubes_netvm stop' should also stop the netvm
| Reported by: | joanna | Owned by: | marmarek |
|---|---|---|---|
| Priority: | major | Milestone: | Release 1 Beta 1 |
| Component: | core | Keywords: | |
| Cc: |
Description
Currently it only stops the firewallvm, because we currently mark the firewallvm as the default netvm. I think that this script should be changed to:
1) stop all the netvms in the system (again user might have more than one, e.g. one for each NIC)
2) also stop all the dependent VM's -- i.e. whenever we stop a netvm or proxyvm, all the vm's that use this vm as netvm should recursively be stopped as well. I think this should be implemented not in the qubes_netvm script, but instead in qubes.py in stop method.
Change History (5)
comment:1 Changed 2 years ago by marmarek
comment:2 Changed 2 years ago by marmarek
1) done
2) in qvm-run done
comment:3 Changed 2 years ago by joanna
- Resolution set to implemented
- Status changed from new to closed
Looks good. Except for the get_running_netvms() function that IMHO should be replaced with a proper qvm-* tool, as the xm output might change in the future. Closing for now anyway.
comment:4 Changed 2 years ago by joanna
- Resolution implemented deleted
- Status changed from closed to reopened
First of all I get an exception when I do :
qvm-run --shutdown netvm
Seccond, GUI manager happilly stops the netvm or firewallvm without stopping all the dependent VMs. I think the quick solution is to just remove 'stop' action from the GUI manager. After all if somebody is willing to stop netvm or firewallvm, then we can assume this person can play with command line.
comment:5 Changed 2 years ago by marmarek
- Resolution set to fixed
- Status changed from reopened to closed
Additionaly blocked NetVM (and ProxyVM) stopping in qubes-manager:
http://git.qubes-os.org/gitweb/?p=marmarek/qubes-manager.git;a=commit;h=9a1b06b441768d8cac7367f1a1dbf343c3fcf1b9

2) Yes, good idea, but... what "stop method"? It didn't exists for now (qvm-run and qubes-manager calls "xm shutdown" directly). And what with shutdown monitor? Should it wait for every VM, or just netvm? In the first case - it have to know what VMs are shutting down.
So I think, the better idea (for the second reason) is to add dependency resolving to qubes.py, but stop depended VMs in qvm-run (and qubes-manager - with warning to the user).