Thank you very much, Galina. It works fine. Now it could be fine to add the
network driver too.
2010/5/4 Galia Lisovskaya <inbox(a)shaggy-cat.ru>
Hi all!
I make patch for koan to provide virtio/ide switch KVM driver support
in deployment process.
src.rpm is avaible:
http://dw.ha-systems.ru/cobbler/
This rpm include my patch.
I'ts my first public code on Python, please don't angry :)
Deployment process with patched koan:
===============================
koan --qemu-disk-type=virtio --virt-type=qemu --virt
--virt-path=/dev/kvm-test01/vm05 --virt-bridge=virbr1 --system=vm05
--server=cobbler01.int.ha-systems.ru
- looking for Cobbler at
http://cobbler01.int.ha-systems.ru/cobbler_api
- reading URL:
http://10.0.5.25/cblr/svc/op/ks/system/vm05
install_tree:
http://10.0.5.25:80/cblr/links/Centos-54-i386
libvirtd (pid 2450) выполняется...
- using qemu hypervisor, type=kvm
Tue, 04 May 2010 05:59:03 DEBUG No conn passed to Guest, opening
URI 'qemu:///system'
Tue, 04 May 2010 05:59:03 DEBUG DistroInstaller location is a network
source.
libvir: QEMU error : Domain not found: no domain with matching name 'vm05'
- adding disk: /dev/kvm-test01/vm05 of size 20 SSSS!!!SSSS
Tue, 04 May 2010 05:59:03 DEBUG Setting size for existing storage
to '14.65625'
Tue, 04 May 2010 05:59:03 DEBUG Detected storage as type 'block'
libvir: QEMU error : Domain not found: no domain with matching uuid
'iDA$��Ȑ�균��▒s'
Tue, 04 May 2010 05:59:03 DEBUG Attempting to detect distro:
Tue, 04 May 2010 05:59:03 DEBUG Fetching URI:
http://10.0.5.25:80/cblr/links/Centos-54-i386/.treeinfo
Tue, 04 May 2010 05:59:03 DEBUG Saved file to
/var/lib/libvirt/boot/virtinst-.treeinfo.hgyMVA
Tue, 04 May 2010 05:59:03 DEBUG Fetching URI:
http://10.0.5.25:80/cblr/links/Centos-54-i386/images/pxeboot/vmlinuz
Tue, 04 May 2010 05:59:04 DEBUG Saved file to
/var/lib/libvirt/boot/virtinst-vmlinuz.BRTxQ5
Tue, 04 May 2010 05:59:04 DEBUG Fetching URI:
http://10.0.5.25:80/cblr/links/Centos-54-i386/images/pxeboot/initrd.img
Tue, 04 May 2010 05:59:04 DEBUG Saved file to
/var/lib/libvirt/boot/virtinst-initrd.img.UUUzaT
libvir: QEMU error : Domain not found: no domain with matching name 'vm05'
Tue, 04 May 2010 05:59:04 DEBUG Creating guest from:
<domain type='kvm'>
<name>vm05</name>
<currentMemory>524288</currentMemory>
<memory>524288</memory>
<uuid>69444124-a8e6-c890-8dea-b7a080a91873</uuid>
<os>
<type>hvm</type>
<kernel>/var/lib/libvirt/boot/virtinst-vmlinuz.BRTxQ5</kernel>
<initrd>/var/lib/libvirt/boot/virtinst-initrd.img.UUUzaT</initrd>
<cmdline>method=http://10.0.5.25:80/cblr/links/Centos-54-i386/
ks=http://10.0.5.25/cblr/svc/op/ks/system/vm05<http://10.0.5.25:80/cblr/links/Centos-54-i386/%0Aks=http://10.0.5.25/cblr/svc/op/ks/system/vm05>ksdevice=link
kssendmac
lang= text </cmdline>
</os>
<features>
<acpi/><apic/><pae/>
</features>
<clock offset="utc"/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<vcpu>1</vcpu>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<console type='pty'/>
<disk type='block' device='disk'>
<source dev='/dev/kvm-test01/vm05'/>
<target dev='vda' bus='virtio'/>
</disk>
<interface type='bridge'>
<source bridge='virbr1'/>
<mac address='00:16:3e:42:e3:46'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' keymap='en-us'/>
</devices>
</domain>
Tue, 04 May 2010 05:59:06 DEBUG Created guest, looking to see if it
is running
Tue, 04 May 2010 05:59:06 DEBUG Saving XML boot config:
<domain type='kvm'>
<name>vm05</name>
<currentMemory>524288</currentMemory>
<memory>524288</memory>
<uuid>69444124-a8e6-c890-8dea-b7a080a91873</uuid>
<os>
<type>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/><apic/><pae/>
</features>
<clock offset="utc"/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<vcpu>1</vcpu>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<console type='pty'/>
<disk type='block' device='disk'>
<source dev='/dev/kvm-test01/vm05'/>
<target dev='vda' bus='virtio'/>
</disk>
<interface type='bridge'>
<source bridge='virbr1'/>
<mac address='00:16:3e:42:e3:46'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' keymap='en-us'/>
</devices>
</domain>
Tue, 04 May 2010 05:59:06 DEBUG Removing
/var/lib/libvirt/boot/virtinst-vmlinuz.BRTxQ5
Tue, 04 May 2010 05:59:06 DEBUG Removing
/var/lib/libvirt/boot/virtinst-initrd.img.UUUzaT
use virt-manager and connect to qemu to manage guest: vm05
==================
By default, use default settings of python-virtinstall (on my system
is ide bus driver):
[root@kvm-test01 koan]# koan --qemu-disk-type=ide --virt-type=qemu
--virt --virt-path=/dev/kvm-test01/vm04a --virt-bridge=virbr1
--system=vm04 --server=cobbler01.int.ha-systems.ru
- looking for Cobbler at
http://cobbler01.int.ha-systems.ru/cobbler_api
- reading URL:
http://10.0.5.25/cblr/svc/op/ks/system/vm04
install_tree:
http://10.0.5.25:80/cblr/links/Centos-54-i386
libvirtd (pid 2450) выполняется...
- using qemu hypervisor, type=kvm
Tue, 04 May 2010 06:37:21 DEBUG No conn passed to Guest, opening
URI 'qemu:///system'
Tue, 04 May 2010 06:37:21 DEBUG DistroInstaller location is a network
source.
libvir: QEMU error : Domain not found: no domain with matching name 'vm04'
- adding disk: /dev/kvm-test01/vm04a of size 0 SSSS!!!SSSS
Tue, 04 May 2010 06:37:21 DEBUG Setting size for existing storage
to '14.65625'
Tue, 04 May 2010 06:37:21 DEBUG Detected storage as type 'block'
libvir: QEMU error : Domain not found: no domain with matching uuid
'0�؇K-{�J`N
�n�'
Tue, 04 May 2010 06:37:21 DEBUG Attempting to detect distro:
Tue, 04 May 2010 06:37:21 DEBUG Fetching URI:
http://10.0.5.25:80/cblr/links/Centos-54-i386/.treeinfo
Tue, 04 May 2010 06:37:21 DEBUG Saved file to
/var/lib/libvirt/boot/virtinst-.treeinfo.12CfTa
Tue, 04 May 2010 06:37:21 DEBUG Fetching URI:
http://10.0.5.25:80/cblr/links/Centos-54-i386/images/pxeboot/vmlinuz
Tue, 04 May 2010 06:37:21 DEBUG Saved file to
/var/lib/libvirt/boot/virtinst-vmlinuz.YD9gN9
Tue, 04 May 2010 06:37:21 DEBUG Fetching URI:
http://10.0.5.25:80/cblr/links/Centos-54-i386/images/pxeboot/initrd.img
Tue, 04 May 2010 06:37:22 DEBUG Saved file to
/var/lib/libvirt/boot/virtinst-initrd.img.h0cJ0M
libvir: QEMU error : Domain not found: no domain with matching name 'vm04'
Tue, 04 May 2010 06:37:22 DEBUG Creating guest from:
<domain type='kvm'>
<name>vm04</name>
<currentMemory>524288</currentMemory>
<memory>524288</memory>
<uuid>30a7d887-4b2d-7be2-4a60-4e0be26efc0e</uuid>
<os>
<type>hvm</type>
<kernel>/var/lib/libvirt/boot/virtinst-vmlinuz.YD9gN9</kernel>
<initrd>/var/lib/libvirt/boot/virtinst-initrd.img.h0cJ0M</initrd>
<cmdline>method=http://10.0.5.25:80/cblr/links/Centos-54-i386/
ks=http://10.0.5.25/cblr/svc/op/ks/system/vm04<http://10.0.5.25:80/cblr/links/Centos-54-i386/%0Aks=http://10.0.5.25/cblr/svc/op/ks/system/vm04>ksdevice=link
kssendmac
lang= text </cmdline>
</os>
<features>
<acpi/><apic/><pae/>
</features>
<clock offset="utc"/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<vcpu>1</vcpu>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<console type='pty'/>
<disk type='block' device='disk'>
<source dev='/dev/kvm-test01/vm04a'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='bridge'>
<source bridge='virbr1'/>
<mac address='00:95:12:7e:ee:71'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' keymap='en-us'/>
</devices>
</domain>
Tue, 04 May 2010 06:37:23 DEBUG Created guest, looking to see if it
is running
Tue, 04 May 2010 06:37:23 DEBUG Saving XML boot config:
<domain type='kvm'>
<name>vm04</name>
<currentMemory>524288</currentMemory>
<memory>524288</memory>
<uuid>30a7d887-4b2d-7be2-4a60-4e0be26efc0e</uuid>
<os>
<type>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/><apic/><pae/>
</features>
<clock offset="utc"/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<vcpu>1</vcpu>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<console type='pty'/>
<disk type='block' device='disk'>
<source dev='/dev/kvm-test01/vm04a'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='bridge'>
<source bridge='virbr1'/>
<mac address='00:95:12:7e:ee:71'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' keymap='en-us'/>
</devices>
</domain>
Tue, 04 May 2010 06:37:23 DEBUG Removing
/var/lib/libvirt/boot/virtinst-vmlinuz.YD9gN9
Tue, 04 May 2010 06:37:23 DEBUG Removing
/var/lib/libvirt/boot/virtinst-initrd.img.h0cJ0M
use virt-manager and connect to qemu to manage guest: vm04
[root@kvm-test01 koan]# Puppet
bash: Puppet: команда не найдена
[root@kvm-test01 koan]#
[root@kvm-test01 koan]#
http://docs.reductivelabs.com/
bash:
http://docs.reductivelabs.com/: Нет такого файла или каталога
[root@kvm-test01 koan]#
[root@kvm-test01 koan]#
http://docs.reductivelabs.com/references/0.24.8/
bash:
http://docs.reductivelabs.com/references/0.24.8/: Нет такого
файла или каталога
[root@kvm-test01 koan]#
===========================
[root@kvm-test01 koan]# koan --qemu-disk-type=ide --virt-type=xen
--virt --virt-path=/dev/kvm-test01/vm04a --virt-bridge=virbr1
--system=vm04 --server=cobbler01.int.ha-systems.ru
- looking for Cobbler at
http://cobbler01.int.ha-systems.ru/cobbler_api
--qemu-disk-type<http://cobbler01.int.ha-systems.ru/cobbler_api%0A--qemu-disk-type>must
use with --virt-type=qemu
[root@kvm-test01 koan]#
==========================
[root@kvm-test01 koan]# koan --virt --virt-path=/dev/kvm-test01/vm04a
--virt-bridge=virbr1 --system=vm04
--server=cobbler01.int.ha-systems.ru
- looking for Cobbler at
http://cobbler01.int.ha-systems.ru/cobbler_api
- reading URL:
http://10.0.5.25/cblr/svc/op/ks/system/vm04
install_tree:
http://10.0.5.25:80/cblr/links/Centos-54-i386
libvirtd (pid 2450) выполняется...
- using qemu hypervisor, type=kvm
Tue, 04 May 2010 06:39:13 DEBUG No conn passed to Guest, opening
URI 'qemu:///system'
Tue, 04 May 2010 06:39:13 DEBUG DistroInstaller location is a network
source.
libvir: QEMU error : Domain not found: no domain with matching name 'vm04'
- adding disk: /dev/kvm-test01/vm04a of size 0 SSSS!!!SSSS
Tue, 04 May 2010 06:39:13 DEBUG Setting size for existing storage
to '14.65625'
Tue, 04 May 2010 06:39:13 DEBUG Detected storage as type 'block'
libvir: QEMU error : Domain not found: no domain with matching uuid
'�GIE��?,H�,�,��'
Tue, 04 May 2010 06:39:13 DEBUG Attempting to detect distro:
Tue, 04 May 2010 06:39:13 DEBUG Fetching URI:
http://10.0.5.25:80/cblr/links/Centos-54-i386/.treeinfo
Tue, 04 May 2010 06:39:13 DEBUG Saved file to
/var/lib/libvirt/boot/virtinst-.treeinfo.SO_cRy
Tue, 04 May 2010 06:39:13 DEBUG Fetching URI:
http://10.0.5.25:80/cblr/links/Centos-54-i386/images/pxeboot/vmlinuz
Tue, 04 May 2010 06:39:13 DEBUG Saved file to
/var/lib/libvirt/boot/virtinst-vmlinuz.OgiqyM
Tue, 04 May 2010 06:39:13 DEBUG Fetching URI:
http://10.0.5.25:80/cblr/links/Centos-54-i386/images/pxeboot/initrd.img
Tue, 04 May 2010 06:39:14 DEBUG Saved file to
/var/lib/libvirt/boot/virtinst-initrd.img.6H_e3s
libvir: QEMU error : Domain not found: no domain with matching name 'vm04'
Tue, 04 May 2010 06:39:14 DEBUG Creating guest from:
<domain type='kvm'>
<name>vm04</name>
<currentMemory>524288</currentMemory>
<memory>524288</memory>
<uuid>fe474945-13b6-853f-2c48-c92cb22cba89</uuid>
<os>
<type>hvm</type>
<kernel>/var/lib/libvirt/boot/virtinst-vmlinuz.OgiqyM</kernel>
<initrd>/var/lib/libvirt/boot/virtinst-initrd.img.6H_e3s</initrd>
<cmdline>method=http://10.0.5.25:80/cblr/links/Centos-54-i386/
ks=http://10.0.5.25/cblr/svc/op/ks/system/vm04<http://10.0.5.25:80/cblr/links/Centos-54-i386/%0Aks=http://10.0.5.25/cblr/svc/op/ks/system/vm04>ksdevice=link
kssendmac
lang= text </cmdline>
</os>
<features>
<acpi/><apic/><pae/>
</features>
<clock offset="utc"/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<vcpu>1</vcpu>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<console type='pty'/>
<disk type='block' device='disk'>
<source dev='/dev/kvm-test01/vm04a'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='bridge'>
<source bridge='virbr1'/>
<mac address='00:95:12:7e:ee:71'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' keymap='en-us'/>
</devices>
</domain>
Tue, 04 May 2010 06:39:15 DEBUG Created guest, looking to see if it
is running
Tue, 04 May 2010 06:39:15 DEBUG Saving XML boot config:
<domain type='kvm'>
<name>vm04</name>
<currentMemory>524288</currentMemory>
<memory>524288</memory>
<uuid>fe474945-13b6-853f-2c48-c92cb22cba89</uuid>
<os>
<type>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/><apic/><pae/>
</features>
<clock offset="utc"/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<vcpu>1</vcpu>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<console type='pty'/>
<disk type='block' device='disk'>
<source dev='/dev/kvm-test01/vm04a'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='bridge'>
<source bridge='virbr1'/>
<mac address='00:95:12:7e:ee:71'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' keymap='en-us'/>
</devices>
</domain>
Tue, 04 May 2010 06:39:15 DEBUG Removing
/var/lib/libvirt/boot/virtinst-vmlinuz.OgiqyM
Tue, 04 May 2010 06:39:15 DEBUG Removing
/var/lib/libvirt/boot/virtinst-initrd.img.6H_e3s
use virt-manager and connect to qemu to manage guest: vm04
[root@kvm-test01 koan]#
========================
--
Galina Lisovskaya
_______________________________________________
cobbler mailing list
cobbler(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler