Jump to content


Photo

vif-param-add

Started by Martins Jakubovics , 12 May 2014 - 08:48 AM
10 replies to this topic

Martins Jakubovics Members

Martins Jakubovics
  • 49 posts

Posted 12 May 2014 - 08:48 AM

Hello,

 

Looks like XenServer 6.2 documentation have mistake.

In a section 

 

4.4.10.8.7.

 

To restrict a VIF to an additional IP address:
 

xe vif-param-add uuid=<vif-uuid> ipv4-allowed=<comma separated list of ipv4-addresses>

 

This is not working:

 

 

~]# xe vif-param-add uuid=00bf209f-fa02-aa61-249b-326b61f34e3f ipv4-allowed=10.10.10.2
Required parameter not found: param-name
For usage run: 'xe help'

 

 

Sorry, if I posted this bug in a wrong section. I don't know where I should post such thing.



James Cannon Citrix Employees

James Cannon
  • 4,402 posts

Posted 13 May 2014 - 04:47 PM

Which document are you looking at? Admin Guide, VM Guide?

 

When typing in a command, such as "xe vif-param-add" kit the TAB key twice to see all options for command. Here are required fields for command:

param-key=   param-name=  uuid=
 
This is correct forum to post for your questions. :)


Martins Jakubovics Members

Martins Jakubovics
  • 49 posts

Posted 13 May 2014 - 06:36 PM

Hello James,

 

In admins guide: http://support.citrix.com/article/CTX137828

Page 61, section 4.4.10.8.7.



James Cannon Citrix Employees

James Cannon
  • 4,402 posts

Posted 13 May 2014 - 06:50 PM

Hi Martins,

 

I see issue you are having. The guide says to use param-set. You need to set values before you can add more.

 
I am logged in as root and have success by using the param-set and not param-add!
 
[root@xenserver-jamesc log]# xe vif-param-set uuid=e07aef91-f9da-f63d-3347-f399488be594 locking-mode=locked
[root@xenserver-jamesc log]# xe vif-param-set uuid=e07aef91-f9da-f63d-3347-f399488be594 ipv4-allowed=10.216.136.67 ipv6-allowed=fe80:0000:0000:0000:6942:5dbc:3c8c:e46f

 

To check, I run the vif-list params=all for the same UUID of VIF ...

 

[root@xenserver-jamesc log]# xe vif-list params=all uuid=e07aef91-f9da-f63d-3347-f399488be594
uuid ( RO)                        : e07aef91-f9da-f63d-3347-f399488be594
                     vm-uuid ( RO): 7641eb11-fc5c-383b-4f8e-2aa6682169fe
               vm-name-label ( RO): Windows 8 (64-bit)
          allowed-operations (SRO): attach
          current-operations (SRO):
                      device ( RO): 0
                         MAC ( RO): 5a:56:4d:81:43:03
           MAC-autogenerated ( RO): true
                         MTU ( RO): 1500
          currently-attached ( RO): false
          qos_algorithm_type ( RW):
        qos_algorithm_params (MRW):
    qos_supported_algorithms (SRO):
                other-config (MRW):
                network-uuid ( RO): 8845dced-9567-5017-8642-b87a4a1431ee
          network-name-label ( RO): Bond 0+1
                 io_read_kbs ( RO): <expensive field>
                io_write_kbs ( RO): <expensive field>
                locking-mode ( RW): locked
                ipv4-allowed (SRW): 10.216.136.67
                ipv6-allowed (SRW): fe80:0000:0000:0000:6942:5dbc:3c8c:e46f
 

 

So, for the add, I can use that to provide additional IP addresses as needed. 
 
[root@xenserver-jamesc log]# xe vif-param-[TAB][TAB]
vif-param-add      vif-param-clear    vif-param-get      vif-param-list     vif-param-remove   vif-param-set

 

The above are the options for vif-param when you hit [TAB] key twice.



James Cannon Citrix Employees

James Cannon
  • 4,402 posts

Posted 13 May 2014 - 07:15 PM

Here is syntax for add (once you already have set it):

 

xe vif-param-add param-name=ipv4-allowed param-key=<Additional new IP address>



