Class: VIF

Last published : Oct 01, 2026
A virtual network interface

Fields for class: VIF

Field Type Qualifier Description
allowed_operations vif_operations set RO/runtime list of the operations allowed in this state. This list is advisory only and the server state may have changed by the time this field is read by a client.
current_operations (string -> vif_operations) map RO/runtime links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task.
currently_attached bool RO/constructor is the device currently attached (erased on reboot)
device string RO/constructor order in which VIF backends are created by xapi. Guaranteed to be an unsigned decimal integer.
ipv4_addresses string set RO/runtime IPv4 addresses in CIDR format
ipv4_allowed string set RO/constructor A list of IPv4 addresses which can be used to filter traffic passing through this VIF
ipv4_configuration_mode vif_ipv4_configuration_mode RO/runtime Determines whether IPv4 addresses are configured on the VIF
ipv4_gateway string RO/runtime IPv4 gateway (the empty string means that no gateway is set)
ipv6_addresses string set RO/runtime IPv6 addresses in CIDR format
ipv6_allowed string set RO/constructor A list of IPv6 addresses which can be used to filter traffic passing through this VIF
ipv6_configuration_mode vif_ipv6_configuration_mode RO/runtime Determines whether IPv6 addresses are configured on the VIF
ipv6_gateway string RO/runtime IPv6 gateway (the empty string means that no gateway is set)
locking_mode vif_locking_mode RO/constructor current locking mode of the VIF
MAC string RO/constructor ethernet MAC address of virtual interface, as exposed to guest
MAC_autogenerated bool RO/runtime true if the MAC was autogenerated; false indicates it was set manually
metrics VIF_metrics ref RO/runtime Removed. metrics associated with this VIF
MTU int RO/constructor MTU in octets
network network ref RO/constructor virtual network to which this vif is connected
other_config (string -> string) map RW additional configuration
qos_algorithm_params (string -> string) map RW parameters for chosen QoS algorithm
qos_algorithm_type string RW QoS algorithm to use
qos_supported_algorithms string set RO/runtime supported QoS algorithms for this VIF
runtime_properties (string -> string) map RO/runtime Device runtime properties
status_code int RO/runtime error/success code associated with last attach-operation (erased on reboot)
status_detail string RO/runtime error/success information associated with last attach-operation status (erased on reboot)
uuid string RO/runtime Unique identifier/object reference
VM VM ref RO/constructor virtual machine to which this vif is connected

RPCs associated with class: VIF

RPC name: addipv4allowed

Overview:
Associates an IPv4 address with this VIF
Signature:
void add_ipv4_allowed (session ref session_ref, VIF ref self, string value)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self The VIF which the IP address will be associated with
string value The IP address which will be associated with the VIF
Minimum Role: pool-operator
Return Type: void

RPC name: addipv6allowed

Overview:
Associates an IPv6 address with this VIF
Signature:
void add_ipv6_allowed (session ref session_ref, VIF ref self, string value)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self The VIF which the IP address will be associated with
string value The IP address which will be associated with the VIF
Minimum Role: pool-operator
Return Type: void

RPC name: addtootherconfig

Overview:
Add the given keyvalue pair to the otherconfig field of the given VIF.
Signature:
void add_to_other_config (session ref session_ref, VIF ref self, string key, string value)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
string key Key to add
string value Value to add
Minimum Role: vm-admin
Return Type: void

RPC name: addtoqosalgorithmparams

Overview:
Add the given keyvalue pair to the qos/algorithmparams field of the given VIF.
Signature:
void add_to_qos_algorithm_params (session ref session_ref, VIF ref self, string key, string value)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
string key Key to add
string value Value to add
Minimum Role: vm-admin
Return Type: void

RPC name: configureipv4

Overview:
Configure IPv4 settings for this virtual interface
Signature:
void configure_ipv4 (session ref session_ref, VIF ref self, vif_ipv4_configuration_mode mode, string address, string gateway)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self The VIF to configure
vif_ipv4_configuration_mode mode Whether to use DHCP, static or no IPv4 assignment
string address The IPv4 address in <addr>/<prefix length> format (for static mode only)
string gateway The IPv4 gateway (for static mode only; leave empty to not set a gateway)
Minimum Role: vm-operator
Return Type: void

RPC name: configureipv6

Overview:
Configure IPv6 settings for this virtual interface
Signature:
void configure_ipv6 (session ref session_ref, VIF ref self, vif_ipv6_configuration_mode mode, string address, string gateway)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self The VIF to configure
vif_ipv6_configuration_mode mode Whether to use autoconf, static or no IPv6 assignment
string address The IPv6 address in <addr>/<prefix length> format (for static mode only)
string gateway The IPv6 gateway (for static mode only; leave empty to not set a gateway)
Minimum Role: vm-operator
Return Type: void

RPC name: create

Overview:
Create a new VIF instance, and return its handle.
Signature:
VIF ref create (session ref session_ref, VIF record args)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF record args All constructor arguments
Minimum Role: vm-admin
Return Type: VIF ref
reference to the newly created object

RPC name: destroy

Overview:
Destroy the specified VIF instance.
Signature:
void destroy (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: vm-admin
Return Type: void

RPC name: getall

Overview:
Return a list of all the VIFs known to the system.
Signature:
VIF ref set get_all (session ref session_ref)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
Minimum Role: read-only
Return Type: VIF ref set
references to all objects

RPC name: getallrecords

Overview:
Return a map of VIF references to VIF records for all VIFs known to the system.
Signature:
(VIF ref -> VIF record) map get_all_records (session ref session_ref)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
Minimum Role: read-only
Return Type: (VIF ref -> VIF record) map
records of all objects

RPC name: getallowedoperations

Overview:
Get the allowedoperations field of the given VIF.
Signature:
vif_operations set get_allowed_operations (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: vif_operations set
value of the field

RPC name: getbyuuid

Overview:
Get a reference to the VIF instance with the specified UUID.
Signature:
VIF ref get_by_uuid (session ref session_ref, string uuid)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
string uuid UUID of object to return
Minimum Role: read-only
Return Type: VIF ref
reference to the object

RPC name: getcurrentoperations

Overview:
Get the currentoperations field of the given VIF.
Signature:
(string -> vif_operations) map get_current_operations (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: (string -> vif_operations) map
value of the field

RPC name: getcurrentlyattached

Overview:
Get the currentlyattached field of the given VIF.
Signature:
bool get_currently_attached (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: bool
value of the field

RPC name: getdevice

Overview:
Get the device field of the given VIF.
Signature:
string get_device (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: string
value of the field

RPC name: getipv4addresses

Overview:
Get the ipv4addresses field of the given VIF.
Signature:
string set get_ipv4_addresses (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: string set
value of the field

RPC name: getipv4allowed

Overview:
Get the ipv4allowed field of the given VIF.
Signature:
string set get_ipv4_allowed (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: string set
value of the field

RPC name: getipv4configurationmode

Overview:
Get the ipv4configurationmode field of the given VIF.
Signature:
vif_ipv4_configuration_mode get_ipv4_configuration_mode (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: vif_ipv4_configuration_mode
value of the field

RPC name: getipv4gateway

Overview:
Get the ipv4gateway field of the given VIF.
Signature:
string get_ipv4_gateway (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: string
value of the field

RPC name: getipv6addresses

Overview:
Get the ipv6addresses field of the given VIF.
Signature:
string set get_ipv6_addresses (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: string set
value of the field

RPC name: getipv6allowed

Overview:
Get the ipv6allowed field of the given VIF.
Signature:
string set get_ipv6_allowed (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: string set
value of the field

RPC name: getipv6configurationmode

Overview:
Get the ipv6configurationmode field of the given VIF.
Signature:
vif_ipv6_configuration_mode get_ipv6_configuration_mode (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: vif_ipv6_configuration_mode
value of the field

RPC name: getipv6gateway

Overview:
Get the ipv6gateway field of the given VIF.
Signature:
string get_ipv6_gateway (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: string
value of the field

RPC name: getlockingmode

Overview:
Get the lockingmode field of the given VIF.
Signature:
vif_locking_mode get_locking_mode (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: vif_locking_mode
value of the field

RPC name: getMAC

Overview:
Get the MAC field of the given VIF.
Signature:
string get_MAC (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: string
value of the field

RPC name: getMACautogenerated

Overview:
Get the MACautogenerated field of the given VIF.
Signature:
bool get_MAC_autogenerated (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: bool
value of the field

RPC name: getmetrics

This message is removed.
Overview:
Get the metrics field of the given VIF.
Signature:
VIF_metrics ref get_metrics (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: VIF_metrics ref
value of the field

RPC name: getMTU

Overview:
Get the MTU field of the given VIF.
Signature:
int get_MTU (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: int
value of the field

RPC name: getnetwork

Overview:
Get the network field of the given VIF.
Signature:
network ref get_network (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: network ref
value of the field

RPC name: getotherconfig

Overview:
Get the otherconfig field of the given VIF.
Signature:
(string -> string) map get_other_config (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: (string -> string) map
value of the field

RPC name: getqosalgorithmparams

Overview:
Get the qos/algorithmparams field of the given VIF.
Signature:
(string -> string) map get_qos_algorithm_params (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: (string -> string) map
value of the field

RPC name: getqosalgorithmtype

Overview:
Get the qos/algorithmtype field of the given VIF.
Signature:
string get_qos_algorithm_type (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: string
value of the field

RPC name: getqossupportedalgorithms

Overview:
Get the qos/supportedalgorithms field of the given VIF.
Signature:
string set get_qos_supported_algorithms (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: string set
value of the field

RPC name: getrecord

Overview:
Get a record containing the current state of the given VIF.
Signature:
VIF record get_record (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: VIF record
all fields from the object

RPC name: getruntimeproperties

Overview:
Get the runtimeproperties field of the given VIF.
Signature:
(string -> string) map get_runtime_properties (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: (string -> string) map
value of the field

RPC name: getstatuscode

Overview:
Get the statuscode field of the given VIF.
Signature:
int get_status_code (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: int
value of the field

RPC name: getstatusdetail

Overview:
Get the statusdetail field of the given VIF.
Signature:
string get_status_detail (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: string
value of the field

RPC name: getuuid

Overview:
Get the uuid field of the given VIF.
Signature:
string get_uuid (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: string
value of the field

RPC name: getVM

Overview:
Get the VM field of the given VIF.
Signature:
VM ref get_VM (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
Minimum Role: read-only
Return Type: VM ref
value of the field

RPC name: move

Overview:
Move the specified VIF to the specified network, even while the VM is running
Signature:
void move (session ref session_ref, VIF ref self, network ref network)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self The VIF to move
network ref network The network to move it to
Minimum Role: vm-admin
Return Type: void

RPC name: plug

Overview:
Hotplug the specified VIF, dynamically attaching it to the running VM
Signature:
void plug (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self The VIF to hotplug
Minimum Role: vm-admin
Return Type: void

RPC name: removefromotherconfig

Overview:
Remove the given key and its corresponding value from the otherconfig field of the given VIF. If the key is not in that Map, then do nothing.
Signature:
void remove_from_other_config (session ref session_ref, VIF ref self, string key)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
string key Key to remove
Minimum Role: vm-admin
Return Type: void

RPC name: removefromqosalgorithmparams

Overview:
Remove the given key and its corresponding value from the qos/algorithmparams field of the given VIF. If the key is not in that Map, then do nothing.
Signature:
void remove_from_qos_algorithm_params (session ref session_ref, VIF ref self, string key)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
string key Key to remove
Minimum Role: vm-admin
Return Type: void

RPC name: removeipv4allowed

Overview:
Removes an IPv4 address from this VIF
Signature:
void remove_ipv4_allowed (session ref session_ref, VIF ref self, string value)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self The VIF from which the IP address will be removed
string value The IP address which will be removed from the VIF
Minimum Role: pool-operator
Return Type: void

RPC name: removeipv6allowed

Overview:
Removes an IPv6 address from this VIF
Signature:
void remove_ipv6_allowed (session ref session_ref, VIF ref self, string value)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self The VIF from which the IP address will be removed
string value The IP address which will be removed from the VIF
Minimum Role: pool-operator
Return Type: void

RPC name: setipv4allowed

Overview:
Set the IPv4 addresses to which traffic on this VIF can be restricted
Signature:
void set_ipv4_allowed (session ref session_ref, VIF ref self, string set value)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self The VIF which the IP addresses will be associated with
string set value The IP addresses which will be associated with the VIF
Minimum Role: pool-operator
Return Type: void

RPC name: setipv6allowed

Overview:
Set the IPv6 addresses to which traffic on this VIF can be restricted
Signature:
void set_ipv6_allowed (session ref session_ref, VIF ref self, string set value)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self The VIF which the IP addresses will be associated with
string set value The IP addresses which will be associated with the VIF
Minimum Role: pool-operator
Return Type: void

RPC name: setlockingmode

Overview:
Set the locking mode for this VIF
Signature:
void set_locking_mode (session ref session_ref, VIF ref self, vif_locking_mode value)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self The VIF whose locking mode will be set
vif_locking_mode value The new locking mode for the VIF
Minimum Role: pool-operator
Return Type: void

RPC name: setotherconfig

Overview:
Set the otherconfig field of the given VIF.
Signature:
void set_other_config (session ref session_ref, VIF ref self, (string -> string) map value)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
(string -> string) map value New value to set
Minimum Role: vm-admin
Return Type: void

RPC name: setqosalgorithmparams

Overview:
Set the qos/algorithmparams field of the given VIF.
Signature:
void set_qos_algorithm_params (session ref session_ref, VIF ref self, (string -> string) map value)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
(string -> string) map value New value to set
Minimum Role: vm-admin
Return Type: void

RPC name: setqosalgorithmtype

Overview:
Set the qos/algorithmtype field of the given VIF.
Signature:
void set_qos_algorithm_type (session ref session_ref, VIF ref self, string value)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self reference to the object
string value New value to set
Minimum Role: vm-admin
Return Type: void

RPC name: unplug

Overview:
Hotunplug the specified VIF, dynamically unattaching it from the running VM
Signature:
void unplug (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self The VIF to hot-unplug
Minimum Role: vm-admin
Return Type: void

RPC name: unplugforce

Overview:
Forcibly unplug the specified VIF
Signature:
void unplug_force (session ref session_ref, VIF ref self)
Arguments:
Type Name Description
session ref session_ref Reference to a valid session
VIF ref self The VIF to forcibly unplug
Minimum Role: vm-admin
Return Type: void