仮想化を必要としないF25ワークステーションからKVMを削除しても安全ですか?

仮想化を必要としないF25ワークステーションからKVMを削除しても安全ですか?

一部のAMDハードウェアにFedora 25がインストールされています。インストール後にブリッジがあることがわかりました。インストールしていないか、パッケージを含むパッケージは必要ないため、これはまれです。マイインストールは、開発者ツールを含む基本的なワークステーションです。

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:f6:da:cf  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

libvirt一般的な容疑者qemuですが、インストールされていないようです。

bulldozer$ sudo dnf remove libvirt
No match for argument: libvirt
Error: No packages marked for removal.
bulldozer$ sudo dnf remove qemu
No match for argument: qemu
Error: No packages marked for removal.

KVMがパッケージのようです(下記参照)。パッケージがプリインストールされている理由が見つかりません。

私の質問は、リモートアクセスおよび開発者ツールにのみSSHを使用するヘッドレスワークステーションからKVMを削除するのは安全ですか? Fedoraを今すぐ実行するにはKVMが必要ですか?


================================================================================
 Package                         Arch   Version                 Repository
                                                                           Size
================================================================================
Removing:
 SDL2                            x86_64 2.0.5-3.fc25            @updates  1.1 M
 boost-random                    x86_64 1.60.0-10.fc25          @updates   25 k
 boost-thread                    x86_64 1.60.0-10.fc25          @updates  162 k
 celt051                         x86_64 0.5.1.3-11.fc24         @anaconda 112 k
 corosync                        x86_64 2.4.2-1.fc25            @updates  475 k
 corosynclib                     x86_64 2.4.2-1.fc25            @updates  277 k
 cyrus-sasl                      x86_64 2.1.26-26.2.fc24        @anaconda 137 k
 cyrus-sasl-md5                  x86_64 2.1.26-26.2.fc24        @anaconda  84 k
 dmidecode                       x86_64 1:3.0-6.fc25            @updates  215 k
 edk2-ovmf                       noarch 20161105git3b25ca8-1.fc25
                                                                @updates  6.2 M
 genisoimage                     x86_64 1.1.11-31.fc24          @anaconda 1.1 M
 glusterfs                       x86_64 3.9.1-1.fc25            @updates  1.8 M
 glusterfs-api                   x86_64 3.9.1-1.fc25            @updates  170 k
 glusterfs-client-xlators        x86_64 3.9.1-1.fc25            @updates  3.8 M
 glusterfs-fuse                  x86_64 3.9.1-1.fc25            @updates  329 k
 glusterfs-libs                  x86_64 3.9.1-1.fc25            @updates  1.2 M
 gnome-boxes                     x86_64 3.22.3-2.fc25           @updates  5.0 M
 gperftools-libs                 x86_64 2.5-2.fc25              @anaconda 1.3 M
 gtk-vnc2                        x86_64 0.6.0-1.fc25            @anaconda 205 k
 gvnc                            x86_64 0.6.0-1.fc25            @anaconda 241 k
 ipxe-roms-qemu                  noarch 20160622-1.git0418631.fc25
                                                                @anaconda 2.2 M
 libcacard                       x86_64 3:2.5.2-2.fc24          @anaconda  93 k
 libfdt                          x86_64 1.4.2-1.fc25            @anaconda  45 k
 libgovirt                       x86_64 0.3.4-1.fc25            @anaconda 198 k
 libibverbs                      x86_64 1.2.1-1.fc25            @anaconda 123 k
 libiscsi                        x86_64 1.15.0-2.fc24           @anaconda 186 k
 libnfs                          x86_64 1.9.8-2.fc24            @anaconda 284 k
 libphodav                       x86_64 2.1-1.fc25              @updates  109 k
 libqb                           x86_64 1.0.1-1.fc25            @updates  187 k
 librados2                       x86_64 1:10.2.4-2.fc25         @updates  6.4 M
 librbd1                         x86_64 1:10.2.4-2.fc25         @updates  7.8 M
 librdmacm                       x86_64 1.1.0-1.fc25            @anaconda 136 k
 libusal                         x86_64 1.1.11-31.fc24          @anaconda 450 k
 libvirt-daemon                  x86_64 2.2.0-2.fc25            @updates  2.5 M
 libvirt-daemon-config-network   x86_64 2.2.0-2.fc25            @updates  228
 libvirt-daemon-driver-interface x86_64 2.2.0-2.fc25            @updates  112 k
 libvirt-daemon-driver-network   x86_64 2.2.0-2.fc25            @updates  534 k
 libvirt-daemon-driver-nodedev   x86_64 2.2.0-2.fc25            @updates  112 k
 libvirt-daemon-driver-nwfilter  x86_64 2.2.0-2.fc25            @updates  169 k
 libvirt-daemon-driver-qemu      x86_64 2.2.0-2.fc25            @updates  1.3 M
 libvirt-daemon-driver-secret    x86_64 2.2.0-2.fc25            @updates   83 k
 libvirt-daemon-driver-storage   x86_64 2.2.0-2.fc25            @updates  658 k
 libvirt-daemon-kvm              x86_64 2.2.0-2.fc25            @updates    0
 libvirt-gconfig                 x86_64 1.0.0-1.fc25            @updates  359 k
 libvirt-glib                    x86_64 1.0.0-1.fc25            @updates  257 k
 libvirt-gobject                 x86_64 1.0.0-1.fc25            @updates  216 k
 libvirt-libs                    x86_64 2.2.0-2.fc25            @updates   22 M
 libwsman1                       x86_64 2.6.2-7.fc25            @anaconda 322 k
 lttng-ust                       x86_64 2.8.1-2.fc25            @anaconda 977 k
 lzop                            x86_64 1.03-15.fc25            @anaconda 103 k
 netcf-libs                      x86_64 0.2.8-4.fc24            @anaconda 199 k
 numactl-libs                    x86_64 2.0.11-2.fc24           @anaconda  45 k
 numad                           x86_64 0.5-21.20150602git.fc24 @anaconda  56 k
 qemu-common                     x86_64 2:2.7.1-2.fc25          @updates  1.0 M
 qemu-img                        x86_64 2:2.7.1-2.fc25          @updates  4.2 M
 qemu-kvm                        x86_64 2:2.7.1-2.fc25          @updates    0
 qemu-system-x86                 x86_64 2:2.7.1-2.fc25          @updates   20 M
 radvd                           x86_64 2.14-1.fc25             @anaconda 179 k
 seabios-bin                     noarch 1.9.3-1.fc25            @anaconda 647 k
 seavgabios-bin                  noarch 1.9.3-1.fc25            @anaconda 230 k
 sgabios-bin                     noarch 1:0.20110622svn-9.fc24  @anaconda 4.0 k
 sheepdog                        x86_64 1.0.1-2.fc25            @updates  851 k
 spice-glib                      x86_64 0.33-2.fc25             @anaconda 1.3 M
 spice-gtk3                      x86_64 0.33-2.fc25             @anaconda 257 k
 spice-server                    x86_64 0.13.3-1.fc25           @updates  1.2 M
 systemd-container               x86_64 231-12.fc25             @updates  955 k
 usbredir                        x86_64 0.7.1-2.fc24            @anaconda  96 k
 userspace-rcu                   x86_64 0.9.2-2.fc25            @anaconda 292 k
 virglrenderer                   x86_64 0.5.0-1.20160411git61846f92f.fc25
                                                                @anaconda 1.8 M
 vte3                            x86_64 0.36.5-2.fc24           @anaconda 987 k
 xen-libs                        x86_64 4.7.1-6.fc25            @updates  1.5 M
 xen-licenses                    x86_64 4.7.1-6.fc25            @updates  389 k

