Bug 1298232
Summary: | [RFE] Allow setting different Cloud-init/Sysprep setting for VMs in pools | |||
---|---|---|---|---|
Product: | [oVirt] ovirt-engine | Reporter: | Barak Korren <bkorren> | |
Component: | RFEs | Assignee: | Nobody <nobody> | |
Status: | CLOSED WONTFIX | QA Contact: | Nisim Simsolo <nsimsolo> | |
Severity: | low | Docs Contact: | ||
Priority: | medium | |||
Version: | 3.6.1.3 | CC: | bugs, masayag, mgoldboi, michal.skrivanek, mtessun, paul, rbarry, rik.theys, tjelinek | |
Target Milestone: | --- | Keywords: | FutureFeature | |
Target Release: | --- | Flags: | mtessun:
ovirt-4.3?
mtessun: planning_ack+ rule-engine: devel_ack? rule-engine: testing_ack? |
|
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Enhancement | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1612974 (view as bug list) | Environment: | ||
Last Closed: | 2019-01-03 12:49:34 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | Virt | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1612974 |
Description
Barak Korren
2016-01-13 14:54:12 UTC
didn't get to 4.1 We will look into it in the future. I did encounter same issue, any updates on this? Description: I would like to automatically set the hostname of a VM to be the same as the ovirt machine name seen in the portal. This can be done by creating a template and activating cloud-init in the initial run tab. A new VM named “test” based in this template is created and the hostname is “test”, works perfect! But when I create a pool (i.e. “testpool”) based on this template I get machines with names “testpool-1”, “testpool-2”, etc. but the machine name is not present in the metadata and cannot be set as hostname. This is probably due to the fact that the machine names are auto generated by the oVirt Pool. Is this expected/desired behavior for cloud-init from pools? If so, what would be the best way to retrieve the machine name (as seen in the portal) and manually set it to be hostname via cloud-init (i.e. runcmd – hostnamectl set-hostname $(hostname)) Created a workaround for making pool hostnames unique based on the last octet of ip-address from de DHCP after setting it to static. Not sure if it is safe/durable but seems to work enough for me and has at least some logic in the hostname. initscript: runcmd: - ip=$(ip route get 8.8.8.8 | awk '{print $NF;exit}') - nmcli con mod eth0 ipv4.addresses $ip"/24" ipv4.dns x.x.x.x ipv4.gateway x.x.x.x ipv4.method manual - hostnamectl set-hostname testpool-"${ip##*.}".example.com Hi, I'm running into the same problem. We would like to use cloud-init to set the hostname of the VM's which are created from a pool. There should be a way to specify variables (or ??) in the cloud-init hostname field so we can reference the VM name (or use the ?? as in the pool definition). Regards, Rik This will not be addressed in a reasonable timeframe. Please re-open if it's still important. |