PVE coud-init with FreeBSD-guest

Catwoolfii

Well-Known Member
Nov 6, 2016
40
2
48
Russia
Good day!
I tried to use cloud-init to a virtual machine with FreeBSD-11.1 and py27-cloud-init package, but it doesn't work (on a virtual machine with Debian Stretch it works perfectly). Is it possible in pve at the moment?
 
Last edited:
do the cloud init logs from the vm say anything?
0.7.6 is a very old cloud-init version, and there were many bugs
 
Unfortunately, there is no update for this package, even in ports. I tried using py27-cloud-init-azure-0.7.9_1 package, but it also failed. Here is what the log messages:
Code:
2018-04-16 10:41:13,443 - util.py[DEBUG]: Cloud-init v. 0.7.9 running 'init' at Mon, 16 Apr 2018 07:41:13 +0000. Up 156.396610975 seconds.
2018-04-16 10:41:13,446 - util.py[DEBUG]: Writing to /var/log/cloud-init.log - ab: [420] 0 bytes
2018-04-16 10:41:13,449 - util.py[DEBUG]: Changing the ownership of /var/log/cloud-init.log to 0:0
2018-04-16 10:41:13,449 - util.py[DEBUG]: Running command ['ifconfig', '-a'] with allowed return codes [0] (shell=False, capture=True)
2018-04-16 10:41:13,457 - util.py[DEBUG]: Running command ['netstat', '-rn'] with allowed return codes [0] (shell=False, capture=True)
2018-04-16 10:41:13,522 - util.py[DEBUG]: Running command ['netstat', '-A', 'inet6', '-n'] with allowed return codes [0] (shell=False, capture=True)
2018-04-16 10:41:13,527 - main.py[DEBUG]: Checking to see if files that we need already exist from a previous run that would allow us to stop early.
2018-04-16 10:41:13,527 - main.py[DEBUG]: Execution continuing, no previous run detected that would allow us to stop early.
2018-04-16 10:41:13,527 - handlers.py[DEBUG]: start: init-network/check-cache: attempting to read from cache [trust]
2018-04-16 10:41:13,527 - util.py[DEBUG]: Reading from /var/lib/cloud/instance/obj.pkl (quiet=False)
2018-04-16 10:41:13,528 - stages.py[DEBUG]: no cache found
2018-04-16 10:41:13,528 - handlers.py[DEBUG]: finish: init-network/check-cache: SUCCESS: no cache found
2018-04-16 10:41:13,528 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/instance
2018-04-16 10:41:13,532 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.freebsd.Distro'>
2018-04-16 10:41:13,533 - __init__.py[DEBUG]: Looking for for data source in: ['ConfigDrive', 'Azure', 'OpenStack', 'Ec2'], via packages ['', u'cloudinit.sources'] that matches dependencies ['FILESYSTEM', 'NETWORK']
2018-04-16 10:41:13,557 - util.py[DEBUG]: Running command ['sysctl', 'dev.storvsc'] with allowed return codes [0] (shell=False, capture=True)
2018-04-16 10:41:13,563 - DataSourceAzure.py[DEBUG]: Fail to execute sysctl dev.storvsc
2018-04-16 10:41:13,563 - util.py[WARNING]: failed stage init
2018-04-16 10:41:13,563 - util.py[DEBUG]: failed stage init
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 513, in status_wrapper
    ret = functor(name, args)
  File "/usr/local/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 236, in main_init
    init.fetch(existing=existing)
  File "/usr/local/lib/python2.7/site-packages/cloudinit/stages.py", line 342, in fetch
    return self._get_data_source(existing=existing)
  File "/usr/local/lib/python2.7/site-packages/cloudinit/stages.py", line 252, in _get_data_source
    pkg_list, self.reporter)
  File "/usr/local/lib/python2.7/site-packages/cloudinit/sources/__init__.py", line 297, in find_source
    ds_list = list_sources(cfg_list, ds_deps, pkg_list)
  File "/usr/local/lib/python2.7/site-packages/cloudinit/sources/__init__.py", line 337, in list_sources
    ['get_datasource_list'])
  File "/usr/local/lib/python2.7/site-packages/cloudinit/importer.py", line 35, in find_module
    mod = import_module(full_path)
  File "/usr/local/lib/python2.7/site-packages/cloudinit/importer.py", line 15, in import_module
    __import__(module_name)
  File "/usr/local/lib/python2.7/site-packages/cloudinit/sources/DataSourceAzure.py", line 171, in <module>
    res_disk = get_resource_disk_on_freebsd(1)
  File "/usr/local/lib/python2.7/site-packages/cloudinit/sources/DataSourceAzure.py", line 139, in get_resource_disk_on_freebsd
    storvscid = find_storvscid_from_sysctl_pnpinfo(sysctl_out, g0g1)
  File "/usr/local/lib/python2.7/site-packages/cloudinit/sources/DataSourceAzure.py", line 48, in find_storvscid_from_sysctl_pnpinfo
    for line in sysctl_out.splitlines():
AttributeError: 'NoneType' object has no attribute 'splitlines'
2018-04-16 10:41:13,568 - util.py[DEBUG]: cloud-init mode 'init' took 0.210 seconds (0.21)
2018-04-16 10:41:13,569 - handlers.py[DEBUG]: finish: init-network: SUCCESS: searching for network datasources
 
Unfortunately, there is no update for this package, even in ports. I tried using py27-cloud-init-azure-0.7.9_1 package, but it also failed. Here is what the log messages:
this looks like cloud-init itself fails in the guest, so nothing we can fix
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!