Node Stand-alone Operation
Contents |
Goals
- To describe the operation for a stand-alone oVirt node.
- Ability to define the size of the LVM volumes if local disk is used
- Ability to define a permanent file system for logging.
- Define logging details at boot menu
- rsyslog for running virtual machines.
- Ability to define/create a swap partition on local storage.
- Ability to define virtual machines through a minimal (text) interface.
- Ability to define network interfaces for node through a minimal (text) interface.
Starting oVirt Nodes in stand-alone mode
oVirt Nodes can run in stand-alone mode. Stand-alone mode must be set at boot time by adding the ovirt_standalone boot option or by selecting "stand-alone mode" in the GRUB boot menu. Follow this procedure to run an oVirt Node in stand-alone mode:
- Insert the livecd or live USB flash drive containing the oVirt Node.
- Boot the machine. Press any key when the screen labelled "Automatic boot in X seconds" appears.
- The boot menu displays. Select "Boot in stand-alone mode" and press enter to continue.
The oVirt Node stand-alone mode menu
The "oVirt Node stand-alone mode configuration menu" appears when the Node has successfully started in stand-alone mode. The menu resembles this:
oVirt Node stand-alone mode configuration menu 1) Networking Setup 4) Administrator Password 2) Disk Partitioning 5) Continue boot 3) Logging Setup 6) Local install and reboot Please select an option:
From this menu you can configure the settings for the oVirt Node.
Networking Configuration
Non-Interactive (Automated) Configuration
Kernel Arguments
In order to configure a node's networking automatically, kernel arguments must be supplied. These arguments provide details for the network.
| Kernel Argument | Description | Usage |
|---|---|---|
| BOOTIF | Required to trigger autoinstall. Specifies boot/management NIC | eth*|<MAC> (as appended by pxelinux IPAPPEND 2) |
| ip | Specifies the IPv4 address to be used. |
|
| netmask | Specifies the IPv4 netmask to be used. This argument is optional. | netmask=255.255.255.0 |
| gateway | Specifies the IPv4 gateway to be used. This argument is optional. | gateway=172.31.0.1 |
| ipv6=[type] | Tells the node to enable IPv6 networking |
|
Interactive Configuration
Networking
From the first boot menu, select the Networking option.
1) eth0 2) eth1 3) Save 4) Quit Please select a network interface to configure:
On the screen a menu will show all network interfaces on the device, as well as an option to Save and to Quit.
Selecting an interface takes the user into configuration for that device. Configuration creates a new bridged interface to be used by the selected network device. The bridge is named for the interface selected.
1) eth0 2) eth1 3) Save 4) Quit Please select a network interface to configure: 1 Configure ovirtbreth0 for use by eth0..
IPv4 Configuration
Enable IPv4 support ([S]tatic IP, [D]HCP, [N]o or [A]bort)?
Selecting S allows the user to enter static addressing information for the interface.
IP Address: 172.31.0.100 Netmask: 255.255.255.0 Gateway: 172.31.0.1
Selecting D will result in the interface using DHCP to retrieve an IP address, etc.
Selecting N will result in no IPv4 addressing for the interface.
Selecting A will exit configuration for the device.
IPv6 Configuration
Enable IPv6 supprt ([S]tatic, [D]HCPv6, A[u]to, [N]o, [A]bort)?
Selecting S allows the user to enter static addressing information, specifically the IP address and optional prefix, for the interface.
IPv6 Address: 3ffe:ffff:0000:f100::1/56
Selecting D will result in stateful automatic configuration for the interface.
Selecting U will result in stateless automatic configuration for the interface.
Selecting N will result in no IPv4 addressing for the interface.
Selecting A will exit configuration for the device.
Saving The Configuration
Is this correct (Y/N/A)?
Selecting Y saves the configuration files to disk.
Selecting N allows the user to re-enter the configuration for the device.
Selecting A aborts the configuration and returns to main menu
Applying The Configuration
1) eth0 2) eth1 3) Save 4) Quit Please select a network interface to configure:
Selecting Save from the menu applies the network configuration changes and restarts the network service.
Selecting Quit exits without changing the network configuration.
Local Storage
Partitions
Local storage configuration creates the following partions.
| Partition Label | Description |
|---|---|
| SWAP | Linux swap area. |
| BOOT | Contains bootloader, kernel and initramfs. |
| ROOT | Contains the rootfs - LiveOS folder from the liveCD image. |
| CONFIG | Holds configuration files for the node. |
| LOGGING | Holds all logs for the node. |
| DATA | Storage of virtual machine images. |
All partitions, except BOOT, are created on logical volumes. This is to allow for easier resizing of the partitions after installation has completed.
Non-Interactive (Automated) Setup
The following kernel arguments determine the size of partitions when automated storage configuration is performed. Any existing data and partitioning information is destroyed.
All sizes are specified in megabytes.
| Kernel Argument | Description |
|---|---|
| ovirt_init= { {usb or scsi} [:serial#] or /dev/... } | Required to trigger autoinstall. Local installation target disk: usb or scsi - select disk type, as reported by udev ID_BUS, serial# - select exact disk using serial number, as reported by udev ID_SERIAL. If parameter value is not specified, first disk is taken. |
| ovirt_vol=BOOT_MB:SWAP_MB:ROOT_MB:CONFIG_MB:LOGGING_MB:DATA_MB | specify partition sizes. If size for the partition is 0, that partition is not created. If size for partition is skipped i.e. entered as :: in the boot parameter value, default size is used. |
| BOOT_MB | The size of the boot partition. Default is 50 MB. |
| SWAP_MB | The size of the swap partition. Default is calculated from RAM size and overcommit ratio. |
| ROOT_MB | The size of the root file system partition. Default is 256 MB x2 (for backup root). |
| CONFIG_MB | The size of the configuration partition. Default is 5 MB. |
| LOGGING_MB | The size of the logging partition. Default is 256 MB. |
| DATA_MB | The size of the data partition. Default is the remaining disk space, which is -1. If set to 0 then no data partition is created. Otherwise any value entered will specify the total size for the data partition. |
The DATA partition will use remaining disk space after all other partitions are created.
Interactive Setup
From the first boot, the user selects the Storage option. This displays the following menu:
1) Configure 2) Review 3) Partition 4) Quit Choose an option:
Selecting Quit returns the user to the first boot menu.
Configure
1) /dev/sdb 2) /dev/sda 3) Abort Choose an option: 1 selected device: (0 MB) Change swap partition size (Currently 3040 MB)? 3040 Change boot partition size (Currently 256 MB)? Change root partition size (Currently 256 MB)? 512 Change logging partition size (Currently 256 MB)? 1024 Change config partition size (Currently 5 MB)?
When running in interactive mode, no device is pre-selected. The user must instead explicitly choose the device to be used. Only device detected as writable are selected.
After selecting a device, the user is then prompted to change the size for each of the partitions to be created. If the user presses Enter or enters an invalid value then the default is used.
The user is then returned to the main menu.
Review
Displays the current proposed partition sizes.
The local disk will be repartitioned as follows:
================================================
Physical Hard Disk: /dev/sda
Total storage available: 114473 MB
Swap partition size: 3040 MB
Boot partition size: 256 MB
Installation partition size: 512 MB
Configuration partition size: 5 MB
Logging partition size: 1024 MB
Actual partition sizes may change, being rounded up, based on decisions from the OS and partitioning software.
Partition
!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!! !!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!! !!WARNING!! !!WARNING!! !!WARNING!! !!WARNING!! !!WARNING!! If you proceed, this will destroy all data on your local!! !!WARNING!! system, and your hard disk will be irreversably reconfigured!! !!WARNING!! !!WARNING!! !!WARNING!! !!WARNING!! !!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!! !!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!!WARNING!! Continue? (Y/n)
This process is destructive and unrecoverable. If the user selects the Partition option and then answers Y to continue, the hard disk will be repartitioned and loss of data will occur.
Upon completion of this process, the hard disk will be ready to have the node image installed and booted from hard disk.
Logging
Administrative Password
Flow Of Events
- Machine starts.
- Machine determines if it's running in stand-alone mode.
- ovirt_standalone boot param to force it (available as non-default boot menu entry)
- assume stand-alone if _ovirt._tcp DNS SRV is not available
- parse pxelinux or anaconda ip boot params
- pxelinux format: ip=<client-ip>:<boot-server-ip>:<gw-ip>:<netmask>
- anaconda format: ip=<client-ip> netmask=<netmask> gateway=<gw-ip>
- see anaconda/loader2/loader.c
- If this is firstboot ( OVIRT_FIRSTBOOT=NO in /etc/default/ovirt records that firstboot is done)
- ovirt-config-setup runs at S99 to have HAL etc. available
- Look for _syslog._udp DNS SRV record, set rsyslog to remote if found.
- Prompt the user for an administrator password.
- ovirt-config-password
- Prompt user to configure disk storage.
- ovirt-config-storage
- Install node to disk?
- ovirt-config-install
- Prompt user to configure networking.
- ovirt-config-networking
- Prompt user to configure logging via rsyslog.
- ovirt-config-logging
- Ask user for remote syslog server
- Ask user for remote syslog port
- Ask user for syslog protocol (udp/tcp)
- Restart rsyslog daemon
- ovirt-config-logging
- Finish booting.
Configuration persistence
- persisted files are bind-mounted from /config filesystem on CONFIG volume.
- issues: augtool or sed -i on bind-mounted file fails: https://fedorahosted.org/augeas/ticket/32 - workaround is to unmount the file, copy the file from /config to rootfs, edit file directly in rootfs, copy back to /config and bind-mount it back to rootfs
Default values from kernel boot params
- /proc/cmdline parsed in ovirt-early, sets variables in /etc/default/ovirt
- /etc/init.d/ovirt-functions sources that, all ovirt scripts source ovirt-functions
- if all required values are set, perform zero-touch install (like ks)
- OVIRT_STANDALONE=1 if ovirt_standalone present
- OVIRT_LOCAL_BOOT=1 if ovirt_local_boot present
- OVIRT_INIT ovirt_init=scsi|usb - specifies the storage device to be configured
- OVIRT_VOL_* specify volume sizes:
- OVIRT_VOL_SWAP_SIZE OVIRT_VOL_BOOT_SIZE OVIRT_VOL_ROOT_SIZE OVIRT_VOL_CONFIG_SIZE OVIRT_VOL_LOGGING_SIZE
- OVIRT_IPV6 ipv6=dhcp|auto
- OVIRT_SYSLOG_SERVER OVIRT_SYSLOG_PORT syslog=ip:port TBD logrotate maxsize

