Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl

Affichage de 127 messages sur 27
Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl vuarnet 04/11/14 08:52
I tried to set my TorVM to start automatically on boot, but I get the following error:

[Dom0] Error while changing settings for torvm!
ERROR: Basic tab:
Failed to set autostart for VM via systemctl
[OK]

I tried this while the VM was shut down, and I also tried it while it was running, same issue both ways. I was using the Qubes VM Manager to set this via right click --> VM Settings --> (tab) Basic

Can I set this via dom0? I can file a bug report if necessary.

Thanks!
Re: Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl crane...@gmail.com 09/11/14 13:37
On Tuesday, November 4, 2014 11:52:39 AM UTC-5, vuarnet wrote:
> I tried to set my TorVM to start automatically on boot...

I have the same problem. I hope the next version will address that problem.

Re: [qubes-users] Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl Marek Marczykowski-Górecki 09/11/14 13:57
On Tue, Nov 04, 2014 at 08:52:39AM -0800, vuarnet wrote:
> I tried to set my TorVM to start automatically on boot, but I get the
> following error:
>
> [Dom0] Error while changing settings for torvm!
> ERROR: Basic tab:
> Failed to set autostart for VM via systemctl
> [OK]
>
> I tried this while the VM was shut down, and I also tried it while it was
> running, same issue both ways. I was using the Qubes VM Manager to set this
> via right click --> VM Settings --> (tab) Basic

Do you have any details in ~/.xsession-errors (or wherever Qubes Manager
stderr goes)?

> Can I set this via dom0? I can file a bug report if necessary.

Yes:
sudo systemctl enable qubes-vm@torvm.service

--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
Re: [qubes-users] Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl crane...@gmail.com 09/11/14 14:16
On Sunday, November 9, 2014 4:57:25 PM UTC-5, Marek Marczykowski-Górecki wrote:
> > Can I set this via dom0? I can file a bug report if necessary.
>
> Yes:
> sudo systemctl enable qubes-vm@torvm.service

That didn't work for me... I get
Failed to issue method call: No such file or directory
Re: [qubes-users] Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl Marek Marczykowski-Górecki 09/11/14 14:36
Ok, so this is probably why it wasn't working in Qubes Manager. Check if
you have this file in dom0: /usr/lib/systemd/system/qubes-vm@.service
It should be installed by qubes-core-dom0 package (the current version
is 2.1.63).
Re: [qubes-users] Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl crane...@gmail.com 09/11/14 14:45
On Sunday, November 9, 2014 5:36:18 PM UTC-5, Marek Marczykowski-Górecki wrote:
> Ok, so this is probably why it wasn't working in Qubes Manager. Check if
> you have this file in dom0: /usr/lib/systemd/system/qubes-vm@.service
> It should be installed by qubes-core-dom0 package (the current version
> is 2.1.63).

Yes I have that file...
Re: [qubes-users] Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl Marek Marczykowski-Górecki 09/11/14 16:37
That systemctl command should output something like:
ln -s '/usr/lib/systemd/system/qubes-vm@.service'
'/etc/systemd/system/multi-user.target.wants/qubes-vm@torvm.service'

Perhaps the target file already exists and points at some stale
location? Try systemctl disable first.
Re: [qubes-users] Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl crane...@gmail.com 10/11/14 00:32
On Sunday, November 9, 2014 7:37:39 PM UTC-5, Marek Marczykowski-Górecki wrote:
> > Yes I have that file...
> Perhaps the target file already exists and points at some stale
> location? Try systemctl disable first.

Tried that - disable which didn't produce anything on the command line. Then retried enable which produced the same error previously mentioned.
Re: [qubes-users] Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl vuarnet 10/11/14 12:10

I got the same issue -- I tried:

sudo systemctl disable qubes-vm@torvm.service (no output)
sudo systemctl enable qubes-vm@torvm.service
And I got the same output as described above: "Failed to issue method call: No such file or directory"

I can confirm the /usr/lib/systemd/system/qubes-vm@.service file *does* exist and it appeared OK with a quick look.

So as a workaround I just looked at the qubes-vm@.service file and the qubes-netvm.service (since I know it works) and copied the contents of qubes-vm@.service to qubes-vm@torvm.service and replaced "%i" with "torvm". Hardcoded hack that I'll probably regret later but it worked for now. Just issue:

