Re: [qubes-users] How to check (in BASH and dom0) whether a appVM exists?
qvm-check checks if for existence by default. -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/20200527180320.GD805%40mail2-dvm.
Re: [qubes-users] How to check (in BASH and dom0) whether a appVM exists?
On Tue, May 19 2020, Johannes Graumann wrote: > On 2020-05-19 10:46, Frédéric Pierret wrote: > >> There is a tool for checking state of VMs: >> >> [userdom0 ~]$ qvm-check toto >> usage: qvm-check [--verbose] [--quiet] [--help] [--all] [--exclude EXCLUDE] >> [--running] [--paused] [--template] [--networked] >> [VMNAME [VMNAME ...]] >> qvm-check: error: no such domain: 'toto' >> [user@dom0 ~]$ echo $? >> 2 >> [user@dom0 ~]$ qvm-check sys-net >> qvm-check: sys-net: exists >> [user@dom0 ~]$ echo $? >> 0 >> >> Best, >> Frédéric >> >> On 2020-05-19 10:35, Christophe wrote: qvm-ls|grep yourvmname >> >> On 20/05/19 10:32AM, Johannes Graumann wrote: Hello, >> >> See subject line ;) >> >> Sincerely, Joh >> >> -- >> You received this message because you are subscribed to the Google Groups >> "qubes-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to qubes-users+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/qubes-users/74dcf0a303aa9afb95809626034f7e1e%40graumannschaft.org. > > Ha - even better ... sorry, saw this late. > > Thanks! > > Joh Hi, You maybe interested to know which VM is the last started (sometime for DVM), here my way to do it : virsh -c xen:/// list | tail -n 2 | head -n 1 | sed -r 's/^ [0-9]+ *//s .//' -- -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/87ftbn7r0p.fsf%40host.localdomain.
Re: [qubes-users] How to check (in BASH and dom0) whether a appVM exists?
On Tue, May 19, 2020 at 12:39:35PM +0200, Johannes Graumann wrote: > On 2020-05-19 10:35, Christophe wrote: > > > qvm-ls|grep yourvmname > > > > On 20/05/19 10:32AM, Johannes Graumann wrote: > > > > > Hello, > > > > > > See subject line ;) > > > > > > Sincerely, Joh > > > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "qubes-users" group. > > > To unsubscribe from this group and stop receiving emails from it, send an > > > email to qubes-users+unsubscr...@googlegroups.com. > > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/qubes-users/74dcf0a303aa9afb95809626034f7e1e%40graumannschaft.org. > > Thank you. I guess this should then do ... > > if ! qvm-ls --running|grep -q $VM; then > echo "$VM not running or present. Aborting." > exit 1 > fi > You know of `qvm-check` `qvm-ls --running` will miss qubes that are starting up or closing down, ie of state Transient. To catch those, you need something like `qvm-ls |egrep 'Running|Transient' -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/20200519120654.GA9624%40thirdeyesecurity.org.
Re: [qubes-users] How to check (in BASH and dom0) whether a appVM exists?
On 2020-05-19 10:46, Frédéric Pierret wrote: There is a tool for checking state of VMs: [userdom0 ~]$ qvm-check toto usage: qvm-check [--verbose] [--quiet] [--help] [--all] [--exclude EXCLUDE] [--running] [--paused] [--template] [--networked] [VMNAME [VMNAME ...]] qvm-check: error: no such domain: 'toto' [user@dom0 ~]$ echo $? 2 [user@dom0 ~]$ qvm-check sys-net qvm-check: sys-net: exists [user@dom0 ~]$ echo $? 0 Best, Frédéric On 2020-05-19 10:35, Christophe wrote: qvm-ls|grep yourvmname On 20/05/19 10:32AM, Johannes Graumann wrote: Hello, See subject line ;) Sincerely, Joh -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/74dcf0a303aa9afb95809626034f7e1e%40graumannschaft.org. Ha - even better ... sorry, saw this late. Thanks! Joh -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/5f6c7d33dfa8a2dc7a58dde647641609%40graumannschaft.org.
Re: [qubes-users] How to check (in BASH and dom0) whether a appVM exists?
On 2020-05-19 10:35, Christophe wrote: qvm-ls|grep yourvmname On 20/05/19 10:32AM, Johannes Graumann wrote: Hello, See subject line ;) Sincerely, Joh -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/74dcf0a303aa9afb95809626034f7e1e%40graumannschaft.org. Thank you. I guess this should then do ... if ! qvm-ls --running|grep -q $VM; then echo "$VM not running or present. Aborting." exit 1 fi -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/db92155edb25d83dc9e39e977d2f58d3%40graumannschaft.org.
Re: [qubes-users] How to check (in BASH and dom0) whether a appVM exists?
There is a tool for checking state of VMs: [userdom0 ~]$ qvm-check toto usage: qvm-check [--verbose] [--quiet] [--help] [--all] [--exclude EXCLUDE] [--running] [--paused] [--template] [--networked] [VMNAME [VMNAME ...]] qvm-check: error: no such domain: 'toto' [user@dom0 ~]$ echo $? 2 [user@dom0 ~]$ qvm-check sys-net qvm-check: sys-net: exists [user@dom0 ~]$ echo $? 0 Best, Frédéric On 2020-05-19 10:35, Christophe wrote: > qvm-ls|grep yourvmname > > On 20/05/19 10:32AM, Johannes Graumann wrote: >> Hello, >> >> See subject line ;) >> >> Sincerely, Joh >> >> -- >> You received this message because you are subscribed to the Google Groups >> "qubes-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to qubes-users+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/qubes-users/74dcf0a303aa9afb95809626034f7e1e%40graumannschaft.org. > -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/c1b734ea-4acd-ae2a-5986-419695b538a4%40qubes-os.org. signature.asc Description: OpenPGP digital signature
Re: [qubes-users] How to check (in BASH and dom0) whether a appVM exists?
qvm-ls|grep yourvmname On 20/05/19 10:32AM, Johannes Graumann wrote: > Hello, > > See subject line ;) > > Sincerely, Joh > > -- > You received this message because you are subscribed to the Google Groups > "qubes-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to qubes-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/qubes-users/74dcf0a303aa9afb95809626034f7e1e%40graumannschaft.org. -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/20200519083510.t3pfqbufr45hvlui%40disp6806.
[qubes-users] How to check (in BASH and dom0) whether a appVM exists?
Hello, See subject line ;) Sincerely, Joh -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/74dcf0a303aa9afb95809626034f7e1e%40graumannschaft.org.