Jorge da Silva1709159479 Posted April 11, 2019 Share Posted April 11, 2019 Hi How can I change this command "xe vm-param-set platform:cores-per-socket=2 uuid=<VM UUID"> for all VMs in my environment? Thank you for your help Link to comment
Tobias Kreidl Posted April 11, 2019 Share Posted April 11, 2019 YOu'd need to script it by getting all the UUIDs of the VM and looping over them. Shoul dbe possible in just a few lines of a bash script, for instance. You can't use a wildcard, unfortunately. A little later on today, I could probably put one together for you pretty quickly -=Tobias Link to comment
Alan Lantz Posted April 11, 2019 Share Posted April 11, 2019 #!/bin/bash VMLIST=`xe vm-list | grep "uuid ( RO) " | awk '{print $5}'` for VM in $VMLIST do xe vm-param-set platform:cores-per-socket=2 uuid=$VM done --Alan-- Link to comment
Jorge da Silva1709159479 Posted April 12, 2019 Author Share Posted April 12, 2019 I get the error message "The uuid you supplied was invalid". What am I doing wrong? See photo Link to comment
Tobias Kreidl Posted April 12, 2019 Share Posted April 12, 2019 You could use "xe vm-list params=uuid" and see if that woks any better/differently. Link to comment
Jorge da Silva1709159479 Posted April 12, 2019 Author Share Posted April 12, 2019 It works, I hadn't executed the command as a script. Thank you Link to comment
Tobias Kreidl Posted April 12, 2019 Share Posted April 12, 2019 Yes you have to do the whole script so that the VM variable gets populated. TIMTOWTDI! -=Tobias Link to comment
Alan Lantz Posted April 12, 2019 Share Posted April 12, 2019 Awesome, not a bad script for a non-Linux guy like me ! --Alan-- Link to comment
Question
Jorge da Silva1709159479
Hi
How can I change this command "xe vm-param-set platform:cores-per-socket=2 uuid=<VM UUID"> for all VMs in my environment?
Thank you for your help
Link to comment
7 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.