jessie 不知因何会自动加载 kvm 模块

最大的社区版本,Ubuntu的发源地
回复
头像
自由建客
帖子: 13468
注册时间: 2008-07-30 23:21
系统: Debian stable AMD64

jessie 不知因何会自动加载 kvm 模块

#1

帖子 自由建客 » 2015-09-21 23:22

就一个 /etc/init.d/qemu-system-x86,而且已被我禁用。每次开机还是自动加载了 kvm 模块。
因为我同时装了 vbox,要用 vbox 必须卸载 kvm 模块。我并不希望开机自动加载 kvm 模块。
1.png
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: jessie 不知因何会自动加载 kvm 模块

#2

帖子 poloshiao » 2015-09-22 7:49

https://wiki.debian.org/KVM#Installation
The daemon libvirt-bin daemon will start automatically at boot time and load the appropriate kvm modules, kvm-amd or kvm-intel, which are shipped with the Linux kernel Debian package.
libvirt-bin 移除 或 禁用 看看
头像
自由建客
帖子: 13468
注册时间: 2008-07-30 23:21
系统: Debian stable AMD64

Re: jessie 不知因何会自动加载 kvm 模块

#3

帖子 自由建客 » 2015-09-22 10:49

poloshiao 写了:libvirt-bin 移除 或 禁用 看看
壓根沒裝
头像
susbarbatus
帖子: 2966
注册时间: 2010-04-10 16:14
系统: Arch Linux

Re: jessie 不知因何会自动加载 kvm 模块

#4

帖子 susbarbatus » 2015-09-22 11:03

哪个 systemd 的 target 依赖上了?
沉迷将棋中……
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: jessie 不知因何会自动加载 kvm 模块

#5

帖子 poloshiao » 2015-09-22 15:01

每次开机还是自动加载了 kvm 模块
壓根沒裝 libvirt-bin
jessie
1. 是 systemd 初始化 ?

2. 開機登入 Console 還是 Desktop ?
<在 systemd 有點不同>
头像
自由建客
帖子: 13468
注册时间: 2008-07-30 23:21
系统: Debian stable AMD64

Re: jessie 不知因何会自动加载 kvm 模块

#6

帖子 自由建客 » 2015-09-22 18:56

poloshiao 写了:
jessie
1. 是 systemd 初始化 ?

2. 開機登入 Console 還是 Desktop ?
<在 systemd 有點不同>
是 jessie,是 systemd。更离谱的是,我把 qemu 等包都卸了,依然还会加载。
开机只到控制台,我 startx 之前就已经加载了。
头像
自由建客
帖子: 13468
注册时间: 2008-07-30 23:21
系统: Debian stable AMD64

Re: jessie 不知因何会自动加载 kvm 模块

#7

帖子 自由建客 » 2015-09-22 19:00

susbarbatus 写了:哪个 systemd 的 target 依赖上了?
从名字来看,似乎没什么不正常。

代码: 全选

default.target
● ├─acpi-support.service
● ├─display-manager.service
● ├─gpm.service
● ├─ifplugd.service
● ├─nmbd.service
● ├─ntp.service
● ├─nvidia-kernel.service
● ├─samba-ad-dc.service
● ├─smbd.service
● ├─systemd-update-utmp-runlevel.service
● ├─urd.service
● └─multi-user.target
●   ├─acpi-support.service
●   ├─anacron.service
●   ├─cron.service
●   ├─dbus.service
●   ├─dnsmasq.service
●   ├─gpm.service
●   ├─ifplugd.service
●   ├─nmbd.service
●   ├─ntp.service
●   ├─nvidia-kernel.service
●   ├─rc-local.service
●   ├─rsyslog.service
●   ├─samba-ad-dc.service
●   ├─smbd.service
●   ├─systemd-ask-password-wall.path
●   ├─systemd-logind.service
●   ├─systemd-update-utmp-runlevel.service
●   ├─systemd-user-sessions.service
●   ├─urd.service
●   ├─basic.target
●   │ ├─alsa-restore.service
●   │ ├─alsa-state.service
●   │ ├─paths.target
●   │ │ └─acpid.path
●   │ ├─slices.target
●   │ │ ├─-.slice
●   │ │ └─system.slice
●   │ ├─sockets.target
●   │ │ ├─acpid.socket
●   │ │ ├─dbus.socket
●   │ │ ├─systemd-initctl.socket
●   │ │ ├─systemd-journald-dev-log.socket
●   │ │ ├─systemd-journald.socket
●   │ │ ├─systemd-shutdownd.socket
●   │ │ ├─systemd-udevd-control.socket
●   │ │ └─systemd-udevd-kernel.socket
●   │ ├─sysinit.target
●   │ │ ├─debian-fixup.service
●   │ │ ├─dev-hugepages.mount
●   │ │ ├─dev-mqueue.mount
●   │ │ ├─hdparm.service
●   │ │ ├─kbd.service
●   │ │ ├─keymap.service
●   │ │ ├─kmod-static-nodes.service
●   │ │ ├─networking.service
●   │ │ ├─proc-sys-fs-binfmt_misc.automount
●   │ │ ├─sys-fs-fuse-connections.mount
●   │ │ ├─sys-kernel-config.mount
●   │ │ ├─sys-kernel-debug.mount
●   │ │ ├─systemd-ask-password-console.path
●   │ │ ├─systemd-binfmt.service
●   │ │ ├─systemd-journal-flush.service
●   │ │ ├─systemd-journald.service
●   │ │ ├─systemd-modules-load.service
●   │ │ ├─systemd-random-seed.service
●   │ │ ├─systemd-sysctl.service
●   │ │ ├─systemd-tmpfiles-setup-dev.service
●   │ │ ├─systemd-tmpfiles-setup.service
●   │ │ ├─systemd-udev-trigger.service
●   │ │ ├─systemd-udevd.service
●   │ │ ├─systemd-update-utmp.service
●   │ │ ├─udev-finish.service
●   │ │ ├─cryptsetup.target
●   │ │ ├─local-fs.target
●   │ │ │ ├─-.mount
●   │ │ │ ├─data.mount
●   │ │ │ ├─home.mount
●   │ │ │ ├─systemd-fsck-root.service
●   │ │ │ ├─systemd-remount-fs.service
●   │ │ │ ├─tmp.mount
●   │ │ │ └─vm.mount
●   │ │ └─swap.target
●   │ └─timers.target
●   │   └─systemd-tmpfiles-clean.timer
●   ├─getty.target
●   │ ├─getty-static.service
●   │ └─getty@tty1.service
●   └─remote-fs.target
●     └─remote-fs-pre.target
另,下面这个结果我不知道该怎样表达
1.png
头像
自由建客
帖子: 13468
注册时间: 2008-07-30 23:21
系统: Debian stable AMD64

Re: jessie 不知因何会自动加载 kvm 模块

#8

帖子 自由建客 » 2015-09-22 19:53

:em37 我猜,你们的机器也是这情况
头像
susbarbatus
帖子: 2966
注册时间: 2010-04-10 16:14
系统: Arch Linux

Re: jessie 不知因何会自动加载 kvm 模块

#9

帖子 susbarbatus » 2015-09-23 10:05

正好手头有一台 jessie,是一台服务器,从来就没安装过 qemu,

代码: 全选

# lsmod | grep kvm
kvm_intel             139116  0 
kvm                   388635  1 kvm_intel
沉迷将棋中……
头像
susbarbatus
帖子: 2966
注册时间: 2010-04-10 16:14
系统: Arch Linux

Re: jessie 不知因何会自动加载 kvm 模块

#10

帖子 susbarbatus » 2015-09-23 10:14

在 /etc/modprobe.d/ blacklist 掉吧
沉迷将棋中……
头像
自由建客
帖子: 13468
注册时间: 2008-07-30 23:21
系统: Debian stable AMD64

Re: jessie 不知因何会自动加载 kvm 模块

#11

帖子 自由建客 » 2015-09-23 20:09

susbarbatus 写了:在 /etc/modprobe.d/ blacklist 掉吧
不能加黑名单,因为有时我又要用它。我写了个 swapvm 脚本,专门用来切换 vbox、kvm 的。现在只好开机时多一步手脚,卸载 kvm 模块了。
头像
自由建客
帖子: 13468
注册时间: 2008-07-30 23:21
系统: Debian stable AMD64

Re: jessie 不知因何会自动加载 kvm 模块

#12

帖子 自由建客 » 2015-09-27 14:22

systemd 好卵强奸,卸载 kvm 模块的脚本,放到 /etc/init.d/ 说是执行成功,但 kvm 模块还是在。放别的目录就没问题。
1.png
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: jessie 不知因何会自动加载 kvm 模块

#13

帖子 poloshiao » 2015-09-27 15:42

sudo systemctl stop qemu-system-x86
1. sudo systemctl status qemu-system-x86
● qemu-system-x86.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
1-1. 意思是
qemu-system-x86 理解成 qemu-system-x86.service
1-2. https://packages.debian.org/jessie/amd6 ... 6/filelist
預裝時 qemu-system-x86 時 沒有 qemu-system-x86.service
1-3. 需要自己寫一個 qemu-system-x86.service 放在 /lib/systemd/system
參閱
1-3-1. http://unix.stackexchange.com/questions ... vice-files
Writing basic systemd service files
1-3-2. https://medium.com/@johannes_gehrs/gett ... 24758ca63d
Understanding Service Files
1-3-3. https://wiki.ubuntu.com/SystemdForUpsta ... md_service
Example Systemd service
1-3-4. http://man7.org/linux/man-pages/man5/sy ... ice.5.html
systemd.service - Service unit configuration
onlylove
论坛版主
帖子: 5371
注册时间: 2007-01-14 16:23

Re: jessie 不知因何会自动加载 kvm 模块

#14

帖子 onlylove » 2015-09-27 16:32

说什么都没用,赶紧把你的init搞出来,要不就把systemd拆掉 :Sleep 怎么拆一大把人教你,那些因为systemd闹fork的有详细文档
#include <stdio.h>
void main()
{
double world;
unsigned letter;
short stay;
long memories;
printf("I miss you.\n");
}
onlylove
论坛版主
帖子: 5371
注册时间: 2007-01-14 16:23

Re: jessie 不知因何会自动加载 kvm 模块

#15

帖子 onlylove » 2015-09-27 16:34

新表情好大只 :em06
#include <stdio.h>
void main()
{
double world;
unsigned letter;
short stay;
long memories;
printf("I miss you.\n");
}
回复