vinfra service compute server iface set
Update a network of a virtual machine:
usage: vinfra service compute server iface set [--fixed-ip <ip-address | ip-address= <ip-address>,subnet=<subnet> | ip-version=<ip-version>>] [--spoofing-protection-enable | --spoofing-protection-disable] [--security-group <security-group> | --no-security-groups] --server <server> <interface>
--fixed-ip <ip-address|ip-address=<ip-address>,subnet=<subnet>|ip-version=<ip-version>>
- Desired IP address and/or subnet. This option can be used multiple times.
--spoofing-protection-enable
- Enable spoofing protection for the network interface
--spoofing-protection-disable
- Disable spoofing protection for the network interface
--security-group <security-group>
- Security group ID or name. This option can be used multiple times.
--no-security-groups
- Do not set security groups
--server <server>
- Virtual machine ID or name
<interface>
- Network interface ID
Example:
# vinfra service compute server iface set --server myvm --no-security-groups \ 611abc06-7557-44c9-bbf8-31fef817e802 +---------------------+--------------------------------------+ | Field | Value | +---------------------+--------------------------------------+ | fixed_ips | - 192.168.128.100 | | | - 192.168.128.200 | | id | 611abc06-7557-44c9-bbf8-31fef817e802 | | mac_addr | fa:16:3e:a6:d4:32 | | network_id | 8774a1a4-f7a0-4729-be9b-d282751434c5 | | security_groups | [] | | spoofing_protection | True | +---------------------+--------------------------------------+
This command unassigns security groups from the network interface with the ID
611abc06-7557-44c9-bbf8-31fef817e802 attached to the virtual machine myvm
.