File tree Expand file tree Collapse file tree
systemvm/debian/opt/cloud/bin/setup Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -85,12 +85,18 @@ config_guest() {
8585 sed -i " s/%/ /g" $CMDLINE
8686 ;;
8787 kvm)
88- # Configure hot-plug
89- modprobe acpiphp || true
90- modprobe pci_hotplug || true
88+ # Configure kvm hotplug support
89+ if grep -E ' CONFIG_HOTPLUG_PCI=y|CONFIG_HOTPLUG_PCI_ACPI=y' /boot/config-` uname -r` ; then
90+ log_it " acpiphp and pci_hotplug module already compiled in"
91+ else
92+ modprobe acpiphp 2> /dev/null && log_it " acpiphp module loaded" || true
93+ modprobe pci_hotplug 2> /dev/null && log_it " pci_hotplug module loaded" || true
94+ fi
95+
9196 sed -i -e " /^s0:2345:respawn.*/d" /etc/inittab
9297 sed -i -e " /6:23:respawn/a\s0:2345:respawn:/sbin/getty -L 115200 ttyS0 vt102" /etc/inittab
93- systemctl enable --now qemu-guest-agent
98+ systemctl enable qemu-guest-agent
99+ systemctl start qemu-guest-agent
94100
95101 # Wait for $CMDLINE file to be written by the qemu-guest-agent
96102 for i in {1..60}; do
You can’t perform that action at this time.
0 commit comments