
Hi All, Trying to add a nic to a vm with a specific mac address. [oVirt shell (connected)]# add nic --vm-identifier ov31 --network-name backend --name eth4 --mac-address HH:HH:EE:HH:HH:01 ======== ERROR ============================= status: 400 reason: Bad Request detail: MAC address must be in format "HH:HH:HH:HH:HH:HH" where H is a hexadecimal character (either a digit or A-F, case is insignificant). ============================================= Also interesting is when I change the beginning of the mac address to 00 instead of HH, I get : [oVirt shell (connected)]# add nic --vm-identifier ov31 --network-name backend --name eth4 --mac-address 01:HH:EE:HH:HH:01 ============================================ ERROR ========================================== wrong number of arguments, try 'help add' for help. ============================================================================================= I have tried some things like enclosing in single and double quotes but no success. I have also tried to read the help sections on the shell interface but I also could not figure it out. Thanks in advance,

Am 10.07.2014 16:07, schrieb Steve Kilduff:
Hi All,
Trying to add a nic to a vm with a specific mac address.
[oVirt shell (connected)]# add nic --vm-identifier ov31 --network-name backend --name eth4 --mac-address HH:HH:EE:HH:HH:01
afaik you just need to put "" around your mac, but I'm not 100% sure. I seem to have deleted the code where I stumbled across the same problem :( Adding Juan who should be able answer this. -- Mit freundlichen Grüßen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH & Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen

Excellent, thanks for the quick reply guys. [oVirt shell (connected)]# add nic --vm-identifier ov31 --network-name backend --name eth5 --mac-address '00:1a:4a:f3:43:be' id : 1d6f963c-3fee-48ac-88cd-963055666bb8 name : eth5 active : True interface : virtio linked : True mac-address : 00:1a:4a:f3:43:be network-id : 06b43265-4bfa-4a63-a9cc-3e5af9ad8493 plugged : True vm-id : 54d5deb2-0547-4a1e-8657-1fc8e1fe61e7 vnic_profile-id: 12b9a3fe-cad3-4ca8-8212-a936df966012 I am trying to automate 100 vm creations so... If anyone has a good guide that exists I would be very appreciative, otherwise I will keep tipping away :) On Thu, Jul 10, 2014 at 4:28 PM, Sven Kieske <S.Kieske@mittwald.de> wrote:
Am 10.07.2014 16:07, schrieb Steve Kilduff:
Hi All,
Trying to add a nic to a vm with a specific mac address.
[oVirt shell (connected)]# add nic --vm-identifier ov31 --network-name backend --name eth4 --mac-address HH:HH:EE:HH:HH:01
afaik you just need to put "" around your mac, but I'm not 100% sure. I seem to have deleted the code where I stumbled across the same problem :(
Adding Juan who should be able answer this.
-- Mit freundlichen Grüßen / Regards
Sven Kieske
Systemadministrator Mittwald CM Service GmbH & Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

On 07/10/2014 04:07 PM, Steve Kilduff wrote:
Hi All,
Trying to add a nic to a vm with a specific mac address.
[oVirt shell (connected)]# add nic --vm-identifier ov31 --network-name backend --name eth4 --mac-address HH:HH:EE:HH:HH:01
======== ERROR ============================= status: 400 reason: Bad Request detail: MAC address must be in format "HH:HH:HH:HH:HH:HH" where H is a hexadecimal character (either a digit or A-F, case is insignificant). =============================================
Also interesting is when I change the beginning of the mac address to 00 instead of HH, I get :
[oVirt shell (connected)]# add nic --vm-identifier ov31 --network-name backend --name eth4 --mac-address 01:HH:EE:HH:HH:01 ============================================ ERROR ========================================== wrong number of arguments, try 'help add' for help.
=============================================================================================
I have tried some things like enclosing in single and double quotes but no success.
I have also tried to read the help sections on the shell interface but I also could not figure it out.
Thanks in advance,
There are two issues here. One is that currently the CLI doesn't work correctly with parameters that start with a number, as the lexer splits it into a number and a word, and then it thinks that there are two parameters instead of one. We have a bug (a RHEV bug, it it affects oVirt as well) for that already: https://bugzilla.redhat.com/show_bug.cgi?id=1110366 You can workaround this using quotes, either simple or double. The other issue is that you are probably a *multicast* MAC address. That is what the server is actually checking, not just that it is syntactically correct. This basically means that the eight bit can't be 1, as that is what indicates multicast. Just make sure that you use a MAC address whose second character isn't an odd number. For example, this will fail: # add nic --vm-identifier ov31 --network-name backend --name eth4 --mac-address '01:01:01:01:01:01' But this will succeed: # add nic --vm-identifier ov31 --network-name backend --name eth4 --mac-address '00:01:01:01:01:01' The error message could be better. You may want to open a bug requesting an improvement. -- Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta 3ºD, 28016 Madrid, Spain Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.
participants (3)
-
Juan Hernandez
-
Steve Kilduff
-
Sven Kieske