[ovirt-users] Re: cloud-init: reverts on reboot

2020-06-23 Thread Jp
Florian

>cat /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
>network: {config: disabled}

That ^ worked for my cloud-init'd VMs after reboot.

ty!

Jp
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/BPIM7UDRXW7MX7TY6VA2AF2GVX4ON27H/


[ovirt-users] Re: cloud-init: reverts on reboot

2020-06-23 Thread Jp
>While, on run-once, it will use the configuration again

Ty for the clarification
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/HZFHVEJ36OYBVJ52G24WFDGBQFNRGNM2/


[ovirt-users] Re: cloud-init: reverts on reboot

2020-06-18 Thread Liran Rotenberg
On Fri, Jun 12, 2020 at 9:23 AM Florian Schmid via Users 
wrote:

> Hi,
>
> we are using cloud-init for several years now and it looks like, that
> cloud-init needs a config for every boot, otherwise, it will use the
> default network config, which is DHCP.
>
> We come around this issue by adding this file:
> cat /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
> network: {config: disabled}
>
> by cloud-init itself on the first run.
>
> With this, cloud-init creates only once the network config and never
> touches it again.
> I would not completely disable cloud-init, because this could also have
> some drawbacks, like not being able to create a root/user password anymore,
> if on worst case, ssh is not working anymore...
>
> What we also fix on the first boot is the datasource_list
> -> datasource_list: ["NoCloud", "ConfigDrive"]
>
> Otherwise, we have an extremely long boot process (up to 5 minutes or so),
> because cloud-init tries to reach several cloud-config URLs.
>
> BR Florian
>
> - Ursprüngliche Mail -----
> Von: "Jp" 
> An: "users" 
> Gesendet: Donnerstag, 11. Juni 2020 16:54:31
> Betreff: [ovirt-users] Re: cloud-init: reverts on reboot
>
> I re-read the docs on creating VMs.
>
> What is the difference between the Run Once w/ it's pop-up form vs the
> Initial Run with it's embedded form?
>
>From an engine point of view it's quite a difference, run once creates a
one-time configuration to start the VM with and then roll back to the
existing.
As for cloud-init, when you set it in the Edit VM, initial run (without
run-once), on the first time you will run the VM in your environment(first
boot for that VM in your environment), cloud-init will use it.
While, on run-once, it will use the configuration again.

>
> If an (updated) doc were to have a sequential workflow for using
> cloud-init in oVirt for a new VM's setup, would it look like this:
>
> * assume cloud-init already installed, ex. Glance image; so
> SysPre/Cloud-Init process already done*
>
> Glance Image Method
>
> 1. Import Image + Create Template
> 2. Create VM (_don't_ use Run; and _don't_ populate Initial Run tab)
> 3. start VM with Run Once (_not_ Run)
> 4. fill out Run Once pop-up form
> 5. VM boots as usual
> 6. remote Console/shell into VM to verify setting
> 7. Reboot or Shutdown/Run
> 8. use cloud-init'd VM like any other non-cloud-init'd VM
>
> That ^ look right?
>
I don't really understand point 8. But from at 5 the VM should consume the
cloud-init configuration and it should stay in the VM.
You may try and reconfigure if you use run-once again, setting cloud-init
configuration again.
It looks OK.

> Is CentOS8.2 out?  I checked blog.centos.org but it looks like they had
build issues to still resolve as of last week ...
I'm not sure about centos8.2, adding +Sandro Bonazzola 
 .

> ___
> Users mailing list -- users@ovirt.org
> To unsubscribe send an email to users-le...@ovirt.org
> Privacy Statement: https://www.ovirt.org/privacy-policy.html
> oVirt Code of Conduct:
> https://www.ovirt.org/community/about/community-guidelines/
> List Archives:
> https://lists.ovirt.org/archives/list/users@ovirt.org/message/LXA4TCGENOQ3PPNGTCRPZQQJYXSR52QI/
> ___
> Users mailing list -- users@ovirt.org
> To unsubscribe send an email to users-le...@ovirt.org
> Privacy Statement: https://www.ovirt.org/privacy-policy.html
> oVirt Code of Conduct:
> https://www.ovirt.org/community/about/community-guidelines/
> List Archives:
> https://lists.ovirt.org/archives/list/users@ovirt.org/message/CE7MMZEETR3E5CQUGQ3RBI6KXFVOLUMD/
>
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/KO4JDDJ33RMXWY3B6VWIDGJDXARQVP2Z/


[ovirt-users] Re: cloud-init: reverts on reboot

2020-06-12 Thread Florian Schmid via Users
Hi,

we are using cloud-init for several years now and it looks like, that 
cloud-init needs a config for every boot, otherwise, it will use the default 
network config, which is DHCP.

We come around this issue by adding this file:
cat /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
network: {config: disabled}

by cloud-init itself on the first run.

With this, cloud-init creates only once the network config and never touches it 
again.
I would not completely disable cloud-init, because this could also have some 
drawbacks, like not being able to create a root/user password anymore, if on 
worst case, ssh is not working anymore...

What we also fix on the first boot is the datasource_list
-> datasource_list: ["NoCloud", "ConfigDrive"]

Otherwise, we have an extremely long boot process (up to 5 minutes or so), 
because cloud-init tries to reach several cloud-config URLs.

BR Florian

- Ursprüngliche Mail -
Von: "Jp" 
An: "users" 
Gesendet: Donnerstag, 11. Juni 2020 16:54:31
Betreff: [ovirt-users] Re: cloud-init: reverts on reboot

I re-read the docs on creating VMs.

What is the difference between the Run Once w/ it's pop-up form vs the Initial 
Run with it's embedded form?

If an (updated) doc were to have a sequential workflow for using cloud-init in 
oVirt for a new VM's setup, would it look like this:

* assume cloud-init already installed, ex. Glance image; so SysPre/Cloud-Init 
process already done*

Glance Image Method

1. Import Image + Create Template
2. Create VM (_don't_ use Run; and _don't_ populate Initial Run tab)
3. start VM with Run Once (_not_ Run)
4. fill out Run Once pop-up form
5. VM boots as usual
6. remote Console/shell into VM to verify setting
7. Reboot or Shutdown/Run
8. use cloud-init'd VM like any other non-cloud-init'd VM

That ^ look right?
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/LXA4TCGENOQ3PPNGTCRPZQQJYXSR52QI/
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/CE7MMZEETR3E5CQUGQ3RBI6KXFVOLUMD/


[ovirt-users] Re: cloud-init: reverts on reboot

2020-06-11 Thread Jp
I re-read the docs on creating VMs.

What is the difference between the Run Once w/ it's pop-up form vs the Initial 
Run with it's embedded form?

If an (updated) doc were to have a sequential workflow for using cloud-init in 
oVirt for a new VM's setup, would it look like this:

* assume cloud-init already installed, ex. Glance image; so SysPre/Cloud-Init 
process already done*

Glance Image Method

1. Import Image + Create Template
2. Create VM (_don't_ use Run; and _don't_ populate Initial Run tab)
3. start VM with Run Once (_not_ Run)
4. fill out Run Once pop-up form
5. VM boots as usual
6. remote Console/shell into VM to verify setting
7. Reboot or Shutdown/Run
8. use cloud-init'd VM like any other non-cloud-init'd VM

That ^ look right?
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/LXA4TCGENOQ3PPNGTCRPZQQJYXSR52QI/


[ovirt-users] Re: cloud-init: reverts on reboot

2020-06-11 Thread Jp
>If you are talking specifically about the static network being reverted back 
>(to DHCP) ... at least 18.5-8 as seen in the bug:

Oh, it was indeed static IPs that kept not staying "stuck" ... the VM would 
revert to DHCP on Reboot.  The other cloud-init settings were OK.

If that bug is my problem then I'll have to upgrade to CentOS8.2 because only 
18.5-7 is available under CentOS8.1.  See below.  

Is CentOS8.2 out?  I checked blog.centos.org but it looks like they had build 
issues to still resolve as of last week ...


Last login: Thu Jun 11 09:31:50 2020 from 192.168.0.202
[justin@helpernode4 ~]$ cat /etc/centos-release
CentOS Linux release 8.1.1911 (Core) 
[justin@helpernode4 ~]$ sudo yum update cloud-init
CentOS-8 - AppStream
   368 
kB/s | 7.0 MB 00:19
CentOS-8 - Base 
   134 
kB/s | 2.2 MB 00:16
CentOS-8 - Extras   
   434  
B/s | 6.7 kB 00:15
Dependencies resolved.
===
 Package  Architecture  
   Version   Repository 
  Size
===
Upgrading:
 cloud-init   noarch
   18.5-7.el8_1.1AppStream  
 857 k

Transaction Summary
===
Upgrade  1 Package

Total download size: 857 k
Is this ok [y/N]: 
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/FT53IOSDNUQUG5V4PXRO2L6IRZGCDXDI/


[ovirt-users] Re: cloud-init: reverts on reboot

2020-06-11 Thread Luca 'remix_tj' Lorenzetto
Hello,

to be sure cloud-init will never more invoked after first
configuration i always specify:

touch /etc/cloud/cloud-init.disabled

as command executed by cloud-init. In this way, won't start anymore.

Luca

