Skip to content

Missing information about what CRC changes in the machine #2998

Closed

Description

@didib

The getting started guide does not mention anywhere e.g. "/etc/hosts" or "resolv.conf". I'd like, as a user, if I consider using CRC, to know beforehand, what it's going to touch on my laptop - both as root/sudo (/etc/*) and in my home directory.

Perhaps better not have this hard-coded in docs/getting-started but have a 'crc' sub-command to show it.

What I found out so far (by having /etc/ maintained in git and looking at my home directory, didn't check elsewhere nor the code):

crc setup:

crc start:

  • Changes /etc/hosts
  • Creates /etc/libvirt/qemu/crc.xml
  • Creates /etc/libvirt/storage/crc.xml

Both of them (didn't check which - likely setup):

  • Create $HOME/.config/systemd/user/crc* - user systemd units
  • Create $HOME/.crc - crc itself - perhaps should be made configurable somehow

Activity

  1. changed the title [-][DOCS] Missing documentation about what CRC changes in the maching[/-] [+][DOCS] Missing documentation about what CRC changes in the machine[/+] on Feb 10, 2022
  2. changed the title [-][DOCS] Missing documentation about what CRC changes in the machine[/-] [+]Missing information about what CRC changes in the machine[/+] on Feb 10, 2022
  3. gbraad commented on Feb 10, 2022

    @gbraad
    Contributor

    Added the trivial priority as our focus is on merging our development branch to master. this means some of this might change. Will be reprioritized after the release.

  4. gbraad commented on Feb 10, 2022

    @gbraad
    Contributor

    The sudo usage is only on the setup phase. We explicitly disallow the use of the root or administrator to execute CRC. If administrative actions are needed, this might be performed by the admin-helper. However, this is only the case on Windows.

    One of my colleagues will fill you in on more details.


    Creates /etc/libvirt/qemu/crc.xml
    Creates /etc/libvirt/storage/crc.xml

    We do not consider these changes performed by CRC. We ask qemu+kvm to create a VM and the daemon of the virtualization stack creates these files. It depends on the target distribution where these files are created or perhaps even additional changes are made.

    Creates /etc/libvirt/qemu/networks/autostart/crc.xml
    Creates /etc/libvirt/qemu/networks/crc.xml

    With this we create our own bridge to prevent overlap or conflicts with the user specified network setup. This is only the case when 'system mode networking' is used.


    It might help to also have a look at the preflight checks we perform. These checks determine if the system is ready for use of CRC, and when not, the preflight has fixes that make these changes as aforementioned.

  5. gbraad commented on Feb 11, 2022

    @gbraad
    Contributor

    Changes /etc/resolv.conf (and see also #1663 which I ran into)

    This should have been resolved as we support setups with systemd-resolved. If not, this needs further investigation and more information to explain what the situation is and what you did to resolve this.

  6. cfergeau commented on Mar 15, 2022

    @cfergeau
    Contributor

    Networking setup is indeed more complex than that:

    If using system networking

    If systemd-resolved is used on the system

    • /etc/NetworkManager/dispatcher.d/99-crc.sh is created

    If systemd-resolved is not used

    • Creates /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf
    • Creates /etc/NetworkManager/dnsmasq.d/crc.conf
    • /etc/resolv.conf is not modified by crc, this is a consequence of the configuration changes above, and an implementation detail of NetworkManager dnsmasq support.

    If using usermode networking

    • /etc/hosts will be modified by a suid helper

    If I remember correctly /etc/hosts is also modified in system networking even if it's not required there.

  7. cfergeau commented on Mar 15, 2022

    @cfergeau
    Contributor

    The sudo usage is only on the setup phase. We explicitly disallow the use of the root or administrator to execute CRC. If administrative actions are needed, this might be performed by the admin-helper. However, this is only the case on Windows.

    One of my colleagues will fill you in on more details.

    Creates /etc/libvirt/qemu/crc.xml
    Creates /etc/libvirt/storage/crc.xml

    We do not consider these changes performed by CRC. We ask qemu+kvm to create a VM and the daemon of the virtualization stack creates these files. It depends on the target distribution where these files are created or perhaps even additional changes are made.

    Creates /etc/libvirt/qemu/networks/autostart/crc.xml
    Creates /etc/libvirt/qemu/networks/crc.xml

    With this we create our own bridge to prevent overlap or conflicts with the user specified network setup. This is only the case when 'system mode networking' is used.

    crc on linux uses libvirt to manage its VM, and it creates a crc storage pool, a crc network, and a crc domain in qemu:///system. I agree how libvirtd stores this on the filesystem is an internal libvirtd implementation detail.

    $ virsh -c qemu:///system list --all
    $ virsh -c qemu:///system pool-list --all
    $ virsh -c qemu:///system net-list --all
    
  8. stale commented on Jun 4, 2022

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  9. added
    status/staleIssue went stale; did not receive attention or no reply from the OP
    on Jun 4, 2022
  10. locked and limited conversation to collaborators on Jun 7, 2022
  11. converted this issue into a discussion #3211 on Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions