libvirt/src
Nikolay Shirokovskiy 497dcafc2e vz: support boot order specification on define domain
The patch makes some refactoring of the existing code. Current boot order spec code
makes very simple thing in somewhat obscure way. In case of VMs
it sets the first hdd as the only bootable device. In case of CTs it
doesn't touch the boot order at all if one of the filesystems is mounted to root.
Otherwise like in case of VMs it sets the first hdd as the only bootable
device and additionally sets this device mount point to root. Refactored
code makes all this explicit.

The actual boot order support is simple. Common libvirt domain xml parsing
code makes the exact ordering of disks devices as described in docs
for boot ordering (disks are sorted by bus order first, device target
second. Bus order is the order of disk buses appearence in original
xml. Device targets order is alphabetical). We add devices in the
same order and SDK designates device indexes sequentially for each
device type. Thus device index is equal to its boot index. For
example N-th cdrom in boot specification refers to sdk cdrom with
it's device index N.

If there is no boot spec in xml the parsing code will add <boot dev='hdd'>
for HVMs automatically and we backward compatibly set fist hdd as
bootable.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Signed-off-by: Maxim Nestratov <mnestratov@virtuozzo.com>
2016-04-07 16:21:40 +03:00
..
access
admin admin: Add virAdmConnectLookupServer 2016-03-17 17:06:22 +01:00
bhyve conf: store bootindex as unsigned int 2016-04-06 09:27:23 +02:00
conf conf: store bootindex as unsigned int 2016-04-06 09:27:23 +02:00
cpu qemu_process: add check for hyperv features 2016-03-30 10:35:15 +02:00
esx esx: Avoid using vSphere SessionIsActive function 2016-02-18 19:28:35 +01:00
hyperv conf: add caps to virDomainDefFormat* 2016-02-04 12:38:26 +00:00
interface
libxl secret: Introduce virSecretGetSecretString 2016-04-06 20:31:21 -04:00
locking daemon: Get server name from the server itself 2016-03-11 12:58:41 +01:00
logging daemon: Get server name from the server itself 2016-03-11 12:58:41 +01:00
lxc Drop paths.h include 2016-03-18 09:43:45 +01:00
network network: Remove extraneous ATTRIBUTE_NONNULL 2016-04-05 05:43:47 -04:00
node_device nodedev: Expose PCI header type 2016-03-18 17:35:06 +01:00
nwfilter util: Add virSocketAddrSetIPv[46]AddrNetOrder and use it 2016-03-21 11:28:33 +01:00
openvz Drop paths.h include 2016-03-18 09:43:45 +01:00
phyp conf: refactor checking for unsupported memory devices 2016-03-09 10:09:16 +01:00
qemu qemu: perf: Fix crash/memory corruption on failed VM start 2016-04-07 12:50:15 +02:00
remote virDomain{Get,Set}PerfEvents: Add @flags argument 2016-03-31 07:24:36 +02:00
rpc build: workaround broken SASL header (again) 2016-03-31 17:36:49 +02:00
secret secret: Introduce virSecretGetSecretString 2016-04-06 20:31:21 -04:00
security apparmor: QEMU monitor socket moved 2016-04-02 12:49:28 +02:00
storage storage: Initialize pool size parameters for refresh thread 2016-03-29 07:28:47 -04:00
test conf: Extract code filling data for virDomainGetVcpuPinInfo 2016-03-09 10:09:16 +01:00
uml Drop paths.h include 2016-03-18 09:43:45 +01:00
util util: Introduce virRandomBytes 2016-04-06 20:27:09 -04:00
vbox conf: refactor checking for unsupported memory devices 2016-03-09 10:09:16 +01:00
vmware conf: refactor checking for unsupported memory devices 2016-03-09 10:09:16 +01:00
vmx domain: Add virDomainDefAddImplicitDevices 2016-03-20 16:11:04 -04:00
vz vz: support boot order specification on define domain 2016-04-07 16:21:40 +03:00
xen Xen drivers: show hap enabled by default in capabilities 2016-03-21 09:28:17 -06:00
xenapi conf: refactor checking for unsupported memory devices 2016-03-09 10:09:16 +01:00
xenconfig xenconfig: change 'hap' setting to align with Xen behavior 2016-03-21 09:28:17 -06:00
admin_protocol-structs admin: Add virAdmConnectLookupServer 2016-03-17 17:06:22 +01:00
check-aclperms.pl
check-aclrules.pl
check-driverimpls.pl
check-drivername.pl
check-symfile.pl
check-symsorting.pl
datatypes.c datatypes.c: Replace 'close' with 'closeData' 2016-03-02 09:33:28 +01:00
datatypes.h close callback: move it to driver 2016-03-01 14:17:38 +00:00
driver-hypervisor.h virDomain{Get,Set}PerfEvents: Add @flags argument 2016-03-31 07:24:36 +02:00
driver-interface.h
driver-network.h
driver-nodedev.h
driver-nwfilter.h
driver-secret.h
driver-state.h
driver-storage.h
driver-stream.h
driver.c driver: log missing modules as INFO, not WARN 2016-03-17 16:50:05 -04:00
driver.h
dtrace2systemtap.pl
fdstream.c fdstream: Realign 2016-02-01 16:12:22 +01:00
fdstream.h
gnutls_1_0_compat.h
internal.h
libvirt_admin_private.syms admin: Add virAdmConnectLookupServer 2016-03-17 17:06:22 +01:00
libvirt_admin_public.syms admin: Add virAdmConnectLookupServer 2016-03-17 17:06:22 +01:00
libvirt_atomic.syms
libvirt_driver_modules.syms
libvirt_esx.syms
libvirt_gnutls.syms
libvirt_internal.h daemon: add connection close rpc 2016-03-01 14:18:16 +00:00
libvirt_libssh2.syms
libvirt_linux.syms
libvirt_lxc.syms
libvirt_openvz.syms
libvirt_private.syms secret: Introduce virSecretGetSecretString 2016-04-06 20:31:21 -04:00
libvirt_probes.d
libvirt_public.syms perf: add new public APIs for perf event 2016-03-29 13:13:05 +01:00
libvirt_qemu_probes.d
libvirt_qemu.syms
libvirt_remote.syms Change virNetDaemonGetServerNames to virNetDaemonGetServers 2016-03-11 12:58:41 +01:00
libvirt_sasl.syms
libvirt_vmware.syms
libvirt_vmx.syms
libvirt_xenconfig.syms
libvirt_xenxlconfig.syms
libvirt-admin.c libvirt-admin: do not crash on URI without a scheme 2016-04-06 14:47:41 +02:00
libvirt-admin.conf
libvirt-domain-snapshot.c
libvirt-domain.c virDomain{Get,Set}PerfEvents: Add @flags argument 2016-03-31 07:24:36 +02:00
libvirt-host.c close callback: move it to driver 2016-03-01 14:17:38 +00:00
libvirt-interface.c
libvirt-lxc.c
libvirt-lxc.pc.in
libvirt-network.c
libvirt-nodedev.c
libvirt-nwfilter.c
libvirt-qemu.c
libvirt-qemu.pc.in
libvirt-secret.c
libvirt-storage.c
libvirt-stream.c
libvirt.c
libvirt.conf
libvirt.pc.in
lock_protocol-structs
lxc_monitor_protocol-structs
lxc_protocol-structs
Makefile.am secret: Introduce virSecretGetSecretString 2016-04-06 20:31:21 -04:00
nodeinfo.c
nodeinfo.h
nodeinfopriv.h
qemu_protocol-structs
README
remote_protocol-structs remote: Add flags to remote_protocol-structs 2016-03-31 14:07:46 +02:00
virkeepaliveprotocol-structs
virnetprotocol-structs

       libvirt library code README
       ===========================

The directory provides the bulk of the libvirt codebase. Everything
except for the libvirtd daemon and client tools. The build uses a
large number of libtool convenience libraries - one for each child
directory, and then links them together for the final libvirt.so,
although some bits get linked directly to libvirtd daemon instead.

The files directly in this directory are supporting the public API
entry points & data structures.

There are two core shared modules to be aware of:

 * util/  - a collection of shared APIs that can be used by any
            code. This directory is always in the include path
            for all things built

 * conf/  - APIs for parsing / manipulating all the official XML
            files used by the public API. This directory is only
            in the include path for driver implementation modules

 * vmx/   - VMware VMX config handling (used by esx/ and vmware/)


Then there are the hypervisor implementations:

 * bhyve         - bhyve - The BSD Hypervisor
 * esx/          - VMware ESX and GSX support using vSphere API over SOAP
 * hyperv/       - Microsoft Hyper-V support using WinRM
 * lxc/          - Linux Native Containers
 * openvz/       - OpenVZ containers using cli tools
 * phyp/         - IBM Power Hypervisor using CLI tools over SSH
 * qemu/         - QEMU / KVM using qemu CLI/monitor
 * remote/       - Generic libvirt native RPC client
 * test/         - A "mock" driver for testing
 * uml/          - User Mode Linux
 * vbox/         - Virtual Box using native API
 * vmware/       - VMware Workstation and Player using the vmrun tool
 * xen/          - Xen using hypercalls, XenD SEXPR & XenStore
 * xenapi/       - Xen using libxenserver


Finally some secondary drivers that are shared for several HVs.
Currently these are used by LXC, OpenVZ, QEMU, UML and Xen drivers.
The ESX, Hyper-V, Power Hypervisor, Remote, Test & VirtualBox drivers all
implement the secondary drivers directly

 * cpu/          - CPU feature management
 * interface/    - Host network interface management
 * network/      - Virtual NAT networking
 * nwfilter/     - Network traffic filtering rules
 * node_device/  - Host device enumeration
 * secret/       - Secret management
 * security/     - Mandatory access control drivers
 * storage/      - Storage management drivers


Since both the hypervisor and secondary drivers can be built as
dlopen()able modules, it is *FORBIDDEN* to have build dependencies
between these directories. Drivers are only allowed to depend on
the public API, and the internal APIs in the util/ and conf/
directories