On Thu, Jun 11, 2020 at 12:53 PM Liran Rotenberg  wrote:
>
> Hi Justin,
> Make sure that cloud-init is installed and enabled on the VM (before creating 
> a template from it).
> The template should be sealed.
>
> Then you can create a VM from it.
> There are two options:
> 1. Edit the VM with cloud-init configuration.
> 2. Run-Once with cloud-init configuration.
>
> Your changes should persist on the VM. If you are talking specifically about 
> the static network being reverted back (to DHCP), we had a bug on it.
> Please make sure your cloud-init version is up to date to be at least 18.5-8 
> as seen in the bug:
> https://bugzilla.redhat.com/1706482
>
> Regards,
> Liran.
>
> On Thu, Jun 11, 2020 at 9:45 AM Nathanaël Blanchet  wrote:
>>
>> Sure it is possible, use "run once" setting with cloud-init checkbox to 
>> fetch cloud-init settings when you decide and not only at the first boot.
>>
>> - Mail original -
>> De: "Jp" 
>> À: "users" 
>> Envoyé: Jeudi 11 Juin 2020 04:36:16
>> Objet: [ovirt-users] cloud-init: reverts on reboot
>>
>> cloud-init settings entered into Hosted Engine are reverting after reboot, 
>> so what's the correct workflow for using the UI form?
>>
>> I'd like a workflow where I can:
>> 1. start with Template (covers most settings)
>> 2. create VM
>> 3. use cloud-init in the UI (for a few settings, like static IP)
>> 4. start/reboot VM and have cloud-init settings stick
>>
>> How is the above possible?
>> ___
>> Users mailing list -- users@ovirt.org
>> To unsubscribe send an email to users-le...@ovirt.org
>> Privacy Statement: https://www.ovirt.org/privacy-policy.html
>> oVirt Code of Conduct: 
>> https://www.ovirt.org/community/about/community-guidelines/
>> List Archives: 
>> https://lists.ovirt.org/archives/list/users@ovirt.org/message/ECHLM4E4Z327XAPDJS5RM6DRM3V4T2JS/
>> ___
>> Users mailing list -- users@ovirt.org
>> To unsubscribe send an email to users-le...@ovirt.org
>> Privacy Statement: https://www.ovirt.org/privacy-policy.html
>> oVirt Code of Conduct: 
>> https://www.ovirt.org/community/about/community-guidelines/
>> List Archives: 
>> https://lists.ovirt.org/archives/list/users@ovirt.org/message/YY72LPGSJM5CUETKAXXEUOUUOEMKBP4I/
>
> ___
> Users mailing list -- users@ovirt.org
> To unsubscribe send an email to users-le...@ovirt.org
> Privacy Statement: https://www.ovirt.org/privacy-policy.html
> oVirt Code of Conduct: 
> https://www.ovirt.org/community/about/community-guidelines/
> List Archives: 
> https://lists.ovirt.org/archives/list/users@ovirt.org/message/JUJS7H63YVVURIHFSBFYZXZE56MMRVES/



-- 
"E' assurdo impiegare gli uomini di intelligenza eccellente per fare
calcoli che potrebbero essere affidati a chiunque se si usassero delle
macchine"
Gottfried Wilhelm von Leibnitz, Filosofo e Matematico (1646-1716)

"Internet è la più grande biblioteca del mondo.
Ma il problema è che i libri sono tutti sparsi sul pavimento"
John Allen Paulos, Matematico (1945-vivente)

Luca 'remix_tj' Lorenzetto, http://www.remixtj.net , 
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/LQIDRRK7ZADJ3ABPRC77ZZFIQZQYHSIF/


[ovirt-users] Re: cloud-init: reverts on reboot

2020-06-11 Thread Liran Rotenberg
Hi Justin,
Make sure that cloud-init is installed and enabled on the VM (before
creating a template from it).
The template should be sealed.

Then you can create a VM from it.
There are two options:
1. Edit the VM with cloud-init configuration.
2. Run-Once with cloud-init configuration.

Your changes should persist on the VM. If you are talking specifically
about the static network being reverted back (to DHCP), we had a bug on it.
Please make sure your cloud-init version is up to date to be at least
18.5-8 as seen in the bug:
https://bugzilla.redhat.com/1706482


Regards,
Liran.

On Thu, Jun 11, 2020 at 9:45 AM Nathanaël Blanchet  wrote:

> Sure it is possible, use "run once" setting with cloud-init checkbox to
> fetch cloud-init settings when you decide and not only at the first boot.
>
> - Mail original -
> De: "Jp" 
> À: "users" 
> Envoyé: Jeudi 11 Juin 2020 04:36:16
> Objet: [ovirt-users] cloud-init: reverts on reboot
>
> cloud-init settings entered into Hosted Engine are reverting after reboot,
> so what's the correct workflow for using the UI form?
>
> I'd like a workflow where I can:
> 1. start with Template (covers most settings)
> 2. create VM
> 3. use cloud-init in the UI (for a few settings, like static IP)
> 4. start/reboot VM and have cloud-init settings stick
>
> How is the above possible?
> ___
> Users mailing list -- users@ovirt.org
> To unsubscribe send an email to users-le...@ovirt.org
> Privacy Statement: https://www.ovirt.org/privacy-policy.html
> oVirt Code of Conduct:
> https://www.ovirt.org/community/about/community-guidelines/
> List Archives:
> https://lists.ovirt.org/archives/list/users@ovirt.org/message/ECHLM4E4Z327XAPDJS5RM6DRM3V4T2JS/
> ___
> Users mailing list -- users@ovirt.org
> To unsubscribe send an email to users-le...@ovirt.org
> Privacy Statement: https://www.ovirt.org/privacy-policy.html
> oVirt Code of Conduct:
> https://www.ovirt.org/community/about/community-guidelines/
> List Archives:
> https://lists.ovirt.org/archives/list/users@ovirt.org/message/YY72LPGSJM5CUETKAXXEUOUUOEMKBP4I/
>
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/JUJS7H63YVVURIHFSBFYZXZE56MMRVES/