disable instance NIC

20 views
Skip to first unread message

bamblew...@gmail.com

unread,
Mar 3, 2025, 1:55:58 PMMar 3
to ganeti
Dear Ganeti experts,

I am trying to disable an instance network interface, so I don't cause an IP address conflict when starting a cloned instance (restored with a new name using gnt-backp import.)

To verify the ID of the instance NIC, I do:

[root@quinoa-a ~]# gnt-instance info foremantest1a | grep -A 9 'NICs:'
  NICs:
    - nic/0:
      MAC: aa:00:00:65:57:6f
      IP: None
      mode: bridged
      link: br0
      vlan:
      network: None
      UUID: 1011bc8a-61c5-46fc-9e66-7c640cc86e92
      name: None


Then, I try disabling the NIC with this:

[root@quinoa-a ~]# gnt-instance modify --net 0:modify,link=down foremantest1a
Failure: prerequisites not met for this operation:
error type: environment_error, error details:
Error checking bridges on node 'quinoa-a.intranet.psfc.coop': Missing bridges down

Not getting the syntax correct, I try removing the NIC instead, with this:

[root@quinoa-a ~]# gnt-instance modify --net 0:remove foremantest1a
Failure: prerequisites not met for this operation:
error type: wrong_input, error details:
Instance allocation to group {'name': 'default', 'ndparams': {}, 'diskparams': {}, 'ipolicy': {}, 'serial_no': 1, 'alloc_policy': 'preferred', 'networks': {}, 'ctime': 0, 'mtime': 1708450693.446535, 'uuid': '0697c830-e36d-4299-aecb-8e8efa4a6de1', 'tags': []} (default) violates policy: nic-count value 0 is not in range [1, 8]

...which is also unsuccessful.

Does anyone know the correct syntax for disabling or removing an instance NIC?

SYSTEM INFO
OS: Rocky 8.10
Ganeti 3.0.2
Hypervisor: KVM 6.2.0
Disk repl: DRBD 8.4.10

Many thanks.


Rudolph Bott

unread,
Mar 10, 2025, 11:30:42 AMMar 10
to gan...@googlegroups.com
Hi,


Am Mo., 3. März 2025 um 19:56 Uhr schrieb bamblew...@gmail.com <bamblew...@gmail.com>:

Instance allocation to group {'name': 'default', 'ndparams': {}, 'diskparams': {}, 'ipolicy': {}, 'serial_no': 1, 'alloc_policy': 'preferred', 'networks': {}, 'ctime': 0, 'mtime': 1708450693.446535, 'uuid': '0697c830-e36d-4299-aecb-8e8efa4a6de1', 'tags': []} (default) violates policy: nic-count value 0 is not in range [1, 8]

Each Ganeti cluster has a so called ipolicy. This sets minimum and maximum values for various parameters (number of disks, nics; vCPU count, memory etc.). Your cluster has a minimum of one NIC configured (and a maximum of eight), so it does not allow you to have zero NICs in your instances :-)

You can modify the ipolicy using "gnt-cluster modify". Please check "man gnt-cluster"  [1] for the relevant parameters.

Hope that helps!


 
--
 Rudolph Bott - bo...@sipgate.de

 sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf
 HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois
 Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391

bamblew...@gmail.com

unread,
Mar 14, 2025, 2:54:31 PMMar 14
to ganeti
Rudi,

Thanks for the tip. I was able to find another simple workaround: bind the instance NIC to a different network on the cluster. In the "gnt-backup import" command, I used the option "--net 0:link=br1". "br0" is the default network for all instances, so this effectively made the cloned instance unreachable until I could VNC in and change the network settings. Then I did "gnt-instance modify --net 0:link=br0 <instance-name>" to get back to normal connectivity.

Thanks again!
Reply all
Reply to author
Forward
0 new messages