(Assuming you're in the /usr/lib/systemd/system/ directory)
sudo cp qubes-vm\@.service qubes-vm\@torvm.service
sudo nano qubes-vm\@torvm.service
(change where it says "ExecStart=/usr/bin/qvm-start --no-guid %i" to "ExecStart=/usr/bin/qvm-start --no-guid torvm"
sudo systemctl enable qubes-vm@torvm.service

Then reboot and it should start on boot as intended.

Still not sure what's causing the error but at least there's a temporary workaround that's not too messy. It just creates another .service file.

Thanks Marek for helping get this straightened out. Should I file a bug report?

Also, nothing useful that I could find in .xsession-errors, journalct or dmesg when I tried to generate the error in the Qubes VM manager GUI.
Re: [qubes-users] Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl Marek Marczykowski-Górecki 10/11/14 16:06
Simpler workaround would be manually making the symlink
/etc/systemd/system/multi-user.target.wants/qubes-vm@torvm.service -> /usr/lib/systemd/system/qubes-vm@.service

Do you have similar problem with other VMs, or just torvm? Maybe there
is something special about this name (some name conflict or so...).
Check also "systemctl list --all", perhaps there is already defined such
service. Try also "sudo systemctl daemon-reload", just in case...

> Then reboot and it should start on boot as intended.
>
> Still not sure what's causing the error but at least there's a temporary
> workaround that's not too messy. It just creates another .service file.
>
> Thanks Marek for helping get this straightened out. Should I file a bug
> report?

Yes, that would be helpful.

> Also, nothing useful that I could find in .xsession-errors, journalct or
> dmesg when I tried to generate the error in the Qubes VM manager GUI.
>

Re: [qubes-users] Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl crane...@gmail.com 10/11/14 17:15
On Monday, November 10, 2014 3:10:25 PM UTC-5, vuarnet wrote:

> So as a workaround I just looked at the qubes-vm@.service file and the qubes-netvm.service (since I know it works) and copied the contents of qubes-vm@.service to qubes-vm@torvm.service and replaced "%i" with "torvm". Hardcoded hack that I'll probably regret later but it worked for now. Just issue:
>
> (Assuming you're in the /usr/lib/systemd/system/ directory)
> sudo cp qubes-vm\@.service qubes-vm\@torvm.service
> sudo nano qubes-vm\@torvm.service
> (change where it says "ExecStart=/usr/bin/qvm-start --no-guid %i" to "ExecStart=/usr/bin/qvm-start --no-guid torvm"
> sudo systemctl enable qubes-vm@torvm.service
>


This might be a better solution for me since I also want lighttpd, php, and dnsmasq to all auto-start after reboot... Tor in one domain (fedora-net) and the others in another domain (fedora-web). I am still having problems with port forwarding - it has been suggested to add sleep 2 to all scripts...

I really don't understand a symbolic link "named" qubes-vm@torvm.service pointing to qubes-vm@.service. Is it like windows' shortcuts? Whereas you can name the shortcut anything you want, but the target is still the target... I guess I just don't get that one. Perhaps someone could explain...

Re: [qubes-users] Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl Marek Marczykowski-Górecki 10/11/14 17:35
On Mon, Nov 10, 2014 at 05:15:54PM -0800, crane...@gmail.com wrote:
> On Monday, November 10, 2014 3:10:25 PM UTC-5, vuarnet wrote:
>
> > So as a workaround I just looked at the qubes-vm@.service file and the qubes-netvm.service (since I know it works) and copied the contents of qubes-vm@.service to qubes-vm@torvm.service and replaced "%i" with "torvm". Hardcoded hack that I'll probably regret later but it worked for now. Just issue:
> >
> > (Assuming you're in the /usr/lib/systemd/system/ directory)
> > sudo cp qubes-vm\@.service qubes-vm\@torvm.service
> > sudo nano qubes-vm\@torvm.service
> > (change where it says "ExecStart=/usr/bin/qvm-start --no-guid %i" to "ExecStart=/usr/bin/qvm-start --no-guid torvm"
> > sudo systemctl enable qubes-vm@torvm.service
> >
>
>
> This might be a better solution for me since I also want lighttpd, php, and dnsmasq to all auto-start after reboot... Tor in one domain (fedora-net) and the others in another domain (fedora-web). I am still having problems with port forwarding - it has been suggested to add sleep 2 to all scripts...

Regarding starting the services, the right place for it is in
/rw/config/rc.local, just add "systemctl --no-block start
lighttpd.service" and so on.

> I really don't understand a symbolic link "named" qubes-vm@torvm.service pointing to qubes-vm@.service. Is it like windows' shortcuts? Whereas you can name the shortcut anything you want, but the target is still the target... I guess I just don't get that one. Perhaps someone could explain...

Symlink is just a (sort of) file, with information "content of this file
is in ...". It can have totally different name than the target. Systemd
uses this to handle similar services. The above link means that
qubes-vm@torvm.service is described in qubes-vm@.service file.
If you want details, take a look at systemd.unit(5) man page (paragraph
starting with "Optionally, units may be instantiated from a template
file at runtime.").
Re: [qubes-users] Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl crane...@gmail.com 10/11/14 18:15
On Monday, November 10, 2014 8:35:22 PM UTC-5, Marek Marczykowski-Górecki wrote:
> Regarding starting the services...
> /rw/config/rc.local, just add "systemctl --no-block start
> lighttpd.service"...
>

You are referring to the domain /rw/config/rc.local? Which doesn't run until you start the domain (the services start ok once I start the domain)... I thought what we were doing was in dom0 to auto-start the domain?
Re: [qubes-users] Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl Marek Marczykowski-Górecki 10/11/14 18:38
Right, you need to auto-start the domain first. Then you can use
rc.local to start the services there.
Re: [qubes-users] Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl crane...@gmail.com 10/11/14 18:43
On Monday, November 10, 2014 9:38:14 PM UTC-5, Marek Marczykowski-Górecki wrote:
> Right, you need to auto-start the domain first. Then you can use
> rc.local to start the services there.


Got it! Thanks for clearing that up.
Re: Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl vuarnet 13/11/14 13:17
I just submitted a bug report here: https://wiki.qubes-os.org/ticket/925#ticket

Let me know if you need me to test or do anything to help.
Re: Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl Alex Dubois 14/12/14 07:35

I confirm that the synlink solution worked:
sudo ln -s /usr/lib/systemd/system/qubes-vm\@.service /etc/systemd/system/multi-user.target.wants/qubes-vm\@MyVMName.service

For whom will look into the patch if of any use...
Please note that after a reboot: Qubes VM Manager does *NOT* show "Start VM automatically on boot" as ticked.
However ticking it and clicking OK "accept" the change.

Alex
Re: [qubes-users] Re: Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl jm 20/01/15 14:32
On 12/14/14 10:35, Alex Dubois wrote:
>
>
> On Thursday, 13 November 2014 21:17:57 UTC, vuarnet wrote:
>
>     On Tuesday, November 4, 2014 10:52:39 AM UTC-6, vuarnet wrote:
>
>         I tried to set my TorVM to start automatically on boot, but I
>         get the following error:
>
>         [Dom0] Error while changing settings for torvm!
>         ERROR: Basic tab:
>         Failed to set autostart for VM via systemctl
>         [OK]
>
>         I tried this while the VM was shut down, and I also tried it
>         while it was running, same issue both ways. I was using the
>         Qubes VM Manager to set this via right click --> VM Settings -->
>         (tab) Basic
>
>         Can I set this via dom0? I can file a bug report if necessary.
>
>         Thanks!
>
>
>     I just submitted a bug report here:
>     https://wiki.qubes-os.org/ticket/925#ticket
>     <https://wiki.qubes-os.org/ticket/925#ticket>
>
>     Let me know if you need me to test or do anything to help.
>
>
> I confirm that the synlink solution worked:
> sudo ln -s /usr/lib/systemd/system/qubes-vm\@.service
> /etc/systemd/system/multi-user.target.wants/qubes-vm\@MyVMName.service

This solution doesn't work with VMs containing a hyphen,
e.g. My-VM-Name

cheers
JMP

Re: [qubes-users] Re: Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl Marek Marczykowski-Górecki 20/01/15 15:16
What do you mean by "doesn't work"? The VM isn't started? Perhaps you've
made a typo in VM name? Note that VM name is case-sensitive. Check this
for details:
systemctl status qubes-vm\@My-VM-Name.service
Re: [qubes-users] Re: Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl jm 20/01/15 15:48
By "doesn't work" I mean the VM does not autostart. This does not happen
with the regular fedora-20-x64 template, but does affect
fedora-20-x64-minimal.

How to reproduce.

1. create new vm My-Test-VM
2. right click in VM Manager, try to select autostart, get above
reported error
3. go to dom0 console, ln -s [...] as above
4. right click in VM Manager, select autostart
5. reboot
6. VM My-Test-VM does not autostart

I used this documentatation to create my test proxy vm:

https://wiki.qubes-os.org/wiki/Templates/FedoraMinimal

Zero idea what might be causing this, but pretty confident in my
results. See if you can reproduce.

cheers
JMP







Re: [qubes-users] Re: Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl jm 20/01/15 15:55
ah, here we are, systemctl reports (copying by hand)

ERROR: [Errno 2] No such file or directory:
'/var/lib/qubes/servicevms/torvm/volatile.img'
...
Failed to start Qubes VM My-Test-VM
Unit qubes-vm@My-Test-VM.service entered failed state


So the problem has something to do with My-Test-VM using torvm as its
netvm (but vms with hyphens in their name seem to be fine !?)

JMP







Re: [qubes-users] Re: Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl Marek Marczykowski-Górecki 20/01/15 16:07
VM manager steps are redundant when you create the symlink manually.

> 5. reboot
> 6. VM My-Test-VM does not autostart

What is the output of "sudo systemctl status qubes-vm\@My-VM-Name.service"?
Do you have "enabled" there? Any startup errors reported?

> I used this documentatation to create my test proxy vm:
>
> https://wiki.qubes-os.org/wiki/Templates/FedoraMinimal
>
> Zero idea what might be causing this, but pretty confident in my
> results. See if you can reproduce.
>
> cheers
> JMP
>
>
>
>
>
>
>

Re: [qubes-users] Re: Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl Marek Marczykowski-Górecki 20/01/15 16:08
Try to start that VM manually and see if the error persists.
Re: [qubes-users] Re: Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl jm 21/01/15 01:55
On 01/20/15 19:07, Marek Marczykowski-Górecki wrote:
> What is the output of "sudo systemctl status qubes-vm\@My-VM-Name.service"?
> Do you have "enabled" there? Any startup errors reported?

yes, qubes-vm@.service is enabled

error messages (copied by hand)

libxl: error: libxl.c:163:libxl_domain_rename with name "torvm" already
exists
cannot make domainL -6
qubes-vm@My-Test-VM.service: main process exited, code=exited,
status=1/FAILURE
Failed to start Qubes VM My-Test-VM


Note that this error is not reproducible with a standard appvm (I've
tried). I am testing with a proxyvm based on minimal template with torvm
as netvm.

I can manually start the VM with no problem, and it works fine. But
since this is a proxyvm, autostart would be a good thing.

Workaround I found is to create a new vm with no hyphens in the name.

JMP




Re: [qubes-users] Re: Issue: [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl inf...@gmail.com 04/03/15 07:00
Just wondered if this was ever fixed?

Am still finding

ERROR: Basic tab
Failed to set autostart for VM via systemctl

when I try to check "Start VM automatically on boot" in Qubes VM Manager for my VM called USBVM (which in case relevant grabs one USB controller)

--
CB

can't autostart usbvm (was [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl inf...@gmail.com 21/03/15 03:03
On Wednesday, 4 March 2015 16:00:42 UTC+1, inf...@gmail.com wrote:
Just wondered if this was ever fixed?

Am still finding

ERROR: Basic tab
Failed to set autostart for VM via systemctl

when I try to check "Start VM automatically on boot" in Qubes VM Manager for my VM called USBVM (which in case relevant grabs one USB controller)

--
CB


Just wondering any news - it means the "Creating and Using a USBVM" instructions (https://www.qubes-os.org/wiki/SecurityGuidelines/) won't work (for me)

       qvm-prefs -s usbvm autostart true 

giving error message in dom0

Failed to issue method call: No such file or directory
ERROR: failed to set autostart for VM via systemctl

--
CB
Re: can't autostart usbvm (was [Dom0] ERROR: Basic tab: Failed to setup autostart for VM via systemctl Marek Marczykowski-Górecki 21/03/15 04:01
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This is systemd bug... Details here:
https://github.com/QubesOS/qubes-issues/issues/925

I have an idea for a workaround, maybe its time to give up on systemd
folks and implement that.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJVDU+bAAoJENuP0xzK19csSrkH+gLziBBEny5+oM9bSzhqDaaa
l38C8mdpKMoafddz2vHA49Wz83ZyZTvJ77ll+o7JbFMi5H4HQgMaIrdWDb/eWPmJ
Yw5BCQgQ//OxcKQv6RiyehkeRTEXbeKQGrp0/sVZd2WFnUJ84KbiPTz0f3KWILaa
pkje9OrMKYjukmDfqZ2ziXvLcb5jk+dDmTUwJiL4M0MZ1DAh1/kqBaJpj5uWsqZ9
hJOVYM4oLTKfmGe4jLSrPmI69np4q1zukdjQy0RmdXxIu+en70N5o2WVUcH9fUzN
K2KODHoP9+l7d+pydA8RzKbwaSCT36TiW7hvG430z42271nr8zYBRO6pUWEZdrE=
=sZNu
-----END PGP SIGNATURE-----
Plus de sujets »