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.

Upgrading multiple guest images for a guest

You can upgrade multiple disks for a guest with one command. Any existing images that conflict with the new images are overwritten during an upgrade. Any images that were previously used by the disks being upgraded are deleted after an upgrade is successful, if they are not overwritten during the upgrade.

The example that follows uses a guest called another-guest with the following key parameters for the XML file:
  • Number of CPUs: 2
  • Number of virtual disks: 2
  • Type of disk defined for disk 0: disk
  • Type of disk defined for disk 1: cdrom
  • Memory: 2048 MB
  • vhost interface: dp0vhost0 and dp0vhost1

We can upgrade the images for both disk 0 and disk 1 with a single command. The old images are overwritten.

Table 1. Upgrading multiple guest images for a guest
Step Command

Switch to configuration mode.

vyatta@vyatta:~$ config
Display the details of the guest parameters.
vyatta@vyatta# show virtualization 
 virtualization {
        guest another-guest {
                cpus 2
                devices {
                        disk 0 {
                                boot-order 1
                                device-type disk
                                source {
                                        file /var/lib/libvirt/images/another-guest/0-new-disk.qcow2
                                }
                        }
                        disk 1 {
                                boot-order 2
                                bus-type ide
                                device-type cdrom
                                source {
                                        file /var/lib/libvirt/images/another-guest/1-config.iso
                                }
                        }
                        display {
                                connection-type vnc
                                password "********"
                                port 5900
                        }
                        network dp0vhost0 {
                                mac-address 52:54:00:3f:9a:c4
                        }
                        network dp0vhost1 {
                                mac-address 52:54:00:08:0d:ad
                        }
                }
                memory 2048
                uuid 20b03fea-93b6-454c-b9fd-678dd27aeafa
        }
 }
Exit the configuration mode.
vyatta@vyatta# exit
logout
Upgrade the guest with new guest images for disk 0 and disk 1.
vyatta@vyatta:~$ upgrade virtualization guest another-guest images device 0 source location /home/vyatta/newer-disk.qcow2 device 1 source location /home/vyatta/newer-config.iso
[INFO] - Disk 0 configured with source "/var/lib/libvirt/images/another-guest/0-newer-disk.qcow2"
[INFO] - Disk 1 configured with source "/var/lib/libvirt/images/another-guest/1-newer-config.iso"
[INFO] - Powering off existing guest "another-guest"
[INFO] - Starting guest "another-guest"
[INFO] - Configuration saved
[INFO] - Deleted old image "/var/lib/libvirt/images/another-guest/0-new-disk.qcow2"
[INFO] - Deleted old image "/var/lib/libvirt/images/another-guest/1-config.iso"
[INFO] - Disk image upgrade complete
Switch to the configuration mode.
vyatta@vyatta:~$ config
Display the new parameters of the guest.
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-newer-disk.qcow2
                                }
                        }
                        disk 1 {
                                boot-order 2
                                bus-type ide
                                device-type cdrom
                                source {
                                        file /var/lib/libvirt/images/another-guest/1-newer-config.iso
                                }
                        }
                        display {
                                connection-type vnc
                                password "********"
                                port 5900
                        }
                        network dp0vhost0 {
                                mac-address 52:54:00:3f:9a:c4
                        }
                        network dp0vhost1 {
                                mac-address 52:54:00:08:0d:ad
                        }
                }
                memory 2048
                uuid 20b03fea-93b6-454c-b9fd-678dd27aeafa
        }
 }