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

Implement "offline mode" in R4.0 #2008

Closed
marmarek opened this Issue May 21, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@marmarek
Member

marmarek commented May 21, 2016

The idea of "offline mode" is to only manipulate qubes.xml, without talking to libvirt or other system components. This is useful for:

  • tests
  • installation
  • recovery situations

Of course things like starting VM should fail. But listing or setting some properties should work.

@marmarek marmarek added this to the Release 4.0 milestone May 21, 2016

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue May 21, 2016

WIP qubes: implement offline mode
Apparently the most important (the only?) property required in offline
mode is "is_running". So let's patch it to return False and make sure
any other libvirt usage would result in failure.

Or maybe better simply returh False in vm.is_running, when libvirt
connection fails? But then it would not be possible to use offline mode
and have (some, probably unrelated) libvirtd running at the same time.

Fixes QubesOS/qubes-issues#2008

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue May 21, 2016

@woju

This comment has been minimized.

Show comment
Hide comment
@woju

woju May 21, 2016

Member

There is something, but it currently raises exception almost instantly.
https://github.com/woju/qubes-core-admin/blob/core3-devel/qubes/app.py#L135-146⎋

pozdrawiam / best regards .-.
Wojtek Porczyk .-^' '^-.
Invisible Things Lab |'-.-^-.-'|
| | | |
I do not fear computers, | '-.-' |
I fear lack of them. '-._ : ,-'
-- Isaac Asimov `^-^-_>

Member

woju commented May 21, 2016

There is something, but it currently raises exception almost instantly.
https://github.com/woju/qubes-core-admin/blob/core3-devel/qubes/app.py#L135-146⎋

pozdrawiam / best regards .-.
Wojtek Porczyk .-^' '^-.
Invisible Things Lab |'-.-^-.-'|
| | | |
I do not fear computers, | '-.-' |
I fear lack of them. '-._ : ,-'
-- Isaac Asimov `^-^-_>

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek May 21, 2016

Member

Take a look at linked commit (marmarek/qubes-core-admin@7de2e64)

Member

marmarek commented May 21, 2016

Take a look at linked commit (marmarek/qubes-core-admin@7de2e64)

@woju

This comment has been minimized.

Show comment
Hide comment
@woju

woju May 21, 2016

Member

On Sat, May 21, 2016 at 02:37:03PM -0700, Marek Marczykowski-Górecki wrote:

Take a look at linked commit (marmarek/qubes-core-admin@7de2e64)

Won't hurt, but I can't tell from a glance if it is enough for some
weird cases. OK for patching through VMMConnection.init and
Qubes.init.

Will probably need some --argument for various cli tools as it is in
core2. Possibly even for all tools, though likely not supported in all
combinations, especially with some weird interactions of events.
For example QubesVM.name property disallows changing name if domain is
running. If done naively, qvm-prefs --offline-mode would be unsafe.

pozdrawiam / best regards .-.
Wojtek Porczyk .-^' '^-.
Invisible Things Lab |'-.-^-.-'|
| | | |
I do not fear computers, | '-.-' |
I fear lack of them. '-._ : ,-'
-- Isaac Asimov `^-^-_>

Member

woju commented May 21, 2016

On Sat, May 21, 2016 at 02:37:03PM -0700, Marek Marczykowski-Górecki wrote:

Take a look at linked commit (marmarek/qubes-core-admin@7de2e64)

Won't hurt, but I can't tell from a glance if it is enough for some
weird cases. OK for patching through VMMConnection.init and
Qubes.init.

Will probably need some --argument for various cli tools as it is in
core2. Possibly even for all tools, though likely not supported in all
combinations, especially with some weird interactions of events.
For example QubesVM.name property disallows changing name if domain is
running. If done naively, qvm-prefs --offline-mode would be unsafe.

pozdrawiam / best regards .-.
Wojtek Porczyk .-^' '^-.
Invisible Things Lab |'-.-^-.-'|
| | | |
I do not fear computers, | '-.-' |
I fear lack of them. '-._ : ,-'
-- Isaac Asimov `^-^-_>

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Jun 16, 2016

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