Transaction Summary
================================================================================
Remove  72 Packages

Installed size: 109 M
Is this ok [y/N]:

ベストアンサー1

1. 「libvirtとqemuが最も一般的な容疑者です」

ところで、インストールできなかったようです。

$ rpm -q --whatprovides /lib/systemd/system/libvirtd.service
libvirt-daemon-2.2.0-2.fc25.x86_64

パッケージを削除する他の方法があります。

systemctl disable --now libvirtd.service

または、どのソフトウェアもlibvirtdの起動を要求できないようにするには、次の手順を実行します。

systemctl mask --now libvirt.service

systemctl実行中のサービス()またはプロセス(ps -ax/)のps axリストでそれを見つけることができます。プロセスIDを最初に見つけたら、名前が違ってもサービスを受けることができるきちんとしたコツがあります。

$ ps -ax|grep libvirt
  992 ?        Ssl    0:00 /usr/sbin/libvirtd
 1365 ?        S      0:00 /sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper
 1366 ?        S      0:00 /sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper
 6997 pts/0    S+     0:00 grep --color=auto libvirt
$ systemctl status 992
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2017-02-04 13:15:19 GMT; 3h 41min ago
     Docs: man:libvirtd(8)
           http://libvirt.org
 Main PID: 992 (libvirtd)
    Tasks: 18 (limit: 4915)
   CGroup: /system.slice/libvirtd.service
           ├─ 992 /usr/sbin/libvirtd
           ├─1365 /sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper
           └─1366 /sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

