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

qvm-prefs: allow for on the fly netvm switch #302

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

Comments

Projects
None yet
3 participants
@marmarek
Member

marmarek commented Mar 8, 2015

Reported by joanna on 18 Jul 2011 13:11 UTC
When the user types:

qvm-prefs -s SomeAppVM netvm SomeNetVM

and if the SomeAppVM already is running, qvm-prefs should automatically re-attach the SomeAppVM to the new SomeNetVM (also making sure to reinitialize networking in SomeAppVM). This seems simple, yet would be extremely useful for users that decided to have a separate UsbVM and keep their 3G modem there. Then switching between WiFi and 3G modem would be just a matter of setting a different netvm for the firewallvm.

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

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Modified by joanna on 26 Jul 2011 15:52 UTC

Member

marmarek commented Mar 8, 2015

Modified by joanna on 26 Jul 2011 15:52 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 rafal on 1 Aug 2011 13:12 UTC
implemented in
http://git.qubes-os.org/?p=rafal/core.git;a=commit;h=d2301ab125949d6ec3b5986fa9159bc112912982
prebeta2 branch.
Requires fixed #316.

Member

marmarek commented Mar 8, 2015

Comment by rafal on 1 Aug 2011 13:12 UTC
implemented in
http://git.qubes-os.org/?p=rafal/core.git;a=commit;h=d2301ab125949d6ec3b5986fa9159bc112912982
prebeta2 branch.
Requires fixed #316.

@marmarek marmarek closed this Mar 8, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 2 Aug 2011 10:15 UTC
It doesn't seem to be working. I created an additional NetVM that I call 'usbvm' (which has 3G modem).

Now I did:

[~](joanna@dom0)$ qvm-prefs -s firewallvm netvm usbvm

and got the following error:


Traceback (most recent call last):
  File "/usr/bin/qvm-prefs", line 318, in <module>
    main()
  File "/usr/bin/qvm-prefs", line 309, in main
    do_set(qvm_collection, vm, property, args[ File "/usr/bin/qvm-prefs", line 261, in do_set
    return properties[property](2:])
)(vms, vm, args)
  File "/usr/bin/qvm-prefs", line 139, in set_netvm
    "script=/etc/xen/scripts/vif-route-qubes"])
  File "/usr/lib64/python2.6/subprocess.py", line 488, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['network-attach', 'firewallvm', 'ip=10.137.3.5', 'backend=usbvm', 'script=/etc/xen/scripts/vif-route-qubes']('xl',)' returned non-zero exit status -11


Member

marmarek commented Mar 8, 2015

Comment by joanna on 2 Aug 2011 10:15 UTC
It doesn't seem to be working. I created an additional NetVM that I call 'usbvm' (which has 3G modem).

Now I did:

[~](joanna@dom0)$ qvm-prefs -s firewallvm netvm usbvm

and got the following error:


Traceback (most recent call last):
  File "/usr/bin/qvm-prefs", line 318, in <module>
    main()
  File "/usr/bin/qvm-prefs", line 309, in main
    do_set(qvm_collection, vm, property, args[ File "/usr/bin/qvm-prefs", line 261, in do_set
    return properties[property](2:])
)(vms, vm, args)
  File "/usr/bin/qvm-prefs", line 139, in set_netvm
    "script=/etc/xen/scripts/vif-route-qubes"])
  File "/usr/lib64/python2.6/subprocess.py", line 488, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['network-attach', 'firewallvm', 'ip=10.137.3.5', 'backend=usbvm', 'script=/etc/xen/scripts/vif-route-qubes']('xl',)' returned non-zero exit status -11


@marmarek marmarek reopened this Mar 8, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 2 Aug 2011 10:15 UTC
I'm using xen 4.1.0-8 packages, and qubes core 1.6.17-dom0, BTW.

Member

marmarek commented Mar 8, 2015

Comment by joanna on 2 Aug 2011 10:15 UTC
I'm using xen 4.1.0-8 packages, and qubes core 1.6.17-dom0, BTW.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by rafal on 2 Aug 2011 12:53 UTC
Missing spec line added at
http://git.qubes-os.org/?p=rafal/xen.git;a=commit;h=1404651045e51baea108c35de27bc352ce42c0fa
prebeta2 branch.

Member

marmarek commented Mar 8, 2015

Comment by rafal on 2 Aug 2011 12:53 UTC
Missing spec line added at
http://git.qubes-os.org/?p=rafal/xen.git;a=commit;h=1404651045e51baea108c35de27bc352ce42c0fa
prebeta2 branch.

@marmarek marmarek closed this Mar 8, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 2 Aug 2011 13:40 UTC
After dynamic global netvm switch:

qvm-prefs -s netvm netvm <newnetvm>
  • DNS resolving doesn't work (one needs to manually fix resolv.conf in each AppVM).
  • TCP doesn't work (curl google.com), even though ICMP works fine.
Member

marmarek commented Mar 8, 2015

Comment by joanna on 2 Aug 2011 13:40 UTC
After dynamic global netvm switch:

qvm-prefs -s netvm netvm <newnetvm>
  • DNS resolving doesn't work (one needs to manually fix resolv.conf in each AppVM).
  • TCP doesn't work (curl google.com), even though ICMP works fine.

@marmarek marmarek reopened this Mar 8, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 2 Aug 2011 18:11 UTC
Works now with 1.6.19-vm rpms :)

Member

marmarek commented Mar 8, 2015

Comment by joanna on 2 Aug 2011 18:11 UTC
Works now with 1.6.19-vm rpms :)

@marmarek marmarek closed this Mar 8, 2015

@ptitdoc

This comment has been minimized.

Show comment
Hide comment
@ptitdoc

ptitdoc Dec 8, 2015

Maybe this should be reopened ?

In my case (using Qubes 3.1 packages), it raises an error:
Error: Basic tab:
internal error: libxenlight failed to detach network device

ptitdoc commented Dec 8, 2015

Maybe this should be reopened ?

In my case (using Qubes 3.1 packages), it raises an error:
Error: Basic tab:
internal error: libxenlight failed to detach network device

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Dec 8, 2015

Member

On Tue, Dec 08, 2015 at 12:06:14AM -0800, ptitdoc wrote:

Maybe this should be reopened ?

In my case (using Qubes 3.1 packages), it raises an error:
Error: Basic tab:
internal error: libxenlight failed to detach network device

This is #975, already reopened...
And just to be sure - what kernel verion in VM do you have (pleasse
comment in #975)?

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?

Member

marmarek commented Dec 8, 2015

On Tue, Dec 08, 2015 at 12:06:14AM -0800, ptitdoc wrote:

Maybe this should be reopened ?

In my case (using Qubes 3.1 packages), it raises an error:
Error: Basic tab:
internal error: libxenlight failed to detach network device

This is #975, already reopened...
And just to be sure - what kernel verion in VM do you have (pleasse
comment in #975)?

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?

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