LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 09-30-2019, 01:57 PM   #1
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Rep: Reputation: 95
cloud-init fails strangely on oVirt and Fedora 30 with error "IsADirectoryError: [Errno 21] Is a directory: '/var/lib/cloud/instance'"


Hi,

I am using oVirt 4.2.
And I have problems working with cloud-init (cloud-init-17.1-9.fc30.noarch) with Fedora 30 based template.

The steps I used are as follow.
1. I successfully created, installed and configured a Fedora 30 VM
2. I customized, and then sealed the Fedora 30 VM
3. I successfully made the template from the Fedora 30 sealed VM

I have issues after setting up cloud-init and expecting its settings to take effect.
My cloud-init is essentially as follows below.

Code:
Initial Run
  Use Cloud-Init/Sysprep: Checked
  Configure Time Zone
    Time Zone: (GMT-10:00) Hawaiian Standard Time
  Authentication
    User Name: foobar
    Password: password
  Custom Script
#cloud-config
runcmd:
 - [ date, >>, /var/cache/date.log ]
For reasons that I do not understand cloud-init fails with the below error.
IsADirectoryError: [Errno 21] Is a directory: '/var/lib/cloud/instance'

I have attached some relevant log files: cloud-init.log, cloud-init-output.log and var-lib-cloud.txt (an archive of /var/lib/cloud folder, to be renamed as var-lib-cloud.tar.gz).

Thanks in advance for any help and hints.
Attached Files
File Type: log cloud-init.log (118.0 KB, 27 views)
File Type: log cloud-init-output.log (11.9 KB, 24 views)
File Type: txt var-lib-cloud.txt (1.3 KB, 23 views)
 
Old 10-02-2019, 08:38 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
The logs are pretty clear: An attempt to delete /var/lib/cloud/instance fails, because it's a directory. And sure enough, in your .tar.gz file it is indeed an empty directory, so that delete operation is never going to work.

Whether /var/lib/cloud/instance should be a directory or not, or why cloud-init wants to delete it, I can't say.

Have you tried deleting or renaming the "instance" directory just to see what happens?
 
Old 10-03-2019, 05:53 AM   #3
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525

Original Poster
Rep: Reputation: 95
Hi Ser Olmy,

I do appreciate that you took the time to respond to me.

Obviously, I did research before starting this thread.
From my readings, it seems as if the /var/lib/cloud/instance should have been a link to a file and not a directory.

The reality is, that /var/lib/cloud/instance not being owned by a package it should have been created by a script triggered by cloud-init.
Why it does create it incorrectly, I do not know.

I am not comfortable to delete it from the based machine from which a created the template.
The reason is that I do expect it to work out of the box, without too much fiddling.
Also remember that cloud-init is triggered at the very first boot to initialize the machine. At that stage I cannot even log in as the machine is still in its creation process.

Anyone else?
 
  


Reply

Tags
cloud, fedora 30, ovirt



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Using cloud-init to initialize Fedora Cloud VMs on oVirt LXer Syndicated Linux News 0 03-27-2017 10:45 AM
C++ preprocessor "/lib/cpp" fails sanity check C++ preprocessor "/lib/cpp" fails san mutetikasikali Linux - Software 3 01-25-2014 06:57 AM
[SOLVED] Bacula error message:Could not stat "/var/lib/bacula/bacula.sql": ERR=No such file or directory Learnix Linux - Server 2 11-18-2013 10:39 AM
[SOLVED] ErrNo 14 and ErrNo 256 in yum server configuration nivedhitha Linux - Server 4 05-22-2011 12:45 AM
Compromised? Files "/usr/lib.hwm", "/usr/lib.pwd", "/usr/lib.pwi" Klaus Pforte Linux - Security 4 09-28-2004 11:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 06:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration