Documentation Advanced Administration and Command-Line Reference

CHAPTER 26

Advanced Administration and Command-Line Reference

17 sections · 19 min read · SimpleVM 10.1

Part XIII — Advanced Administration and Reference

Almost everything in this guide is done from the web console, and that is deliberate: the console is guided, reversible, and hard to get badly wrong. This chapter exists for the cases the console does not cover — when you need more detail than a page shows, when you are recovering from a fault, when support asks for specific output, or when you are scripting a repeatable task. The tools below expose the virtualization, storage, networking, and firewall layers that SimpleVM normally configures for you. They are powerful, and several of them are destructive. Used in the order this chapter recommends — read first, change one thing, keep a way back — they are also the fastest way to understand and repair a host.

Use it as a lookup, not a tutorial. If you know the command family you need, jump to its section (Section 26.3 through Section 26.7). If you are orienting from a VMware background, start with Section 26.8, VMware-to-SimpleVM Concepts. If you are collecting information for a support case, Section 26.16, Support Information Checklist tells you exactly what to gather. The glossary in Section 26.17 defines the terms used across the whole guide.

26.1 When to Use Advanced Administration Tools

Overview

Most day-to-day SimpleVM administration belongs in the management interface. The web console gives you a guided, reversible way to create virtual machines, read host health, manage storage pools, adjust virtual networks, review updates, and open a terminal — all without the risk that comes from typing raw commands against a live host. Reach for the command line when the console genuinely cannot do what you need:

  • More detail than a page shows — full VM XML, exact pool capacity, the live routing table, or a service's recent log lines.
  • Troubleshooting — confirming state and narrowing a fault when a page does not explain a symptom. The diagnostic method itself lives in Chapter 25, Troubleshooting.
  • Support output — gathering the specific command output a support engineer asks for (see Section 26.16, Support Information Checklist).
  • Automation — scripting a repeatable task that the console performs one click at a time.
Figure 26-1. The web Terminal provides command-line access from inside the management interface, under Tools in the navigation. It opens as the signed-in host user — svmadmin in this capture — not as root; commands that require elevated privileges must be run accordingly. Home chapter: Chapter 19, Host Administration Tools.
Figure 26-1. The web Terminal provides command-line access from inside the management interface, under Tools in the navigation. It opens as the signed-in host user — svmadmin in this capture — not as root; commands that require elevated privileges must be run accordingly. Home chapter: Chapter 19, Host Administration Tools.

26.2 Command-Line Administration Overview

Overview

SimpleVM is built on the standard RHEL-family virtualization stack, so the command-line tools are the same ones an experienced Linux virtualization administrator already knows. The command line does not replace the guided console for normal use, but it is valuable for verification, recovery, support, and automation. The families you will use most are below, with the risk each one carries.

Command familyUsed forTypical risk level
virshVirtual machines, storage pools, virtual networks, snapshots, and migration.Medium to high, depending on the subcommand.
virt-installCreating virtual machines from the command line.Medium. It creates new VM configuration and storage.
nmcliViewing and changing host network connections.High. A mistake can disconnect the host.
firewall-cmdViewing and changing firewall zones, services, and ports.Medium to high. A mistake can block management or cluster traffic.
systemctl / journalctlService state and logs.Low for viewing; medium when starting, stopping, or disabling services.
df, lsblk, lvs/vgs/pvsReviewing host storage usage and block devices.Low. Read-only.

The safety pattern for advanced commands

Apply the same sequence every time, regardless of which family you are using. It is the single habit that prevents most command-line accidents:

  • Confirm the host. Run hostnamectl and confirm you are on the host you intend to change.
  • List before you change. List the current objects — VMs, pools, networks, zones, or connections — so you know the exact name you are acting on.
  • Read-only first. Run list, info, show, or status commands before any command that changes state.
  • Do not run destructive commands without a recovery path. Confirm the VM data, host configuration, or network path is backed up or otherwise recoverable first.
  • Document production-affecting changes. Record what you changed, on which host, and when — anything that touches production VMs, storage, networking, firewall rules, or cluster behavior.

26.3 Common VM Commands

Overview

These virsh commands inspect and control virtual machines. Use the VM name exactly as it appears in the Virtual machines list or in virsh list --all. Read-only commands are safe to run at any time; the state-changing commands are marked in the notes column.

TaskCommandNotes
List running VMsvirsh listVirtual machines that are currently running.
List all VMsvirsh list --allRunning and stopped VMs.
Show VM detailsvirsh dominfo <vm>ID, state, memory, and vCPU count.
Show VM configurationvirsh dumpxml <vm>Full VM XML. Useful for support and as a configuration backup.
Show current statevirsh domstate <vm>Running, paused, shut off, or another state.
Start a VMvirsh start <vm>Starts a stopped VM.
Graceful shutdownvirsh shutdown <vm>Changes state. Requests an orderly guest shutdown.
Force off a VMvirsh destroy <vm>Destructive to state, not data. Force-stops the VM; does NOT delete it. Use only when graceful shutdown fails.
Graceful rebootvirsh reboot <vm>Requests a guest reboot.
Enable autostartvirsh autostart <vm>Starts the VM automatically with the host.
Disable autostartvirsh autostart --disable <vm>Prevents automatic start with the host.
Open serial consolevirsh console <vm>Serial console, when the guest is configured for it.
Remove VM definitionvirsh undefine <vm>Destructive. Removes the VM definition. Does not always remove disks — confirm storage first.
List VM disksvirsh domblklist <vm>Disk targets and backing files.
List VM interfacesvirsh domiflist <vm>Network interfaces and attached networks or bridges.
Show active jobvirsh domjobinfo <vm>Progress of an active job such as a migration.

26.4 Common Storage Commands

Overview

Storage commands verify pool status, refresh pool metadata, and collect information for support. For routine storage-pool work, use the management interface — see Chapter 12, Managing Storage Pools, and Chapter 13, Managing Host Storage. Confirm pool state on the Storage pools page before running virsh pool-* commands.

Figure 26-2. Confirm storage-pool names, paths, and state on the Storage pools page before using command-line tools. Home chapter: Chapter 12, Managing Storage Pools.
Figure 26-2. Confirm storage-pool names, paths, and state on the Storage pools page before using command-line tools. Home chapter: Chapter 12, Managing Storage Pools.
TaskCommandNotes
List storage poolsvirsh pool-list --allActive and inactive pools.
Show pool detailsvirsh pool-info <pool>State, capacity, allocation, and available space.
Show pool backing pathvirsh pool-dumpxml <pool>The directory or device backing the pool.
List pool volumesvirsh vol-list <pool>Volumes contained in a pool.
Activate a poolvirsh pool-start <pool>Starts an inactive pool.
Autostart a poolvirsh pool-autostart <pool>Starts the pool automatically with the host.
Deactivate a poolvirsh pool-destroy <pool>Changes state. Deactivates the pool (does not delete its files). VMs depending on it are affected.
Refresh pool metadatavirsh pool-refresh <pool>Updates libvirt metadata after changes made outside libvirt.
Show block deviceslsblk -fDisks, partitions, filesystems, and mount points.
Confirm a mountfindmnt /dataConfirms a mount point such as the data volume.
Show filesystem usagedf -hMounted filesystem usage in human-readable units.
Show LVM layoutlvs / vgs / pvsLogical volumes, volume groups, and physical volumes.

26.5 Common Network Commands

Overview

Network commands divide into two groups: the virsh net- commands for the virtual networks that VMs attach to, and the nmcli and ip commands for the host network the SimpleVM host itself uses. Be especially careful with host-network changes when you are connected remotely. Confirm virtual networks on the Networks page before running virsh net-; see Chapter 14, Managing Virtual Networks, and Chapter 15, Managing Host Networking.

Figure 26-3. Review virtual networks on the Networks page before using virsh net- commands. Home chapter: Chapter 14, Managing Virtual Networks.
Figure 26-3. Review virtual networks on the Networks page before using virsh net- commands. Home chapter: Chapter 14, Managing Virtual Networks.
TaskCommandNotes
List virtual networksvirsh net-list --allActive and inactive virtual networks.
Show network detailsvirsh net-info <network>State, autostart, and bridge name.
Show network XMLvirsh net-dumpxml <network>Full virtual-network configuration.
Activate a networkvirsh net-start <network>Starts an inactive virtual network.
Autostart a networkvirsh net-autostart <network>Starts the network automatically with the host.
Stop a networkvirsh net-destroy <network>Changes state. Stops an active network; attached VMs can lose connectivity.
Show DHCP leasesvirsh net-dhcp-leases <network>Current DHCP leases on the network.
Show host devicesnmcli device statusHost interfaces and NetworkManager state.
Show host connectionsnmcli connection showConfigured host connection profiles.
Show IP addressesip address showAssigned addresses and interface state.
Show routing tableip route showDefault gateway and routes.
Show bridge portsbridge link showBridge port membership.
Test name resolutiongetent hosts <fqdn>Resolves a name using host resolver configuration.
Show active hostnamehostnamectlActive hostname and host identity.

26.6 Common Firewall Commands

Overview

The firewall protects the host and controls which services are reachable. SimpleVM uses firewalld with zones. Use the console for routine firewall review (see Chapter 16, Firewall and Security Settings) and firewall-cmd for detailed verification, support output, and the confirmed cluster-preparation procedure. Firewalld separates runtime and permanent configuration: a --permanent change does not take effect until you run firewall-cmd --reload.

Figure 26-4. The firewall Zones detail: the public zone (web console on 9090), the cluster zone (ssh and qemu-nbd), and the libvirt zone (VM DHCP and DNS). Home chapters: Chapter 16, Firewall and Security Settings, and Chapter 22, Configuring Host Clusters for Live VM Migration and High Availability.
Figure 26-4. The firewall Zones detail: the public zone (web console on 9090), the cluster zone (ssh and qemu-nbd), and the libvirt zone (VM DHCP and DNS). Home chapters: Chapter 16, Firewall and Security Settings, and Chapter 22, Configuring Host Clusters for Live VM Migration and High Availability.
TaskCommandNotes
Show firewall statefirewall-cmd --stateConfirms firewalld is running.
Show default zonefirewall-cmd --get-default-zoneThe default firewall zone.
List active zonesfirewall-cmd --get-active-zonesZones with interfaces or sources assigned.
List zone configurationfirewall-cmd --zone=<zone> --list-allServices, ports, protocols, and interfaces for a zone.
List known servicesfirewall-cmd --get-servicesService names firewalld can use.
Add a servicefirewall-cmd --permanent --zone=<zone> --add-service=<svc>Changes config. Permanent; requires --reload.
Remove a servicefirewall-cmd --permanent --zone=<zone> --remove-service=<svc>Changes config. Permanent; requires --reload.
Add a TCP portfirewall-cmd --permanent --zone=<zone> --add-port=<port>/tcpUse when no service definition exists. Requires --reload.
Apply permanent rulesfirewall-cmd --reloadApplies permanent configuration to the running firewall.

The cluster-preparation sequence below is confirmed against the live firewall zones (see Section 26.13, Firewall Services and Ports): the cluster zone allows ssh and qemu-nbd on TCP 49152–49215. Run it on each host, adding every peer as a source:

26.7 Common Migration Commands

Overview

Migration moves a virtual machine from one SimpleVM host to another. Use the documented migration and cluster workflows first — see Chapter 21, VM Migration, and Chapter 22, Configuring Host Clusters for Live VM Migration and High Availability. Command-line migration is for advanced administration, automation, and support-guided procedures. Live migration requires compatible hosts, reachable management networking, compatible CPU capabilities, and storage and network conditions that support the chosen method; shared storage and a configured cluster may be required for high-availability workflows.

Before migrating, confirm the VM's state, disks, and interfaces:

TaskCommandNotes
Check VM statevirsh domstate <vm>Running, paused, shut off, or another state.
Show VM disksvirsh domblklist <vm>Disk targets and backing files.
Show VM interfacesvirsh domiflist <vm>Interfaces and attached networks or bridges.
Show migration progressvirsh domjobinfo <vm>Progress of an in-flight migration job.

Live migration performs a permanent move and removes the VM definition from the source host:

26.8 VMware-to-SimpleVM Concepts

Overview

If you are coming from a VMware environment, the concept map below connects familiar terms to their SimpleVM equivalents. The mappings are orientation aids, not exact one-to-one replacements — the underlying technology differs — but they shorten the learning curve by anchoring SimpleVM ideas to ones you already use.

VMware conceptSimpleVM equivalentNotes
ESXi hostSimpleVM hostA physical server running SimpleVM and hosting virtual machines.
vSphere ClientManagement interface / web consoleBrowser-based management for host and VM operations.
Virtual machineVirtual machineSame concept: a guest OS on virtual hardware.
DatastoreStorage poolStorage location for VM disks and installation media.
Port group / vSwitchVirtual network / bridge networkingThe model differs, but both connect VMs to networks.
vMotionLive VM migrationMoves a running VM between compatible hosts when requirements are met.
HA clusterSimpleVM cluster / high availabilityClustered hosts support availability workflows.
SnapshotSnapshotPoint-in-time state. Use cautiously for production; a snapshot is not a backup.
VMware ToolsGuest tools / driversWindows guests may need VirtIO drivers for best storage and network performance.

26.9 Supported Guest Operating Systems

Overview

SimpleVM runs the common server and workstation guest operating systems supported by the underlying virtualization platform. The table below is an orientation guide only. Until the SimpleVM support policy and testing confirm a guest, do not present it to users as officially supported.

Guest familyExamplesDriver notesStatus
LinuxRocky Linux, RHEL, Oracle Linux, Ubuntu, Debian, SUSEUse VirtIO disk and network devices where supported.
Windows ServerWindows Server releases per SimpleVM policyVirtIO drivers required for best storage and network performance. Confirm licensing and activation.
Windows clientWindows desktop releases per SimpleVM policyUse only where the license and use case allow. Confirm driver requirements.
OtherBSD or appliance-based guestsSupport depends on guest compatibility and driver availability.

26.10 Default Paths and Directories

Overview

These directories are useful during troubleshooting and support. Most should be viewed, not edited: inspect them for diagnostics and make changes through the console or supported commands. The File browser under Tools is the safest way to inspect them without a shell — see Chapter 19, Host Administration Tools.

Figure 26-5. The File browser at /etc/libvirt, confirming the qemu, storage, secrets, and nwfilter subdirectories and the libvirt configuration files. Home chapter: Chapter 19, Host Administration Tools.
Figure 26-5. The File browser at /etc/libvirt, confirming the qemu, storage, secrets, and nwfilter subdirectories and the libvirt configuration files. Home chapter: Chapter 19, Host Administration Tools.
PathPurposeEditing guidance
/etc/libvirt/Virtualization configuration: the qemu, storage, secrets, and nwfilter subdirectories and the *.conf files (confirmed via the File browser).Do not edit manually unless directed by support.
/var/lib/libvirt/Virtualization runtime data and default storage areas.Inspect carefully; never delete VM disk files by hand.
/var/lib/libvirt/images/Common default location for file-based VM disk images.Confirm before documenting as the SimpleVM default; the host capture shows VM disks in the /data/images pool.
/var/log/System log location used by many services.Prefer journalctl and the console Logs page.
/etc/NetworkManager/NetworkManager configuration and connection data.Prefer the console or nmcli.
/etc/firewalld/Permanent firewalld configuration.Prefer the console or firewall-cmd.
/root/Root user home directory.Do not use as long-term storage for ISOs, exports, or VM data.

26.11 Default Storage Locations

Overview

A SimpleVM deployment should keep operating-system storage, VM data storage, ISO storage, and backup targets clearly separated. Exact pool names and paths vary by installation, so confirm them on the host before documenting a production standard. The installation and storage chapters are the primary source for storage planning — see Chapter 5, Post-Installation Configuration, and Chapter 12, Managing Storage Pools. The commands here confirm what exists on a deployed host.

TaskCommandNotes
List poolsvirsh pool-list --allConfigured storage pools on this host.
Show pool pathvirsh pool-dumpxml <pool>Backing path or device for a pool.
Show mountsfindmntMounted filesystems and mount points.
Show block layoutlsblk -fDisks, partitions, filesystems, and mount points.
Show usagedf -h /dataFilesystem usage for the data volume.

26.12 Default Network Configuration

Overview

Verify the network configuration on each host, because production deployments may use static addressing, bonded interfaces, VLANs, bridges, or separate management and VM networks. The commands below collect a safe, read-only network summary. The default NAT virtual network is rarely the right network for production VMs, which usually need bridge networking or a purpose-built virtual network — see Chapter 14, Managing Virtual Networks, and Chapter 15, Managing Host Networking.

TaskCommandNotes
Show device statenmcli device statusHost devices and whether NetworkManager manages them.
Show connection profilesnmcli connection showConfigured connection profiles.
Show IP addressesip -brief addressCompact list of interfaces and addresses.
Show routesip routeDefault gateway and route table.
Show virtual networksvirsh net-list --alllibvirt virtual networks, such as the default NAT network.

26.13 Firewall Services and Ports

Overview

This reference lists the firewall exposure confirmed on the live SimpleVM host. The values below are confirmed against the firewall Zones detail and are written as confirmed; environment-specific services such as DNS, NTP, and monitoring depend on your deployment.

Service / purposePort or serviceZoneWhen needed
Web console (management interface)9090/tcp (cockpit)publicBrowser access to the management interface.
SSH administration22/tcp (ssh)clusterCLI access, support, and SSH-based migration.
Cluster live-migration transfer49152-49215/tcp (qemu-nbd)clusterDisk transfer during live migration between cluster hosts.
VM DHCP and DNSdhcp, dnslibvirtAddress and name services for the default NAT network.
DNS / NTP / monitoringEnvironment-specificAs designedInfrastructure services used by the host.

Verify any host's exposure directly with these read-only commands:

TaskCommand
Show active zonesfirewall-cmd --get-active-zones
Show all settings for a zonefirewall-cmd --zone=<zone> --list-all
Show default-zone servicesfirewall-cmd --list-services
Show permanent rules for a zonefirewall-cmd --permanent --zone=<zone> --list-all

26.14 Cluster Ports and Services

Overview

Cluster and high-availability exposure should be documented from the completed clustering chapter and kept aligned with the supported SimpleVM cluster stack. Do not add, remove, or rename cluster firewall services based on generic Linux examples. The confirmed cluster firewall requirement is the cluster zone allowing ssh (22/tcp) and qemu-nbd (49152–49215/tcp), restricted to peer source addresses, as shown in Section 26.6, Common Firewall Commands, and Section 26.13, Firewall Services and Ports.

TaskCommandNotes
Show cluster zonefirewall-cmd --zone=cluster --list-allServices, ports, and sources assigned to the cluster zone.
Show active zonesfirewall-cmd --get-active-zonesWhich interfaces or sources are assigned to each active zone.

26.15 Log File Locations

Overview

Logs confirm what happened before, during, and after an issue. Start with the console Logs page where it has what you need, then use journalctl for deeper review and support collection. Include the time the issue occurred, the affected VM name, the host name, and any change made immediately before the issue began.

TaskCommandNotes
Recent high-priority logsjournalctl -xeRecent high-priority system context.
Current-boot logsjournalctl -bLogs from the current boot.
Virtualization service logsjournalctl -u libvirtd -u virtqemud -u virtlogdService names vary by version.
Firewall service messagesjournalctl -u firewalldFirewalld messages.
Host network messagesjournalctl -u NetworkManagerHost networking messages.
Follow logs livejournalctl -fStreams new messages as they occur.
Failed servicessystemctl --failedServices in a failed state.

26.16 Support Information Checklist

Overview

Collect this information before opening a support request or escalating internally. It gives support the context to understand the host, the affected VM, the storage and network path, and the timeline — usually enough to help on the first exchange instead of the third.

Information to collectCommand or location
SimpleVM version and host nameHost Overview page; hostnamectl; version command
Issue summary and timelineWhat changed, when, and what the user expected to happen.
Affected VM name and statevirsh list --all; virsh dominfo <vm>
VM disk and network attachmentvirsh domblklist <vm>; virsh domiflist <vm>
Storage pool statusvirsh pool-list --all; virsh pool-info <pool>
Host storage capacitydf -h; lsblk -f; Storage page screenshot
Host network summarynmcli device status; nmcli connection show; ip route
Firewall zone summaryfirewall-cmd --get-active-zones; --zone=<zone> --list-all
Relevant logsjournalctl -b; journalctl -u <service>
ScreenshotsThe console page showing the error, affected VM, storage, network, firewall, or update status.

26.17 Glossary

Overview

These terms are used throughout the SimpleVM User and Administrator Guide.

TermDefinition
Bridge networkingA network design that connects virtual machines to an external network through a host bridge interface.
ClusterA group of SimpleVM hosts configured for coordinated management, live migration, or high-availability workflows.
Firewall zoneA firewalld policy grouping that controls which services and ports are allowed for its assigned interfaces or source addresses.
High availabilityA design that helps workloads recover or continue service when a host or component fails.
HostA physical server running SimpleVM.
Live migrationMoving a running virtual machine from one compatible host to another with minimal downtime, when requirements are met.
Management interfaceThe browser-based SimpleVM interface used to manage the host and its virtual machines; the web console.
SnapshotA point-in-time VM state or disk reference for short-term recovery or testing. Behavior and limits depend on the VM and storage configuration; a snapshot is not a backup.
Storage poolA defined storage location SimpleVM uses for VM disks, ISO files, or other virtualization storage.
Virtual machineA guest operating system running on virtualized CPU, memory, storage, and network resources.
Virtual networkA software-defined network that connects virtual machines using NAT, isolated, bridged, or other designs.
Web consoleThe web-based system and virtualization administration interface used by SimpleVM, served on TCP port 9090.
Web terminalA terminal session available through the management interface for command-line administration, opened as the signed-in host user.