<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>Аспро: ЛайтШоп [тема: Виртуальная машина Fedora - с cloud init ничего не вышло…]</title>
		<link>http://proxmox.su</link>
		<description>Новое в теме Виртуальная машина Fedora - с cloud init ничего не вышло… форума Proxmox Виртуальная Среда на сайте Аспро: ЛайтШоп [proxmox.su]</description>
		<language>ru</language>
		<docs>http://backend.userland.com/rss2</docs>
		<pubDate>Thu, 28 May 2026 01:57:38 +0300</pubDate>
		<item>
			<title>Виртуальная машина Fedora - с cloud init ничего не вышло…</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message327399/78148-virtualnaya-mashina-fedora-_-s-cloud-init-nichego-ne-vyshlo">Виртуальная машина Fedora - с cloud init ничего не вышло…</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Я понял, в чем дело – настройка образа с помощью Code: virt-customize -a $3 --install qemu-guest-agent<br />virt-customize -a $3 --install avahi всё ломала, удаление этих строк решило проблему. Еще добавил Code: qm set $1 --serial0 socket --vga serial0<br />qm set $1 --ciupgrade 0, чтобы избежать некоторых segfault'ов с agetty и затянутого обновления после первой загрузки (я предпочитаю делать его сам). <br />
			<i>19.04.2025 00:59:00, RafalSkolasinski.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message327399/78148-virtualnaya-mashina-fedora-_-s-cloud-init-nichego-ne-vyshlo</link>
			<guid>http://proxmox.su/forum/messages/forum63/message327399/78148-virtualnaya-mashina-fedora-_-s-cloud-init-nichego-ne-vyshlo</guid>
			<pubDate>Sat, 19 Apr 2025 00:59:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>Виртуальная машина Fedora - с cloud init ничего не вышло…</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message327398/78148-virtualnaya-mashina-fedora-_-s-cloud-init-nichego-ne-vyshlo">Виртуальная машина Fedora - с cloud init ничего не вышло…</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Привет, я пытаюсь подготовить несколько шаблонов VM на основе cloud init. Я посмотрел <noindex><a href="https://www.apalrd.net/posts/2023/pve_cloud/" target="_blank" rel="nofollow" >https://www.apalrd.net/posts/2023/pve_cloud/</a></noindex> и успешно создал Ubuntu шаблон вручную. Затем мне удалось использовать скрипт, похожий на тот, что в блоге, чтобы создать серию шаблонов для Ubuntu и Debian систем. Но когда я пытаюсь сделать это для Fedora, у меня возникло довольно много проблем... В созданной VM нет сети. Они не получают IP-адрес и не могут связаться ни с чем. Кроме того, при логировании я вижу Bash: Failed to connect to bus: Connection refused и при вызове nmcli также появляется ошибка Bash: $ nmcli device<br />Error: Could not create NMClient object: Could not connect: Connection refused. Вот скрипт, который я использовал Bash: #!/bin/bash<br /><br /># Возможно, потребуется установить "libguestfs-tools" на хосте proxmox<br /><br />function download_image() {<br /> &nbsp; &nbsp;mkdir -p images<br /> &nbsp; &nbsp;wget -nc -P images $1<br />}<br /><br />#Создать шаблон<br />#аргументы:<br /># 1: id vm<br /># 2: имя vm<br /># 3: имя файла в текущей директории<br />function create_template() {<br /> &nbsp; &nbsp;if [[ "$force_recreate" != "true" ]] && qm status $1 &&gt;/dev/null; then<br /> &nbsp; &nbsp; &nbsp; &nbsp;echo "Шаблон $2 ($1) существует, пропускаю..."<br /> &nbsp; &nbsp; &nbsp; &nbsp;return<br /> &nbsp; &nbsp;fi<br /> &nbsp; &nbsp;echo "Удаляю существующий шаблон $1"<br /> &nbsp; &nbsp;qm destroy $1<br /><br /> &nbsp; &nbsp;echo "Создаю шаблон $2 ($1)"<br /> &nbsp; &nbsp;qm create $1 --name $2 --ostype l26<br /><br /> &nbsp; &nbsp;echo "Настраиваю образ $3"<br /> &nbsp; &nbsp;virt-customize -a $3 --install qemu-guest-agent<br /> &nbsp; &nbsp;virt-customize -a $3 --install avahi<br /><br /> &nbsp; &nbsp;#Установить устройство загрузки & добавить диск cloud init<br /> &nbsp; &nbsp;qm set $1 --scsi0 ${storage}:0,import-from="$(pwd)/$3",discard=on<br /> &nbsp; &nbsp;qm set $1 --boot order=scsi0 --scsihw virtio-scsi-single<br /> &nbsp; &nbsp;qm set $1 --agent enabled=1,fstrim_cloned_disks=1<br /> &nbsp; &nbsp;qm set $1 --ide2 ${storage}:cloudinit<br /><br /> &nbsp; &nbsp;#Установить сетевое подключение к мосту по умолчанию<br /> &nbsp; &nbsp;qm set $1 --net0 virtio,bridge=vmbr0<br /> &nbsp; &nbsp;qm set $1 --memory 4096 --cores 4 --cpu host<br /><br /> &nbsp; &nbsp;# qm set $1 --serial0 socket --vga default<br /> &nbsp; &nbsp;qm set $1 --ipconfig0 "ip6=auto,ip=dhcp"<br /><br /> &nbsp; &nbsp;qm set $1 --ciuser ${username}<br /> &nbsp; &nbsp;qm set $1 --sshkeys ${ssh_keyfile}<br /><br /> &nbsp; &nbsp;# Изменить размер диска и завершить создание шаблона<br /> &nbsp; &nbsp;qm disk resize $1 scsi0 ${disk_size}<br /> &nbsp; &nbsp;qm template $1<br />}<br /><br /># Глобальная конфигурация<br />export ssh_keyfile=/etc/pve/priv/authorized_keys<br />export username=fedora<br />export storage=local-btrfs<br />export disk_size=32G<br /><br /># export force_recreate=true<br /><br /># Скачать образы<br />download_image <noindex><a href="https://gb.mirrors.cicku.me/fedora/linux/releases/41/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-41-1.4.x86_64.qcow2" target="_blank" rel="nofollow" >https://gb.mirrors.cicku.me/fedora/linux/releases/41/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-41-1.4.x86_64.qcow2</a></noindex><br /><br /># Создать шаблоны<br />create_template 920 "template-fedora-41" "images/Fedora-Cloud-Base-Generic-41-1.4.x86_64.qcow2" <br />
			<i>18.04.2025 17:18:00, RafalSkolasinski.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message327398/78148-virtualnaya-mashina-fedora-_-s-cloud-init-nichego-ne-vyshlo</link>
			<guid>http://proxmox.su/forum/messages/forum63/message327398/78148-virtualnaya-mashina-fedora-_-s-cloud-init-nichego-ne-vyshlo</guid>
			<pubDate>Fri, 18 Apr 2025 17:18:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
	</channel>
</rss>
