virt-designer - Man Page

Generate domain XML


virt-designer [OPTION]...


virt-designer is a command line tool for generating XML documents for libvirt domains. However, it cooperates with libosinfo database to guess the correct combination of attributes (e.g. disk driver, NIC model).

virt-designer does not feed libvirt with generated XML though. For now, it's a proof of concept.


The basic structure of arguments passed to virt-designer is:

  virt-designer [-c URI] [OPTION] [OPTION] ...

However, arguments have no pre-defined order so users can type them in any order they like.

General Options

-c URI, --connect=URI

The libvirt connection URI which is used for querying capabilities of the host.


List IDs of operating systems known to libosinfo


List IDs of platforms known to libosinfo

-o OS, --os=OS

Specify operating system that will be run on the domain. OS is an ID which can be obtained via --list-os.

-p PLATFORM, --platform=PLATFORM

Specify platform (hypervisor) under which the domain will run. PLATFORM is and ID which can be obtained via --list-platform.

-a ARCH, --architecture=ARCH

Set domain's architecture


Add PATH as a CDROM to the domain. To specify its format (e.g. raw, qcow2, phy) use FORMAT.


Add PATH as a disk to the domain. To specify its format (e.g. raw, qcow2, phy) use FORMAT.


Add an interface of type network with NETWORK source. Moreover, some other configuration knobs can be set (possible ARGs): mac, link={up|down}


Add a graphics device of type GRAPHICS. Valid values are spice or vnc.


Add smartcard reader to the VM conifguration


Add USB controllers and setup USB redirection in the VM configuration.

-r RESOURCE, --resources=RESOURCES

Set minimal or recommended resources on the domain XML. By default, the recommended is used.

Usually, both --os and --platform are required as they are needed to make the right decision on driver, model, ...  when adding a new device. However, when adding a disk which is an installation medium (e.g. a CD-ROM or DVD), virt-designer tries to guess the OS. Something similar is done with platform. Usually, the platform is guessed from the connection URI.


Domain with Fedora 17 from locally stored ISO and one NIC with mac 00:11:22:33:44:55 and link set down:

  # virt-designer -C Fedora-17-x86_64-Live-KDE.iso \
                  -i default,mac=00:11:22:33:44:55,link=down

To add multiple devices just use appropriate argument multiple times:

  # virt-designer -d /tmp/home.img,qcow2 \
                  -d /var/lib/libvirt/images/f17.img,qcow2 \
                  -i default,mac=00:11:22:33:44:55,link=down \
                  -i blue_network \
                  -r minimal


Written by Michal Privoznik, Daniel P. Berrange and team of other contributors. See the AUTHORS file in the source distribution for the complete list of credits.


Report any bugs discovered to the libvirt community via the mailing list or bug tracker Alternatively report bugs to your software distributor / vendor.

See Also

virsh(1), virt-clone(1), virt-manager(1), the project website


2021-01-26 libvirt-designer-0.0.2 Virtualization Support