2. 「事前インストールされたパッケージが見つからない理由」

...
gnome-boxes
$ dnf info gnome-boxes|grep Summary
Summary     : A simple GNOME 3 application to access remote or virtual systems

3. 「KVMをアンインストールしても安全ですか?」

リモートアクセスおよび開発者ツールにSSHのみを使用するヘッドレスワークステーションからお越しですか? Fedoraを今すぐ実行するにはKVMが必要ですか?

あなたの削除リストがよさそうです。

GNOMEを削除しませんでした。dnf remove systemdまたは、同じコマンドはdnf remove dnf「保護されたパッケージ」の削除について警告します。しかし、いくつかの重要なパッケージが削除される可能性があるという懸念を理解してください。これは厳密なパッケージ依存関係ではありません。確認する必要がある内容を減らすことができます。

Debian では、apt-get remove X削除されたパッケージを表示して 。それぞれもはやどのパッケージにも依存しないため、「自動削除」できるパッケージを表示します。

libvirt結果は、libvirt、libvirt、およびlibvirtに依存する(他の依存関係はありません)、gnome-boxeslibvirtというライブラリを削除したことをより明確に示しています。libguestfs

libguestfsは本当に素晴らしいツールで使用されています。 virt-sparsifyパーティションリムーバブルドライブのスパースイメージを取得するために使用できます(rootとして実行するとlibvirtは無効になります)。

dnf remove編集:Fedora 26には、すでに「依存パッケージの削除」と「未使用の依存関係の削除」の別のリストがあることを確認しました。うん!私は以前これをしたことを覚えていません。

コマンドが別のリストを表示しないような場合は、未使用の依存関係を含まない自動機能のように機能するようにするためのよりdnf曖昧な方法があります。apt-getautoremove

# dnf remove --setopt "clean_requirements_on_remove=0" libvirt-daemon 
Dependencies resolved.
======================================================================================================================================================
 Package                                            Arch                      Version                               Repository                   Size
======================================================================================================================================================
Removing:
 gnome-boxes                                        x86_64                    3.22.3-2.fc25                         @updates                    5.0 M
 libguestfs                                         x86_64                    1:1.34.3-1.fc25                       @fedora                     3.8 M
 libguestfs-tools-c                                 x86_64                    1:1.34.3-1.fc25                       @fedora                      15 M
 libguestfs-xfs                                     x86_64                    1:1.34.3-1.fc25                       @fedora                       9  
 libvirt-daemon                                     x86_64                    2.2.0-2.fc25                          @updates                    2.5 M
 libvirt-daemon-config-network                      x86_64                    2.2.0-2.fc25                          @updates                    228  
 libvirt-daemon-driver-interface                    x86_64                    2.2.0-2.fc25                          @updates                    112 k
 libvirt-daemon-driver-network                      x86_64                    2.2.0-2.fc25                          @updates                    534 k
 libvirt-daemon-driver-nodedev                      x86_64                    2.2.0-2.fc25                          @updates                    112 k
 libvirt-daemon-driver-nwfilter                     x86_64                    2.2.0-2.fc25                          @updates                    169 k
 libvirt-daemon-driver-qemu                         x86_64                    2.2.0-2.fc25                          @updates                    1.3 M
 libvirt-daemon-driver-secret                       x86_64                    2.2.0-2.fc25                          @updates                     83 k
 libvirt-daemon-driver-storage                      x86_64                    2.2.0-2.fc25                          @updates                    658 k
 libvirt-daemon-kvm                                 x86_64                    2.2.0-2.fc25                          @updates                      0  

Transaction Summary
======================================================================================================================================================
Remove  14 Packages

Installed size: 29 M
Is this ok [y/N]

(次に使用しますdnf autoremove)。

おすすめ記事