หน้าแรก
» ลินุกซ์
»
SLES 15 KVM Virtualization Setup and VM Auto-Start Guide
SLES 15 KVM Virtualization Setup and VM Auto-Start Guide
SUSE Linux Enterprise Server 15 can serve as a KVM host with the QEMU/KVM hypervisor and the libvirt management stack. This guide is written as a practical reference for administrators who want a repeatable setup: confirm hardware virtualization, install the supported components, choose networking and storage, create a guest, enable per-VM automatic startup, and verify that the guest returns after the host reboots.
The commands and menu paths below were checked against the SUSE Linux Enterprise Server 15 SP7 Virtualization Guide, whose current publication is dated September 10, 2026. Earlier SLES 15 service packs are similar, but package versions, daemon defaults, and available guest profiles can differ. SUSE recommends managing supported virtualization through libvirt rather than mixing libvirt with direct hypervisor-specific management.
Quick planning checklist
Item
What to decide or verify
CPU
Hardware virtualization is supported and enabled in firmware: Intel VT-x or AMD-V on x86 systems.
Host resources
Leave enough CPU, RAM, storage, and I/O capacity for SLES itself as well as every guest.
Networking
Use a bridge when guests need normal Layer 2 access to the LAN; use a libvirt virtual network when NAT or routed isolation fits better.
Storage
Choose where guest disk images will live and make sure the backing filesystem or storage pool has sufficient free space.
Management
Use libvirt tools such as virsh, virt-install, and Virtual Machine Manager consistently.
Boot behavior
Auto-start is configured individually for each persistent VM, not with one global switch for all guests.
1. Verify that the host can run KVM
KVM requires processor virtualization support and firmware settings that expose that support to the operating system. On an x86 host, a quick first check is to look for the Intel vmx or AMD svm CPU flag. The libvirt client package also provides virt-host-validate, which performs a broader set of host checks.
A positive CPU flag count is useful, but it is not the only requirement. If validation reports that KVM is unavailable, check BIOS or UEFI settings first, especially on a newly provisioned server. SUSE's KVM host documentation states that virtualization must be supported by the CPU and enabled in BIOS/firmware. Also remember that nested virtualization is a separate feature; on SLES 15 SP7 SUSE documents nested KVM as a technology preview rather than a production-supported default.
A terminal view of the preflight stage: CPU virtualization flags and host validation are checked before creating any VMs.
2. Install the KVM server and libvirt management tools
The most support-aligned path is YaST. Open YaST > Virtualization > Install Hypervisor and Tools, select KVM server, and select KVM tools if you want the libvirt management stack. SUSE documents the yast2-vm package as the YaST module used for this setup.
For command-line automation, SLES groups the same functionality into installation patterns. Install both the host and management patterns:
The kvm_server pattern installs the basic QEMU/KVM host environment. The kvm_tools pattern adds libvirt-based tools for managing and monitoring guests. The exact dependency list is service-pack dependent, so installing the documented patterns is preferable to maintaining a hand-written package list unless you have a controlled minimal-host design.
In YaST, select KVM server and KVM tools to install the hypervisor and the libvirt management stack.
3. Choose the VM network model before moving production traffic
SUSE describes a network bridge as the default and recommended connection when guests should attach directly to the host's LAN. A bridge acts like a Layer 2 switch: the host's physical interface and VM virtual interfaces participate in the same Ethernet segment. This is usually the clearest choice for infrastructure VMs that need their own LAN addresses, inbound services, DHCP reservations, or normal visibility to other machines.
A libvirt virtual network is often better when guests need isolation or simple outbound connectivity. NAT can let several guests share the host's external address while remaining on a private subnet. Routed mode forwards traffic without address translation, but requires suitable routing in the surrounding network.
If the host uses wicked, which SUSE documents as the default network management service on server hosts, create the bridge with YaST or the corresponding command-line configuration. NetworkManager systems can use nmcli. Be cautious on remote servers: moving the host IP configuration to a bridge can interrupt SSH if the change is wrong. Schedule a maintenance window or make sure you have console access.
A bridged network example with br0 attached to a physical Ethernet interface, suitable when guests need Layer 2 LAN access.
4. Confirm the KVM kernel modules are loaded
After installation, verify the kernel side of KVM. Intel hosts normally use kvm_intel; AMD hosts use kvm_amd. SUSE's KVM host setup guide demonstrates loading the processor-specific module and checking it with lsmod.