Class: VIF A virtual network interface
Published in: XenServer 4.0 (rio) A virtual network interface
Enums vif_operations
Values: attach Attempting to attach this VIF to a VM plug Attempting to hotplug this VIF unplug Attempting to hot unplug this VIF
vif_locking_mode
Values: network_default No specific configuration set - default network policy applies locked Only traffic to a specific MAC and a list of IPv4 or IPv6 addresses is permitted unlocked All traffic is permitted disabled No traffic is permitted
vif_ipv4_configuration_mode
Values: None Follow the default IPv4 configuration of the guest (this is guest-dependent) Static Static IPv4 address configuration
vif_ipv6_configuration_mode
Values: None Follow the default IPv6 configuration of the guest (this is guest-dependent) Static Static IPv6 address configuration
Fields
enum vif_operations set
allowed_operations
[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.
Default value: {} Published in: XenServer 4.0 (rio) 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.
(string → enum vif_operations) map
current_operations
[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.
Default value: {} Published in: XenServer 4.0 (rio) links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task.
bool
currently_attached
[RO/constructor]
is the device currently attached (erased on reboot)
Default value: false Published in: XenServer 4.0 (rio) Changed in: XAPI 1.257.0 (1.257.0) Made StaticRO to allow plugged VIF and VBD creation for Suspended VM
string
device
[RO/constructor]
order in which VIF backends are created by xapi
Published in: XenServer 4.0 (rio) order in which VIF backends are created by xapi
string set
ipv4_addresses
[RO/runtime]
IPv4 addresses in CIDR format
Default value: {} Published in: XenServer 7.0 (dundee) IPv4 addresses in CIDR format
string set
ipv4_allowed
[RO/constructor]
A list of IPv4 addresses which can be used to filter traffic passing through this VIF
Default value: {} Published in: XenServer 6.1 (tampa) A list of IPv4 addresses which can be used to filter traffic passing through this VIF
enum vif_ipv4_configuration_mode
ipv4_configuration_mode
[RO/runtime]
Determines whether IPv4 addresses are configured on the VIF
Default value: None Published in: XenServer 7.0 (dundee) Determines whether IPv4 addresses are configured on the VIF
string
ipv4_gateway
[RO/runtime]
IPv4 gateway (the empty string means that no gateway is set)
Default value: "" Published in: XenServer 7.0 (dundee) IPv4 gateway (the empty string means that no gateway is set)
string set
ipv6_addresses
[RO/runtime]
IPv6 addresses in CIDR format
Default value: {} Published in: XenServer 7.0 (dundee) IPv6 addresses in CIDR format
string set
ipv6_allowed
[RO/constructor]
A list of IPv6 addresses which can be used to filter traffic passing through this VIF
Default value: {} Published in: XenServer 6.1 (tampa) A list of IPv6 addresses which can be used to filter traffic passing through this VIF
enum vif_ipv6_configuration_mode
ipv6_configuration_mode
[RO/runtime]
Determines whether IPv6 addresses are configured on the VIF
Default value: None Published in: XenServer 7.0 (dundee) Determines whether IPv6 addresses are configured on the VIF
string
ipv6_gateway
[RO/runtime]
IPv6 gateway (the empty string means that no gateway is set)
Default value: "" Published in: XenServer 7.0 (dundee) IPv6 gateway (the empty string means that no gateway is set)
enum vif_locking_mode
locking_mode
[RO/constructor]
current locking mode of the VIF
Default value: network_default Published in: XenServer 6.1 (tampa) current locking mode of the VIF
string
MAC
[RO/constructor]
ethernet MAC address of virtual interface, as exposed to guest
Published in: XenServer 4.0 (rio) ethernet MAC address of virtual interface, as exposed to guest
bool
MAC_autogenerated
[RO/runtime]
true if the MAC was autogenerated; false indicates it was set manually
Default value: false Published in: XenServer 5.5 (george) true if the MAC was autogenerated; false indicates it was set manually
Removed
VIF_metrics ref
metrics
[RO/runtime]
metrics associated with this VIF
Default value: OpaqueRef:NULL Published in: XenServer 4.0 (rio) Deprecated in: XenServer 6.1 (tampa) Dummy transition Removed in: XenServer 6.1 (tampa) Disabled in favour of RRDs
int
MTU
[RO/constructor]
MTU in octets
Published in: XenServer 4.0 (rio) MTU in octets
network ref
network
[RO/constructor]
virtual network to which this vif is connected
Published in: XenServer 4.0 (rio) virtual network to which this vif is connected
(string → string) map
other_config
[RW]
additional configuration
Published in: XenServer 4.0 (rio) additional configuration
(string → string) map
qos_algorithm_params
[RW]
parameters for chosen QoS algorithm
Published in: XenServer 4.0 (rio) parameters for chosen QoS algorithm
string
qos_algorithm_type
[RW]
QoS algorithm to use
Published in: XenServer 4.0 (rio) QoS algorithm to use
string set
qos_supported_algorithms
[RO/runtime]
supported QoS algorithms for this VIF
Published in: XenServer 4.0 (rio) supported QoS algorithms for this VIF
(string → string) map
runtime_properties
[RO/runtime]
Device runtime properties
Published in: XenServer 4.0 (rio) Device runtime properties
int
status_code
[RO/runtime]
error/success code associated with last attach-operation (erased on reboot)
Published in: XenServer 4.0 (rio) error/success code associated with last attach-operation (erased on reboot)
string
status_detail
[RO/runtime]
error/success information associated with last attach-operation status (erased on reboot)
Published in: XenServer 4.0 (rio) error/success information associated with last attach-operation status (erased on reboot)
string
uuid
[RO/runtime]
Unique identifier/object reference
Published in: XenServer 4.0 (rio) Unique identifier/object reference
VM ref
VM
[RO/constructor]
virtual machine to which this vif is connected
Published in: XenServer 4.0 (rio) virtual machine to which this vif is connected
Messages
Hide implicit
void
add_ipv4_allowed
(session ref, VIF ref, string)
Associates an IPv4 address with this VIF
Parameters: session ref session_id 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 Published in: XenServer 6.1 (tampa) Associates an IPv4 address with this VIF
void
add_ipv6_allowed
(session ref, VIF ref, string)
Associates an IPv6 address with this VIF
Parameters: session ref session_id 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 Published in: XenServer 6.1 (tampa) Associates an IPv6 address with this VIF
void
add_to_other_config
(session ref, VIF ref, string, string)
Add the given key-value pair to the other_config field of the given VIF.
Parameters: session ref session_id 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 Published in: XenServer 4.0 (rio) additional configuration
void
add_to_qos_algorithm_params
(session ref, VIF ref, string, string)
Add the given key-value pair to the qos/algorithm_params field of the given VIF.
Parameters: session ref session_id 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 Published in: XenServer 4.0 (rio) parameters for chosen QoS algorithm
void
configure_ipv4
(session ref, VIF ref, enum vif_ipv4_configuration_mode, string, string)
void
configure_ipv6
(session ref, VIF ref, enum vif_ipv6_configuration_mode, string, string)
VIF ref
create
(session ref, VIF record)
Create a new VIF instance, and return its handle.
The constructor args are: device*, network*, VM*, MAC*, MTU*, other_config*, currently_attached, qos_algorithm_type*, qos_algorithm_params*, locking_mode, ipv4_allowed, ipv6_allowed (* = non-optional).
Parameters: session ref session_id Reference to a valid session VIF record args All constructor arguments Minimum role: vm-admin Result: reference to the newly created object Published in: XenServer 4.0 (rio) A virtual network interface
void
destroy
(session ref, VIF ref)
Destroy the specified VIF instance.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: vm-admin Published in: XenServer 4.0 (rio) A virtual network interface
VIF ref set
get_all
(session ref)
Return a list of all the VIFs known to the system.
Parameters: session ref session_id Reference to a valid session Minimum role: read-only Result: references to all objects Published in: XenServer 4.0 (rio) A virtual network interface
(VIF ref → VIF record) map
get_all_records
(session ref)
Return a map of VIF references to VIF records for all VIFs known to the system.
Parameters: session ref session_id Reference to a valid session Minimum role: read-only Result: records of all objects Published in: XenServer 4.0 (rio) A virtual network interface
enum vif_operations set
get_allowed_operations
(session ref, VIF ref)
Get the allowed_operations field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) 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.
VIF ref
get_by_uuid
(session ref, string)
Get a reference to the VIF instance with the specified UUID.
Parameters: session ref session_id Reference to a valid session string uuid UUID of object to return Minimum role: read-only Result: reference to the object Published in: XenServer 4.0 (rio) A virtual network interface
(string → enum vif_operations) map
get_current_operations
(session ref, VIF ref)
Get the current_operations field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task.
bool
get_currently_attached
(session ref, VIF ref)
Get the currently_attached field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) Changed in: XAPI 1.257.0 (1.257.0) Made StaticRO to allow plugged VIF and VBD creation for Suspended VM
string
get_device
(session ref, VIF ref)
Get the device field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) order in which VIF backends are created by xapi
string set
get_ipv4_addresses
(session ref, VIF ref)
Get the ipv4_addresses field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 7.0 (dundee) IPv4 addresses in CIDR format
string set
get_ipv4_allowed
(session ref, VIF ref)
Get the ipv4_allowed field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 6.1 (tampa) A list of IPv4 addresses which can be used to filter traffic passing through this VIF
enum vif_ipv4_configuration_mode
get_ipv4_configuration_mode
(session ref, VIF ref)
Get the ipv4_configuration_mode field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 7.0 (dundee) Determines whether IPv4 addresses are configured on the VIF
string
get_ipv4_gateway
(session ref, VIF ref)
Get the ipv4_gateway field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 7.0 (dundee) IPv4 gateway (the empty string means that no gateway is set)
string set
get_ipv6_addresses
(session ref, VIF ref)
Get the ipv6_addresses field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 7.0 (dundee) IPv6 addresses in CIDR format
string set
get_ipv6_allowed
(session ref, VIF ref)
Get the ipv6_allowed field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 6.1 (tampa) A list of IPv6 addresses which can be used to filter traffic passing through this VIF
enum vif_ipv6_configuration_mode
get_ipv6_configuration_mode
(session ref, VIF ref)
Get the ipv6_configuration_mode field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 7.0 (dundee) Determines whether IPv6 addresses are configured on the VIF
string
get_ipv6_gateway
(session ref, VIF ref)
Get the ipv6_gateway field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 7.0 (dundee) IPv6 gateway (the empty string means that no gateway is set)
enum vif_locking_mode
get_locking_mode
(session ref, VIF ref)
Get the locking_mode field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 6.1 (tampa) current locking mode of the VIF
string
get_MAC
(session ref, VIF ref)
Get the MAC field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) ethernet MAC address of virtual interface, as exposed to guest
bool
get_MAC_autogenerated
(session ref, VIF ref)
Get the MAC_autogenerated field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 5.5 (george) true if the MAC was autogenerated; false indicates it was set manually
Removed
VIF_metrics ref
get_metrics
(session ref, VIF ref)
Get the metrics field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) Deprecated in: XenServer 6.1 (tampa) Dummy transition Removed in: XenServer 6.1 (tampa) Disabled in favour of RRDs
int
get_MTU
(session ref, VIF ref)
Get the MTU field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) MTU in octets
network ref
get_network
(session ref, VIF ref)
Get the network field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) virtual network to which this vif is connected
(string → string) map
get_other_config
(session ref, VIF ref)
Get the other_config field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) additional configuration
(string → string) map
get_qos_algorithm_params
(session ref, VIF ref)
Get the qos/algorithm_params field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) parameters for chosen QoS algorithm
string
get_qos_algorithm_type
(session ref, VIF ref)
Get the qos/algorithm_type field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) QoS algorithm to use
string set
get_qos_supported_algorithms
(session ref, VIF ref)
Get the qos/supported_algorithms field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) supported QoS algorithms for this VIF
VIF record
get_record
(session ref, VIF ref)
Get a record containing the current state of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: all fields from the object Published in: XenServer 4.0 (rio) A virtual network interface
(string → string) map
get_runtime_properties
(session ref, VIF ref)
Get the runtime_properties field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) Device runtime properties
int
get_status_code
(session ref, VIF ref)
Get the status_code field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) error/success code associated with last attach-operation (erased on reboot)
string
get_status_detail
(session ref, VIF ref)
Get the status_detail field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) error/success information associated with last attach-operation status (erased on reboot)
string
get_uuid
(session ref, VIF ref)
Get the uuid field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) Unique identifier/object reference
VM ref
get_VM
(session ref, VIF ref)
Get the VM field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object Minimum role: read-only Result: value of the field Published in: XenServer 4.0 (rio) virtual machine to which this vif is connected
void
move
(session ref, VIF ref, network ref)
Move the specified VIF to the specified network, even while the VM is running
Parameters: session ref session_id 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 Published in: XenServer 7.1 (ely) Move the specified VIF to the specified network, even while the VM is running
void
plug
(session ref, VIF ref)
Hotplug the specified VIF, dynamically attaching it to the running VM
Parameters: session ref session_id Reference to a valid session VIF ref self The VIF to hotplug Minimum role: vm-admin Published in: XenServer 4.0 (rio) Hotplug the specified VIF, dynamically attaching it to the running VM
void
remove_from_other_config
(session ref, VIF ref, string)
Remove the given key and its corresponding value from the other_config field of the given VIF. If the key is not in that Map, then do nothing.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object string key Key to remove Minimum role: vm-admin Published in: XenServer 4.0 (rio) additional configuration
void
remove_from_qos_algorithm_params
(session ref, VIF ref, string)
Remove the given key and its corresponding value from the qos/algorithm_params field of the given VIF. If the key is not in that Map, then do nothing.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object string key Key to remove Minimum role: vm-admin Published in: XenServer 4.0 (rio) parameters for chosen QoS algorithm
void
remove_ipv4_allowed
(session ref, VIF ref, string)
Removes an IPv4 address from this VIF
Parameters: session ref session_id 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 Published in: XenServer 6.1 (tampa) Removes an IPv4 address from this VIF
void
remove_ipv6_allowed
(session ref, VIF ref, string)
Removes an IPv6 address from this VIF
Parameters: session ref session_id 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 Published in: XenServer 6.1 (tampa) Removes an IPv6 address from this VIF
void
set_ipv4_allowed
(session ref, VIF ref, string set)
Set the IPv4 addresses to which traffic on this VIF can be restricted
Parameters: session ref session_id 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 Published in: XenServer 6.1 (tampa) Set the IPv4 addresses to which traffic on this VIF can be restricted
void
set_ipv6_allowed
(session ref, VIF ref, string set)
Set the IPv6 addresses to which traffic on this VIF can be restricted
Parameters: session ref session_id 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 Published in: XenServer 6.1 (tampa) Set the IPv6 addresses to which traffic on this VIF can be restricted
void
set_locking_mode
(session ref, VIF ref, enum vif_locking_mode)
Set the locking mode for this VIF
Parameters: session ref session_id Reference to a valid session VIF ref self The VIF whose locking mode will be set enum vif_locking_mode value The new locking mode for the VIF Minimum role: pool-operator Published in: XenServer 6.1 (tampa) Set the locking mode for this VIF
void
set_other_config
(session ref, VIF ref, (string → string) map)
Set the other_config field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object (string → string) map value New value to set Minimum role: vm-admin Published in: XenServer 4.0 (rio) additional configuration
void
set_qos_algorithm_params
(session ref, VIF ref, (string → string) map)
Set the qos/algorithm_params field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object (string → string) map value New value to set Minimum role: vm-admin Published in: XenServer 4.0 (rio) parameters for chosen QoS algorithm
void
set_qos_algorithm_type
(session ref, VIF ref, string)
Set the qos/algorithm_type field of the given VIF.
Parameters: session ref session_id Reference to a valid session VIF ref self reference to the object string value New value to set Minimum role: vm-admin Published in: XenServer 4.0 (rio) QoS algorithm to use
void
unplug
(session ref, VIF ref)
Hot-unplug the specified VIF, dynamically unattaching it from the running VM
Parameters: session ref session_id Reference to a valid session VIF ref self The VIF to hot-unplug Minimum role: vm-admin Published in: XenServer 4.0 (rio) Hot-unplug the specified VIF, dynamically unattaching it from the running VM
void
unplug_force
(session ref, VIF ref)
Forcibly unplug the specified VIF
Parameters: session ref session_id Reference to a valid session VIF ref self The VIF to forcibly unplug Minimum role: vm-admin Published in: XenServer 6.0 (boston) Forcibly unplug the specified VIF