home

Supported platforms

Vyatta documentation

Learn how to install, configure, and operate the Vyatta Network Operating System (Vyatta NOS) and Orchestrator, which help drive our virtual networking and physical platforms portfolio.

Using the force and save options

The add virtualization xml operational mode command has two options: force and save.

force
The force option overwrites any of the following existing items:
  • Guest configuration with the same name.
  • Disk images at the specified paths that conflict with the new deployment.
  • vhost interfaces configuration.

    The interface assignments to other guests are not affected.

save
The save option enables the following conditions:
  • The running configuration is saved as a boot-up configuration if the guest deployment is successful.

    The save option causes the entire running configuration to be saved as a boot-up configuration and not just the changes made during the deployment of the guest. If there was a configuration that was previously committed and not saved, the configuration is saved as the boot-up configuration.

  • If the deployment makes no changes to the configuration, then the running configuration is not saved, even if the save option is specified.
  • Guests provisioned automatically by using the save option are not removed if you restart the system.

When provisioning a guest automatically, you can use the force and save options, either singly or together.

The following configuration example shows how to change the configuration of a guest by using the force and save options. In this example, the command specifies another set of the QCOW2 file and the ISO file. When you run the command, the guest details are overwritten and saved.

Table 1. Changing the guest configuration, QCOW2 file, and ISO file
Step Command
Specify the libvirt XML file, disk image, and the optional ISO file for the guest installation. Ensure that you use fully qualified file names for all the three files.
vyatta@vyatta:~$ add virtualization xml /home/vyatta/another-guest.xml image /home/vyatta/disk.qcow2 iso /home/vyatta/config.iso force save 
[INFO] - Overwriting existing "another-guest" guest config
[INFO] - Using existing bridge interface "br20"
[INFO] - Overwriting "dp0vhost0" interface configuration
[INFO] - Configured vhost interface "dp0vhost0"
[INFO] - Configured guest "another-guest"
[INFO] - Powering off existing guest "another-guest"
[INFO] - Overwriting "/var/lib/libvirt/images/another-guest/0-disk.qcow2"
[INFO] - Overwriting "/var/lib/libvirt/images/another-guest/1-config.iso"
[INFO] - Starting guest "another-guest"
[INFO] - Configuration saved
[INFO] - Deployment of /home/vyatta/another-guest.xml complete
Display the result in configuration mode.
vyatta@vyatta:~$ config
vyatta@vyatta# 
show virtualization
 virtualization {
    guest another-guest {
        cpus 2
        devices {
            disk 0 {
                boot-order 1
                bus-type virtio
                device-type disk
                source {
                    file /var/lib/libvirt/images/another-guest/0-disk.qcow2
                }
            }
            disk 1 {
                boot-order 2
                bus-type ide
                device-type cdrom
                source {
                    file /var/lib/libvirt/images/another-guest/1-config.iso
                }
            }
            network dp0vhost0 {
                mac-address 52:54:00:16:56:fd
            }
        }
			memory 2048
            uuid f7333ab9-8e3d-4a87-a27a-6d5d7d6e99ba
    }
 }
vyatta@vyatta# show interfaces vhost
 vhost dp0vhost0 {
        bridge-group {
                bridge br20
        }
        
 }
vyatta@vyatta# show interfaces bridge
 bridge br20