New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot start an AppVM when it already exists in Xen database #314

Closed
marmarek opened this Issue Mar 8, 2015 · 6 comments

Comments

Projects
None yet
2 participants
@marmarek
Member

marmarek commented Mar 8, 2015

Reported by joanna on 28 Jul 2011 18:58 UTC
...which can happen when one tries to start a domain but fails for some reason (e.g. no memory). Later, when attempting to start it again (even if the original problem was resolved, e.g. some memory freed), Qubes fails to start it becuse it exists in Xen DB (as reported by xl list):

[~](joanna@dom0)$ qvm-start work-acct
--> Cleaning volatile image: /var/lib/qubes/appvms/work-acct/volatile.img...
--> Loading the VM (type = AppVM)...
libxl: error: libxl.c:163:libxl_domain_rename domain with name "work-acct" already exists.
cannot make domain: -6
ERROR: Failed to load VM config
[~](joanna@dom0)$ xl list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  2253     4     r-----    6169.5
netvm                                        1   200     1     -b----     148.5
firewallvm                                   2   200     1     -b----      84.3
work                                         3   659     4     -b----     750.8
work-pub                                     6   546     4     -b----     240.8
red                                          7   542     4     -b----    2070.8                                           
personal                                    11   582     4     -b----     124.2                                           
work-acct                                   14   400     1     --p---       0.0          

Migrated-From: https://wiki.qubes-os.org/ticket/314

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by rafal on 29 Jul 2011 10:55 UTC
I cannot reproduce the problem - any additional hints ? anything suspicious in ~/.xsession-errors (e.g. previous errors from xl ?).
Insufficient memory condition does not result in this - qubes.py first tries to get memory, and if it fails, it does not call xl. And in the xl list output one can see that work-acct is quite alive and well - with the tiny issue that it is paused.
There are two possible explanations:

  1. xl create returned nonzero status, but in fact the domain was created
  2. xl create went ok, but before qubes.py called domain_unpause, it got an exception
    Both look not likely enough to devise workarounds for them - we need repro scenario.
Member

marmarek commented Mar 8, 2015

Comment by rafal on 29 Jul 2011 10:55 UTC
I cannot reproduce the problem - any additional hints ? anything suspicious in ~/.xsession-errors (e.g. previous errors from xl ?).
Insufficient memory condition does not result in this - qubes.py first tries to get memory, and if it fails, it does not call xl. And in the xl list output one can see that work-acct is quite alive and well - with the tiny issue that it is paused.
There are two possible explanations:

  1. xl create returned nonzero status, but in fact the domain was created
  2. xl create went ok, but before qubes.py called domain_unpause, it got an exception
    Both look not likely enough to devise workarounds for them - we need repro scenario.
@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Modified by joanna on 30 Jul 2011 09:20 UTC

Member

marmarek commented Mar 8, 2015

Modified by joanna on 30 Jul 2011 09:20 UTC

@marmarek marmarek added P: minor and removed P: major labels Mar 8, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Modified by joanna on 12 Sep 2011 07:51 UTC

Member

marmarek commented Mar 8, 2015

Modified by joanna on 12 Sep 2011 07:51 UTC

@marmarek marmarek added P: major and removed P: minor labels Mar 8, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 12 Sep 2011 14:37 UTC
To reproduce:

  1. Start a driver domain
  2. Shut it down: qvm-run --shutdown
  3. Immediately when VM disappears from the manager/qvm-ls, try to start it again (via qvm-start)
Member

marmarek commented Mar 8, 2015

Comment by joanna on 12 Sep 2011 14:37 UTC
To reproduce:

  1. Start a driver domain
  2. Shut it down: qvm-run --shutdown
  3. Immediately when VM disappears from the manager/qvm-ls, try to start it again (via qvm-start)
@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Modified by marmarek on 13 Sep 2011 16:41 UTC

Member

marmarek commented Mar 8, 2015

Modified by marmarek on 13 Sep 2011 16:41 UTC

@marmarek marmarek assigned marmarek and unassigned rootkovska Mar 8, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment

@marmarek marmarek closed this Mar 8, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment