libvirt/src
Wen Congyang e2aec53b97 qemu: check driver name while attaching disk
This bug was reported by Shi Jin(jinzishuai@gmail.com):
=============
# virsh attach-disk RHEL6RC /var/lib/libvirt/images/test3.img vdb \
        --driver file --subdriver qcow2
Disk attached successfully

# virsh save RHEL6RC /var/lib/libvirt/images/memory.save
Domain RHEL6RC saved to /var/lib/libvirt/images/memory.save

# virsh restore /var/lib/libvirt/images/memory.save
error: Failed to restore domain from /var/lib/libvirt/images/memory.save
error: internal error unsupported driver name 'file'
       for disk '/var/lib/libvirt/images/test3.img'
=============

We check the driver name when we start or restore VM, but we do
not check it while attaching a disk. This adds the same check on disk
driverName used in qemuBuildCommandLine to qemudDomainAttachDevice.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
2011-03-18 00:36:37 -04:00
..
conf Make virDomainObjParseNode() static 2011-03-17 16:47:55 -06:00
cpu hash: make virHashFree more free-like 2011-02-21 08:27:02 -07:00
esx libvirt: implements virDomain{Get,Set}BlkioParameters 2011-03-10 17:53:33 -07:00
interface Implement forgotten backend of virInterfaceIsActive() 2010-04-14 10:38:18 -04:00
lxc virsh: fix memtune's help message for swap_hard_limit 2011-03-17 16:45:06 -06:00
network network driver: don't send default route to clients on isolated networks 2011-03-14 08:24:23 -04:00
node_device maint: kill all remaining uses of old DEBUG macro 2011-02-21 08:46:52 -07:00
nwfilter fixes for several memory leaks 2011-03-04 09:52:12 -07:00
opennebula libvirt: implements virDomain{Get,Set}BlkioParameters 2011-03-10 17:53:33 -07:00
openvz libvirt: implements virDomain{Get,Set}BlkioParameters 2011-03-10 17:53:33 -07:00
phyp libvirt: implements virDomain{Get,Set}BlkioParameters 2011-03-10 17:53:33 -07:00
qemu qemu: check driver name while attaching disk 2011-03-18 00:36:37 -04:00
remote remote: Add missing virCondDestroy calls 2011-03-17 17:51:33 +01:00
secret Put <stdbool.h> into internal.h so it is available everywhere 2011-02-24 12:04:06 +00:00
security build: avoid compiler warning on cygwin 2011-03-08 21:56:18 -07:00
storage Fix performance problem of virStorageVolCreateXMLFrom() 2011-03-14 21:02:17 -06:00
test libvirt: implements virDomain{Get,Set}BlkioParameters 2011-03-10 17:53:33 -07:00
uml libvirt: implements virDomain{Get,Set}BlkioParameters 2011-03-10 17:53:33 -07:00
util Avoid taking lock in libvirt debug dump 2011-03-18 10:06:30 +08:00
vbox libvirt: implements virDomain{Get,Set}BlkioParameters 2011-03-10 17:53:33 -07:00
vmware libvirt: implements virDomain{Get,Set}BlkioParameters 2011-03-10 17:53:33 -07:00
vmx Put <stdbool.h> into internal.h so it is available everywhere 2011-02-24 12:04:06 +00:00
xen Support Xen sysctl v8, domctl v7 2011-03-17 14:16:47 -06:00
xenapi libvirt: implements virDomain{Get,Set}BlkioParameters 2011-03-10 17:53:33 -07:00
xenxs Add support for multiple serial ports into the Xen driver 2011-02-25 11:33:27 -07:00
.gitignore util: add missing export 2010-10-12 09:42:18 -06:00
datatypes.c maint: kill all remaining uses of old DEBUG macro 2011-02-21 08:46:52 -07:00
datatypes.h Remove all object hashtable caches from virConnectPtr 2011-02-21 11:50:46 +00:00
driver.c maint: kill all remaining uses of old DEBUG macro 2011-02-21 08:46:52 -07:00
driver.h libvirt: implements virDomain{Get,Set}BlkioParameters 2011-03-10 17:53:33 -07:00
fdstream.c build: avoid close, system 2011-01-29 10:36:45 -07:00
fdstream.h Put <stdbool.h> into internal.h so it is available everywhere 2011-02-24 12:04:06 +00:00
gnutls_1_0_compat.h build: consistently indent preprocessor directives 2010-03-09 19:22:28 +01:00
internal.h Put <stdbool.h> into internal.h so it is available everywhere 2011-02-24 12:04:06 +00:00
libvirt_bridge.syms Replace brSetInetAddress/brSetInetNetmask with brAddInetAddress 2010-12-23 15:53:26 -05:00
libvirt_daemon.syms Export conditional state driver symbols only when they are defined 2010-03-23 02:05:18 +01:00
libvirt_driver_modules.syms Move --with-driver-modules symbols into a separate sym file 2009-01-05 14:06:41 +00:00
libvirt_internal.h build: consistently indent preprocessor directives 2010-03-09 19:22:28 +01:00
libvirt_linux.syms migrate linux-specific symbol names into their own sym file 2009-01-05 14:08:26 +00:00
libvirt_macvtap.syms Fix undefined symbol errors when macvtap support is disabled 2010-12-01 17:08:08 +01:00
libvirt_nwfilter.syms Some NWFilter symbols are conditional and have to be exported conditional 2010-04-23 19:51:00 +02:00
libvirt_private.syms virsh: fix memtune's help message for swap_hard_limit 2011-03-17 16:45:06 -06:00
libvirt_public.syms libvirt: implements virDomain{Get,Set}BlkioParameters 2011-03-10 17:53:33 -07:00
libvirt_qemu.syms Qemu Monitor API entry point. 2010-07-23 17:30:14 -04:00
libvirt_vmx.syms esx: Move VMX handling code out of the driver directory 2010-12-21 22:40:17 +01:00
libvirt-qemu.c maint: kill all remaining uses of old DEBUG macro 2011-02-21 08:46:52 -07:00
libvirt.c libvirt: fix a simple bug in virDomainSetMemoryFlags() 2011-03-15 08:14:41 -04:00
Makefile.am libvirtd: Remove indirect linking 2011-03-09 13:59:58 +01:00
nodeinfo.c Put <stdbool.h> into internal.h so it is available everywhere 2011-02-24 12:04:06 +00:00
nodeinfo.h build: consistently indent preprocessor directives 2010-03-09 19:22:28 +01:00
README Update src/README 2011-02-12 17:10:30 +01:00
remote_protocol-structs remote-protocol: implement new BlkioParameters API 2011-03-10 17:54:12 -07:00

       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:

 * esx/          - VMware ESX and GSX support using vSphere API over SOAP
 * lxc/          - Linux Native Containers
 * opennebula/   - Open Nebula using XMLRPC
 * 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, OpenNebula, 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