My Oracle Support Banner

OCI KVM: Error Using oci-kvm create-network Command (Doc ID 2664769.1)

Last updated on MAY 22, 2020

Applies to:

Oracle Cloud Infrastructure - Version N/A and later
Linux x86-64 on Oracle Public Cloud

Symptoms

Using OCI KVM instance version 1.5.

When trying to run the following command as per the man page for oci-kvm the command fails:

# oci-kvm create-network --network-name=<NETWORK_NAME> --net=<IP_ADDRESS> --vcn-cidr <NETWORK>/<NETMASK> --ip-bridge=<IP_BRIDGE> --ip-start=<START_IP> --ip-end=<END_IP> --ip-prefix=<NETWORK_PREFIX>
oci-kvm: error: unrecognized arguments: --vcn-cidr <NETWORK>/<NETMASK>

If the argument --vcn-cidr is removed, the command runs but then gives the following error:

Job for kvm_net_wpkvm.service failed because the control process exited with error code. See "systemctl status kvm_net_wpkvm.service" and "journalctl -xe" for details

The details from systemctl are as follows:

# systemctl -l status kvm_net_wpkvm.service
● kvm_net_wpkvm.service - KVM network
Loaded: loaded (/etc/systemd/system/kvm_net_wpkvm.service; static; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2020-03-26 14:32:46 GMT; 1min 21s ago
Process: 102400 ExecStart=/usr/libexec/oci-kvm-network-script start (code=exited, status=1/FAILURE)
Main PID: 102400 (code=exited, status=1/FAILURE)
Mar 26 14:32:46  systemd[1]: Starting KVM network...
Mar 26 14:32:46  oci-kvm-network-script[102400]: Adding default route to <NETWORK_GATEWAY>
Mar 26 14:32:46  oci-kvm-network-script[102400]: Error: Nexthop has invalid gateway.
Mar 26 14:32:46  oci-kvm-network-script[102400]: Cannot add route : default <NETWORK_GATEWAY> via dev enp59sxxxx table enp59sxxxx
Mar 26 14:32:46  systemd[1]: kvm_net_wpkvm.service: main process exited, code=exited, status=1/FAILURE
Mar 26 14:32:46  systemd[1]: Failed to start KVM network.
Mar 26 14:32:46  systemd[1]: Unit kvm_net_wpkvm.service entered failed state.
Mar 26 14:32:46  systemd[1]: kvm_net_wpkvm.service failed.

Changes

Instance created from KVM image version 1.5. System updated via yum and restarted. Issue reproducible.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.