virt-xml --version (return code: 0)
1.4.0
virt-xml --help (return code: 0)
usage: virt-xml [options]
Edit libvirt XML using command line options.
positional arguments:
domain Domain name, id, or uuid
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
-c URI, --connect URI
Connect to hypervisor with libvirt URI
XML actions:
--edit [EDIT] Edit VM XML. Examples:
--edit --disk ... (edit first disk device)
--edit 2 --disk ... (edit second disk device)
--edit all --disk ... (edit all disk devices)
--edit target=hda --disk ... (edit disk 'hda')
--remove-device Remove specified device. Examples:
--remove-device --disk 1 (remove first disk)
--remove-device --disk all (remove all disks)
--remove-device --disk /some/path
--add-device Add specified device. Example:
--add-device --disk ...
--build-xml Just output the built device XML, no domain required.
Output options:
--update Apply changes to the running VM.
With --add-device, this is a hotplug operation.
With --remove-device, this is a hotunplug operation.
With --edit, this is an update device operation.
--define Force defining the domain. Only required if a --print
option was specified.
--print-diff Only print the requested change, in diff format
--print-xml Only print the requested change, in full XML format
--confirm Require confirmation before saving any results.
XML options:
--disk DISK Specify storage with various options. Ex.
--disk size=10 (new 10GiB image in default location)
--disk /my/existing/disk,cache=none
--disk device=cdrom,bus=scsi
--disk=?
--disk cache= (unset cache)
-w NETWORK, --network NETWORK
Configure a guest network interface. Ex:
--network bridge=mybr0
--network network=my_libvirt_virtual_net
--network network=mynet,model=virtio,mac=00:11...
--network none
--network help
--graphics GRAPHICS Configure guest display settings. Ex:
--graphics vnc
--graphics spice,port=5901,tlsport=5902
--graphics none
--graphics vnc,password=foobar,port=5910,keymap=ja
--metadata METADATA Configure guest metadata. Ex:
--metadata name=foo,title="My pretty title",uuid=...
--metadata description="My nice long description"
--memory MEMORY Configure guest memory allocation. Ex:
--memory 1024 (in MiB)
--memory 512,maxmemory=1024
--vcpus VCPUS Number of vcpus to configure for your guest. Ex:
--vcpus 5
--vcpus 5,maxcpus=10,cpuset=1-4,6,8
--vcpus sockets=2,cores=4,threads=2,
--cpu CPU CPU model and features. Ex:
--cpu coreduo,+x2apic
--cpu host-model,clearxml=yes
--security SECURITY Set domain security driver configuration.
--numatune NUMATUNE Tune NUMA policy for the domain process.
--memtune MEMTUNE Tune memory policy for the domain process.
--blkiotune BLKIOTUNE
Tune blkio policy for the domain process.
--memorybacking MEMORYBACKING
Set memory backing policy for the domain process. Ex:
--memorybacking hugepages=on
--features FEATURES Set domain <features> XML. Ex:
--features acpi=off
--features apic=on,eoi=on
--clock CLOCK Set domain <clock> XML. Ex:
--clock offset=localtime,rtc_tickpolicy=catchup
--pm PM Configure VM power management features
--events EVENTS Configure VM lifecycle management policy
--resource RESOURCE Configure VM resource partitioning (cgroups)
--boot BOOT Configure guest boot settings. Ex:
--boot hd,cdrom,menu=on
--boot init=/sbin/init (for containers)
--idmap IDMAP Enable user namespace for LXC container. Ex:
--idmap uid_start=0,uid_target=1000,uid_count=10
--controller CONTROLLER
Configure a guest controller device. Ex:
--controller type=usb,model=ich9-ehci1
--input INPUT Configure a guest input device. Ex:
--input tablet
--input keyboard,bus=usb
--serial SERIAL Configure a guest serial device
--parallel PARALLEL Configure a guest parallel device
--channel CHANNEL Configure a guest communication channel
--console CONSOLE Configure a text console connection between the guest
and host
--hostdev HOSTDEV Configure physical USB/PCI/etc host devices to be
shared with the guest
--filesystem FILESYSTEM
Pass host directory to the guest. Ex:
--filesystem /my/source/dir,/dir/in/guest
--filesystem template_name,/,type=template
--sound SOUND Configure guest sound device emulation
--watchdog WATCHDOG Configure a guest watchdog device
--video VIDEO Configure guest video hardware.
--smartcard SMARTCARD
Configure a guest smartcard device. Ex:
--smartcard mode=passthrough
--redirdev REDIRDEV Configure a guest redirection device. Ex:
--redirdev usb,type=tcp,server=192.168.1.1:4000
--memballoon MEMBALLOON
Configure a guest memballoon device. Ex:
--memballoon model=virtio
--tpm TPM Configure a guest TPM device. Ex:
--tpm /dev/tpm
--rng RNG Configure a guest RNG device. Ex:
--rng /dev/random
--panic PANIC Configure a guest panic device. Ex:
--panic default
Miscellaneous Options:
-q, --quiet Suppress non-error output
-d, --debug Print debugging information
Use '--option=?' or '--option help' to see available suboptions
See man page for examples and full option syntax.