Martins Jakubovics Members

Martins Jakubovics
  • 49 posts

Posted 13 May 2014 - 07:17 PM

I know, I use vif-param-set in my environment, but as you see forward, if I want to add another IP to allowed list, command vif-param-add is not working as it is described. :) I just wanted to report that. :)



James Cannon Citrix Employees

James Cannon
  • 4,402 posts

Posted 13 May 2014 - 07:59 PM

I had no issue using command ...

 

[root@xenserver-jamesc ~]# xe vif-param-add uuid=e07aef91-f9da-f63d-3347-f399488be594 param-name=ipv4-allowed param-key=10.216.136.68
[root@xenserver-jamesc ~]# xe vif-list params=all uuid=e07aef91-f9da-f63d-3347-f399488be594                                                 uuid ( RO)                        : e07aef91-f9da-f63d-3347-f399488be594
                     vm-uuid ( RO): 7641eb11-fc5c-383b-4f8e-2aa6682169fe
               vm-name-label ( RO): Windows 8 (64-bit)
          allowed-operations (SRO): attach
          current-operations (SRO):
                      device ( RO): 0
                         MAC ( RO): 5a:56:4d:81:43:03
           MAC-autogenerated ( RO): true
                         MTU ( RO): 1500
          currently-attached ( RO): false
          qos_algorithm_type ( RW):
        qos_algorithm_params (MRW):
    qos_supported_algorithms (SRO):
                other-config (MRW):
                network-uuid ( RO): 8845dced-9567-5017-8642-b87a4a1431ee
          network-name-label ( RO): Bond 0+1
                 io_read_kbs ( RO): <expensive field>
                io_write_kbs ( RO): <expensive field>
                locking-mode ( RW): locked
                ipv4-allowed (SRW): 10.216.136.68; 10.216.136.67
                ipv6-allowed (SRW): fe80:0000:0000:0000:6942:5dbc:3c8c:e46f
 

As noted, you do need to use param-set first, in order to add an addtional key to the param field.



Martins Jakubovics Members

Martins Jakubovics
  • 49 posts

Posted 13 May 2014 - 08:09 PM

Hmm, maybe I am reading another documentation, but in this is wrote:

 

To restrict a VIF to an additional IP address
After performing the previous procedure to restrict a VIF to using a specific IP address, you can add one or more
IP addresses the VIF can use.
• Run the vif-param-add command to add the IP addresses to the existing list. Do one or more of the following:
• Specify the IPv4 IP address. For example:
xe vif-param-add uuid=<vif-uuid> ipv4-allowed=<comma separated list of ipv4-addresses> 
• Specify the IPv6 IP address. For example:62
xe vif-param-add uuid=<vif-uuid> ipv6-allowed=<comma separated list of ipv6-addresses>


James Cannon Citrix Employees

James Cannon
  • 4,402 posts

Posted 13 May 2014 - 08:25 PM

It would be good to put feedback for document to ensure it is more clear.

 

"To restrict a VIF to an additional IP address
After performing the previous procedure to restrict a VIF to using a specific IP address, you can add one or more
IP addresses the VIF can use.
• Run the vif-param-add command to add the IP addresses to the existing list. Do one or more of the following:"


Martins Jakubovics Members
  • #10

Martins Jakubovics
  • 49 posts

Posted 14 May 2014 - 04:53 AM

James, I am talking about command:

 

In documentation:

xe vif-param-add uuid=<vif-uuid> ipv4-allowed=<comma separated list of ipv4-addresses> 

 

In your example:

xe vif-param-add uuid=<vif-uuid> param-name=ipv4-allowed param-key=<comma separated list of ipv4-addresses>

 

Didn't you see any difference?

 

I know, we can put tab's and see command options, but this is official documentation, I think it should be precise.



James Cannon Citrix Employees
  • #11

James Cannon
  • 4,402 posts

Posted 14 May 2014 - 05:11 PM

I see your point. I guess a lot depends on what one considers to be needed. Once could list all options or just high-light the key ones. In any case, if there is an issue with a web page, you should always use the Provide Feedback option.

 

The forums are not monitored by Citrix and any participation by Citrix employees is completely voluntary.