<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>Аспро: ЛайтШоп [тема: Клонирование виртуальной машины с помощью Ansible и изменение IP-адреса.]</title>
		<link>http://proxmox.su</link>
		<description>Новое в теме Клонирование виртуальной машины с помощью Ansible и изменение IP-адреса. форума Proxmox Виртуальная Среда на сайте Аспро: ЛайтШоп [proxmox.su]</description>
		<language>ru</language>
		<docs>http://backend.userland.com/rss2</docs>
		<pubDate>Wed, 29 Apr 2026 20:45:24 +0300</pubDate>
		<item>
			<title>Клонирование виртуальной машины с помощью Ansible и изменение IP-адреса.</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message315469/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.">Клонирование виртуальной машины с помощью Ansible и изменение IP-адреса.</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Когда ты клонируешь ВМ, тебе нужно сбросить MAC-адрес и ID хоста, иначе твой DHCP-сервер будет выдавать один и тот же IP. Если у тебя статический IP, тебе потребуется какой-то другой способ получить доступ к устройству до включения сети. Обе эти задачи можно выполнить в Ansible либо при создании шаблона, либо перед началом клонирования: придется смонтировать диск и изменить файлы. Если у тебя фиксированный IP и нет возможности изменять файлы, я бы создал фиктивную сеть с тем же подсетью и реализовал какой-то прокси для твоего Ansible-скрипта, который сможет получить доступ к этой подсети. <br />
			<i>24.06.2025 02:59:00, guruevi.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message315469/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.</link>
			<guid>http://proxmox.su/forum/messages/forum63/message315469/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.</guid>
			<pubDate>Tue, 24 Jun 2025 02:59:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>Клонирование виртуальной машины с помощью Ansible и изменение IP-адреса.</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message315468/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.">Клонирование виртуальной машины с помощью Ansible и изменение IP-адреса.</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Должно быть: YAML: ipconfig:<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ipconfig0: 'ip=192.1658.0.151/24,gw=192.168.0.1' <br />
			<i>24.06.2025 01:23:00, Casulo.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message315468/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.</link>
			<guid>http://proxmox.su/forum/messages/forum63/message315468/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.</guid>
			<pubDate>Tue, 24 Jun 2025 01:23:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>Клонирование виртуальной машины с помощью Ansible и изменение IP-адреса.</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message315467/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.">Клонирование виртуальной машины с помощью Ansible и изменение IP-адреса.</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			У меня ещё инфа: Я был на ноутбуке с Ubuntu и перешёл на свой ноутбук с AlmaLinux 9. После выполнения стандартных инструкций по установке Ansible, я получаю другое количество информации в ошибке. "Bad Request: Parameter verification failed. - {'ipconfig0': 'invalid format - format error\\nipconfig0. gw: property is not defined in schema and the schema does not allow additional properties\\n'}" Я изменил это: ipconfig: ipconfig0: ip={{ip_address}}/{{subnet_mask}},gw={{gateway}} на: ipconfig: ipconfig0: ip={{ip_address}}/{{subnet_mask}} и это установило IP! <br />
			<i>21.04.2024 22:48:00, jtremblay.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message315467/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.</link>
			<guid>http://proxmox.su/forum/messages/forum63/message315467/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.</guid>
			<pubDate>Sun, 21 Apr 2024 22:48:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>Клонирование виртуальной машины с помощью Ansible и изменение IP-адреса.</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message315466/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.">Клонирование виртуальной машины с помощью Ansible и изменение IP-адреса.</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			У меня та же проблема, использую облачный образ Alma9 с cloud-init, и не получается изменить IP-адрес.<br /><br />```yaml<br />tasks:<br />- name: Клонирование шаблона<br /> &nbsp;community.general.proxmox_kvm:<br /> &nbsp; &nbsp;node: "{{ pve_node }}"<br /> &nbsp; &nbsp;api_user: "{{ api_user }}"<br /> &nbsp; &nbsp;api_password: "{{ api_password }}"<br /> &nbsp; &nbsp;api_host: "{{ api_host }}"<br /> &nbsp; &nbsp;clone: 'alma9-cloud'<br /> &nbsp; &nbsp;vmid: "{{ 9999 }}"<br /> &nbsp; &nbsp;name: "{{ vmname }}"<br /> &nbsp; &nbsp;newid: '{{ vmid }}'<br /> &nbsp; &nbsp;full: true<br /> &nbsp; &nbsp;storage: 'nas_vm'<br /> &nbsp; &nbsp;format: qcow2<br /> &nbsp; &nbsp;timeout: 500<br /><br />- name: Ожидание создания ВМ<br /> &nbsp;pause:<br /> &nbsp; &nbsp;seconds: 10 # ожидание, пока ВМ не будет создана<br /><br />- name: Обновление ВМ<br /> &nbsp;community.general.proxmox_kvm:<br /> &nbsp; &nbsp;node: "{{ pve_node }}"<br /> &nbsp; &nbsp;api_host: "{{ api_host }}"<br /> &nbsp; &nbsp;api_user: "{{ api_user }}"<br /> &nbsp; &nbsp;api_password: "{{ api_password }}"<br /> &nbsp; &nbsp;name: "{{ vmname }}"<br /> &nbsp; &nbsp;ipconfig:<br /> &nbsp; &nbsp; &nbsp;ipconfig0:<br /> &nbsp; &nbsp; &nbsp; &nbsp;ip: "{{ip_address}}/{{subnet_mask}}"<br /> &nbsp; &nbsp; &nbsp; &nbsp;gw: "{{gateway}}"<br /> &nbsp; &nbsp;update: yes<br /><br />- name: Запуск ВМ<br /> &nbsp;community.general.proxmox_kvm:<br /> &nbsp; &nbsp;api_user: "{{ api_user }}"<br /> &nbsp; &nbsp;api_password: "{{ api_password }}"<br /> &nbsp; &nbsp;api_host: "{{ api_host }}"<br /> &nbsp; &nbsp;node: "{{ pve_node }}"<br /> &nbsp; &nbsp;name: "{{ vmname }}"<br /> &nbsp; &nbsp;state: started<br />```<br /><br />TASK [Запуск ВМ] *********************************************************************************<br />changed: [localhost] =&gt; changed=true<br />invocation:<br /> &nbsp;module_args:<br /> &nbsp; &nbsp;acpi: true<br /> &nbsp; &nbsp;agent: null<br /> &nbsp; &nbsp;api_host: kvmh0<br /> &nbsp; &nbsp;api_password: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER<br /> &nbsp; &nbsp;api_token_id: null<br /> &nbsp; &nbsp;api_token_secret: null<br /> &nbsp; &nbsp;api_user: root@pam<br /> &nbsp; &nbsp;args: null<br /> &nbsp; &nbsp;autostart: false<br /> &nbsp; &nbsp;balloon: 0<br /> &nbsp; &nbsp;bios: null<br /> &nbsp; &nbsp;boot: cnd<br /> &nbsp; &nbsp;bootdisk: null<br /> &nbsp; &nbsp;cicustom: null<br /> &nbsp; &nbsp;cipassword: null<br /> &nbsp; &nbsp;citype: null<br /> &nbsp; &nbsp;ciuser: null<br /> &nbsp; &nbsp;clone: null<br /> &nbsp; &nbsp;cores: 1<br /> &nbsp; &nbsp;cpu: kvm64<br /> &nbsp; &nbsp;cpulimit: null<br /> &nbsp; &nbsp;cpuunits: 1000<br /> &nbsp; &nbsp;delete: null<br /> &nbsp; &nbsp;description: null<br /> &nbsp; &nbsp;digest: null<br /> &nbsp; &nbsp;force: false<br /> &nbsp; &nbsp;format: qcow2<br /> &nbsp; &nbsp;freeze: null<br /> &nbsp; &nbsp;full: true<br /> &nbsp; &nbsp;hostpci: null<br /> &nbsp; &nbsp;hotplug: null<br /> &nbsp; &nbsp;hugepages: null<br /> &nbsp; &nbsp;ide: null<br /> &nbsp; &nbsp;ipconfig:<br /> &nbsp; &nbsp; &nbsp;ipconfig0:<br /> &nbsp; &nbsp; &nbsp; &nbsp;ip: 192.168.1.169/24<br /> &nbsp; &nbsp; &nbsp; &nbsp;gw: 192.168.1.1<br /> &nbsp; &nbsp;keyboard: null<br /> &nbsp; &nbsp;kvm: true<br /> &nbsp; &nbsp;localtime: null<br /> &nbsp; &nbsp;lock: null<br /> &nbsp; &nbsp;machine: null<br /> &nbsp; &nbsp;memory: 512<br /> &nbsp; &nbsp;migrate_downtime: null<br /> &nbsp; &nbsp;migrate_speed: null<br /> &nbsp; &nbsp;name: test104<br /> &nbsp; &nbsp;nameservers: null<br /> &nbsp; &nbsp;net: null<br /> &nbsp; &nbsp;newid: null<br /> &nbsp; &nbsp;node: kvmh0<br /> &nbsp; &nbsp;numa: null<br /> &nbsp; &nbsp;numa_enabled: null<br /> &nbsp; &nbsp;onboot: null<br /> &nbsp; &nbsp;ostype: l26<br /> &nbsp; &nbsp;parallel: null<br /> &nbsp; &nbsp;pool: null<br /> &nbsp; &nbsp;protection: null<br /> &nbsp; &nbsp;proxmox_default_behavior: compatibility<br /> &nbsp; &nbsp;reboot: null<br /> &nbsp; &nbsp;revert: null<br /> &nbsp; &nbsp;sata: null<br /> &nbsp; &nbsp;scsi: null<br /> &nbsp; &nbsp;scsihw: null<br /> &nbsp; &nbsp;searchdomains: null<br /> &nbsp; &nbsp;serial: null<br /> &nbsp; &nbsp;shares: null<br /> &nbsp; &nbsp;skiplock: null<br /> &nbsp; &nbsp;smbios: null<br /> &nbsp; &nbsp;snapname: null<br /> &nbsp; &nbsp;sockets: 1<br /> &nbsp; &nbsp;sshkeys: null<br /> &nbsp; &nbsp;startdate: null<br /> &nbsp; &nbsp;startup: null<br /> &nbsp; &nbsp;state: started<br /> &nbsp; &nbsp;storage: null<br /> &nbsp; &nbsp;tablet: false<br /> &nbsp; &nbsp;target: null<br /> &nbsp; &nbsp;tdf: null<br /> &nbsp; &nbsp;template: false<br /> &nbsp; &nbsp;timeout: 30<br /> &nbsp; &nbsp;update: true<br /> &nbsp; &nbsp;validate_certs: false<br /> &nbsp; &nbsp;vcpus: null<br /> &nbsp; &nbsp;vga: std<br /> &nbsp; &nbsp;virtio: null<br /> &nbsp; &nbsp;vmid: null<br /> &nbsp; &nbsp;watchdog: null<br /> &nbsp;msg: ВМ 101104 запущена<br /><br />TASK [Ожидание создания ВМ] ***********************************************************************<br />Пауза на 10 секунд (нажмите ctrl+C затем 'C' = продолжить рано, ctrl+C затем 'A' = прервать)<br />ok: [localhost] =&gt; changed=false<br />delta: 10<br />echo: true<br />rc: 0<br />start: '2024-04-20 16:50:35.626978'<br />stderr: ''<br />stdout: Paused for 10.0 seconds<br />stop: '2024-04-20 16:50:45.627560'<br />user_input: ''<br /><br />META: ran handlers<br />META: ran handlers<br /><br />PLAY RECAP *************************************************************************************<br />localhost &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: ok=4 &nbsp; &nbsp;changed=2 &nbsp; &nbsp;unreachable=0 &nbsp; &nbsp;failed=0 &nbsp; &nbsp;skipped=0 &nbsp; &nbsp;rescued=0 &nbsp; &nbsp;ignored=0<br /><br />Есть две вещи, которые я хотел бы добавить к этому "плейбуку":<br />1) Я хотел бы изменить размер диска<br />2) Я хотел бы изменить hostname<br />Я знаю, что я могу изменить это с помощью другого плейбука. Но это не должно быть проблемой для настройки здесь… <br />
			<i>20.04.2024 23:20:00, jtremblay.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message315466/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.</link>
			<guid>http://proxmox.su/forum/messages/forum63/message315466/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.</guid>
			<pubDate>Sat, 20 Apr 2024 23:20:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>Клонирование виртуальной машины с помощью Ansible и изменение IP-адреса.</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message315465/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.">Клонирование виртуальной машины с помощью Ansible и изменение IP-адреса.</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Это не cloud-init, ок, спасибо. <br />
			<i>09.12.2023 16:36:00, Molix.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message315465/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.</link>
			<guid>http://proxmox.su/forum/messages/forum63/message315465/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.</guid>
			<pubDate>Sat, 09 Dec 2023 16:36:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>Клонирование виртуальной машины с помощью Ansible и изменение IP-адреса.</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message315464/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.">Клонирование виртуальной машины с помощью Ansible и изменение IP-адреса.</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Если ваш VM (или шаблон) развернут с cloud-init, то он должен работать так. Если это не cloud-init VM (или шаблон), то он тоже не должен так работать. <br />
			<i>09.12.2023 11:58:00, sb-jw.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message315464/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.</link>
			<guid>http://proxmox.su/forum/messages/forum63/message315464/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.</guid>
			<pubDate>Sat, 09 Dec 2023 11:58:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>Клонирование виртуальной машины с помощью Ansible и изменение IP-адреса.</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message315463/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.">Клонирование виртуальной машины с помощью Ansible и изменение IP-адреса.</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Привет! У меня такой playbook:<br /><br />- name: Clone template<br /> &nbsp;hosts: pve2<br /> &nbsp;gather_facts: no<br /> &nbsp;vars_prompt:<br /> &nbsp; &nbsp;- name: vm_name<br /> &nbsp; &nbsp; &nbsp;prompt: "Пожалуйста, введи имя VM"<br /> &nbsp; &nbsp; &nbsp;private: false<br /> &nbsp; &nbsp;<br /> &nbsp;tasks:<br /> &nbsp; &nbsp;- name: Clone template<br /> &nbsp; &nbsp; &nbsp;community.general.proxmox_kvm:<br /> &nbsp; &nbsp; &nbsp; &nbsp;node: pve2<br /> &nbsp; &nbsp; &nbsp; &nbsp;api_user: root@pam<br /> &nbsp; &nbsp; &nbsp; &nbsp;api_password: xxxxxxx<br /> &nbsp; &nbsp; &nbsp; &nbsp;api_host: 192.168.0.195<br /> &nbsp; &nbsp; &nbsp; &nbsp;clone: TestKlon<br /> &nbsp; &nbsp; &nbsp; &nbsp;name: "{{ vm_name }}"<br /> &nbsp; &nbsp; &nbsp; &nbsp;full: false<br /> &nbsp; &nbsp; &nbsp; &nbsp;format: unspecified<br /> &nbsp; &nbsp; &nbsp; &nbsp;timeout: 500<br /> &nbsp; &nbsp;<br /> &nbsp; &nbsp;<br /> &nbsp; &nbsp;- name: Warte auf die VM-Erstellung<br /> &nbsp; &nbsp; &nbsp;pause:<br /> &nbsp; &nbsp; &nbsp; seconds: 10 &nbsp;# waiting until vm ist created<br /> &nbsp; &nbsp;<br /> &nbsp; &nbsp;- name: Update<br /> &nbsp; &nbsp; &nbsp;community.general.proxmox_kvm:<br /> &nbsp; &nbsp; &nbsp; &nbsp;node: pve2<br /> &nbsp; &nbsp; &nbsp; &nbsp;api_user: root@pam<br /> &nbsp; &nbsp; &nbsp; &nbsp;api_password: xxxxxxxxx<br /> &nbsp; &nbsp; &nbsp; &nbsp;api_host: 192.168.0.195<br /> &nbsp; &nbsp; &nbsp; &nbsp;name: "{{ vm_name }}"<br /> &nbsp; &nbsp; &nbsp; &nbsp;ipconfig:<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ipconfig0: 'ip=192.168.0.101/24,gw=192.168.0.1'<br /> &nbsp; &nbsp; &nbsp; &nbsp;update: yes<br /> &nbsp; &nbsp;<br /> &nbsp; &nbsp;- name: Start VM<br /> &nbsp; &nbsp; &nbsp;community.general.proxmox_kvm:<br /> &nbsp; &nbsp; &nbsp; &nbsp;api_user: root@pam<br /> &nbsp; &nbsp; &nbsp; &nbsp;api_password: xxxxxxxxxx<br /> &nbsp; &nbsp; &nbsp; &nbsp;api_host: 192.168.0.195<br /> &nbsp; &nbsp; &nbsp; &nbsp;node: pve2<br /> &nbsp; &nbsp; &nbsp; &nbsp;name: "{{ vm_name }}"<br /> &nbsp; &nbsp; &nbsp; &nbsp;state: started<br /><br />Привет, всё отлично работает, только IP не меняется. Шаблон — Ubuntu server, я вводил IP через netplan. Это вообще возможно или я не по пути? Ошибок или чего-то подобного нет.<br />Привет и спасибо! <br />
			<i>09.12.2023 11:18:00, Molix.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message315463/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.</link>
			<guid>http://proxmox.su/forum/messages/forum63/message315463/76416-klonirovanie-virtualnoy-mashiny-s-pomoshchyu-ansible-i-izmenenie-ip_adresa.</guid>
			<pubDate>Sat, 09 Dec 2023 11:18:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
	</channel>
</rss>
