XO debian 10 cloud ready VM template (cloud-init)
-
Great - thanks for the info @fohdeesha.
-
FYI If you are looking for more info on the matter yourself ...
ver: 20.2-2 of the cloud-init is still the one with the bug mentioned by @olivierlambert earlier:
https://github.com/vatesfr/xen-orchestra/issues/4449There is version 20.3 awaiting to be delivered but still awaiting to be packaged:
https://tracker.debian.org/pkg/cloud-init -
I was able to find the reason XO is not working with cloud-init.
XO attaches iso with the cloud-config data as additional disk xvdb and it does not work.
But if you provide it as a cd? It will.That is why - as for now you will need to create your own iso and attach it as a cd-rom.
You do that this way:Get your files ready (meta-data network-config user-data). My examples below:
metadata:
instance-id: local-nocloud local-hostname: myhost.example.comnetwork-config:
network: version: 1 config: - type: physical name: eth0 subnets: - type: static address: 10.0.0.5/24 gateway: 10.0.0.254 - type: nameserver address: - 8.8.8.8 - 8.8.4.4 search: - example.com - type: physical name: eth1 subnets: - type: static address: 192.168.0.5/24user-data:
#cloud-config ### RUN CMD runcmd: - /usr/bin/apt -y install mc - /usr/bin/date >> /root/testfile # set system default user system_info: default_user: name: testuser gecos: Default Cloud User # password auth - comment out if not using passwords password: testpassword ssh_pwauth: true chpasswd: { expire: false } # do some package management #package_update: true packages: - iptraf - mtr - screen - net-tools - atopGenerate iso
genisoimage -output myiso.iso -volid cidata -joliet -rock user-data meta-data network-configUpload iso to XO
home -> storage -> iso's -> disks -> new diskPrepare VM/template
- Install Debian 10.6 with xo-tools
- install cloud-init and cloud-initramfs-growroot
- remove all network configuration leave just "allow-hotplug ethxxx"
(network config will be added in /etc/network/interfaces/50-cloud-init. It will not overwrite yours) - shutdown the machine and create the template if you want or just restart VM.
- DO NOT LET IT BOOT! - keep it in grub.
- attach your iso
- let it run
It will do whatever you need on the machine.
-
This post is deleted!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login