jessie 不知因何会自动加载 kvm 模块
- 自由建客
- 帖子: 13468
- 注册时间: 2008-07-30 23:21
- 系统: Debian stable AMD64
jessie 不知因何会自动加载 kvm 模块
就一个 /etc/init.d/qemu-system-x86,而且已被我禁用。每次开机还是自动加载了 kvm 模块。
因为我同时装了 vbox,要用 vbox 必须卸载 kvm 模块。我并不希望开机自动加载 kvm 模块。
因为我同时装了 vbox,要用 vbox 必须卸载 kvm 模块。我并不希望开机自动加载 kvm 模块。
-
- 论坛版主
- 帖子: 18279
- 注册时间: 2009-08-04 16:33
Re: jessie 不知因何会自动加载 kvm 模块
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 移除 或 禁用 看看
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 模块
壓根沒裝poloshiao 写了:把 libvirt-bin 移除 或 禁用 看看
- susbarbatus
- 帖子: 2966
- 注册时间: 2010-04-10 16:14
- 系统: Arch Linux
-
- 论坛版主
- 帖子: 18279
- 注册时间: 2009-08-04 16:33
Re: jessie 不知因何会自动加载 kvm 模块
每次开机还是自动加载了 kvm 模块
壓根沒裝 libvirt-bin
1. 是 systemd 初始化 ?jessie
2. 開機登入 Console 還是 Desktop ?
<在 systemd 有點不同>
- 自由建客
- 帖子: 13468
- 注册时间: 2008-07-30 23:21
- 系统: Debian stable AMD64
Re: jessie 不知因何会自动加载 kvm 模块
是 jessie,是 systemd。更离谱的是,我把 qemu 等包都卸了,依然还会加载。poloshiao 写了:1. 是 systemd 初始化 ?jessie
2. 開機登入 Console 還是 Desktop ?
<在 systemd 有點不同>
开机只到控制台,我 startx 之前就已经加载了。
- 自由建客
- 帖子: 13468
- 注册时间: 2008-07-30 23:21
- 系统: Debian stable AMD64
Re: jessie 不知因何会自动加载 kvm 模块
从名字来看,似乎没什么不正常。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
- 自由建客
- 帖子: 13468
- 注册时间: 2008-07-30 23:21
- 系统: Debian stable AMD64
Re: jessie 不知因何会自动加载 kvm 模块

- susbarbatus
- 帖子: 2966
- 注册时间: 2010-04-10 16:14
- 系统: Arch Linux
Re: jessie 不知因何会自动加载 kvm 模块
正好手头有一台 jessie,是一台服务器,从来就没安装过 qemu,
代码: 全选
# lsmod | grep kvm
kvm_intel 139116 0
kvm 388635 1 kvm_intel
沉迷将棋中……
- susbarbatus
- 帖子: 2966
- 注册时间: 2010-04-10 16:14
- 系统: Arch Linux
- 自由建客
- 帖子: 13468
- 注册时间: 2008-07-30 23:21
- 系统: Debian stable AMD64
Re: jessie 不知因何会自动加载 kvm 模块
不能加黑名单,因为有时我又要用它。我写了个 swapvm 脚本,专门用来切换 vbox、kvm 的。现在只好开机时多一步手脚,卸载 kvm 模块了。susbarbatus 写了:在 /etc/modprobe.d/ blacklist 掉吧
- 自由建客
- 帖子: 13468
- 注册时间: 2008-07-30 23:21
- 系统: Debian stable AMD64
Re: jessie 不知因何会自动加载 kvm 模块
systemd 好卵强奸,卸载 kvm 模块的脚本,放到 /etc/init.d/ 说是执行成功,但 kvm 模块还是在。放别的目录就没问题。
-
- 论坛版主
- 帖子: 18279
- 注册时间: 2009-08-04 16:33
Re: jessie 不知因何会自动加载 kvm 模块
1. sudo systemctl status qemu-system-x86sudo systemctl stop 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
-
- 论坛版主
- 帖子: 5371
- 注册时间: 2007-01-14 16:23
Re: jessie 不知因何会自动加载 kvm 模块
说什么都没用,赶紧把你的init搞出来,要不就把systemd拆掉
怎么拆一大把人教你,那些因为systemd闹fork的有详细文档

#include <stdio.h>
void main()
{
double world;
unsigned letter;
short stay;
long memories;
printf("I miss you.\n");
}
void main()
{
double world;
unsigned letter;
short stay;
long memories;
printf("I miss you.\n");
}
-
- 论坛版主
- 帖子: 5371
- 注册时间: 2007-01-14 16:23
Re: jessie 不知因何会自动加载 kvm 模块
新表情好大只 

#include <stdio.h>
void main()
{
double world;
unsigned letter;
short stay;
long memories;
printf("I miss you.\n");
}
void main()
{
double world;
unsigned letter;
short stay;
long memories;
printf("I miss you.\n");
}