mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
tests: Add an unattended netinst test case
This commit is contained in:
parent
cc366fff7d
commit
e859d17e1a
@ -0,0 +1,107 @@
|
|||||||
|
<domain type="kvm">
|
||||||
|
<name>foobar</name>
|
||||||
|
<uuid>00000000-1111-2222-3333-444444444444</uuid>
|
||||||
|
<metadata>
|
||||||
|
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
|
||||||
|
<libosinfo:os id="http://fedoraproject.org/fedora/26"/>
|
||||||
|
</libosinfo:libosinfo>
|
||||||
|
</metadata>
|
||||||
|
<memory>65536</memory>
|
||||||
|
<currentMemory>65536</currentMemory>
|
||||||
|
<vcpu>2</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch="x86_64" machine="q35">hvm</type>
|
||||||
|
<kernel>/TESTSUITE_KERNEL_PATH</kernel>
|
||||||
|
<initrd>/TESTSUITE_INITRD_PATH</initrd>
|
||||||
|
<cmdline>ks=file:/fedora.ks inst.repo=</cmdline>
|
||||||
|
</os>
|
||||||
|
<features>
|
||||||
|
<acpi/>
|
||||||
|
<apic/>
|
||||||
|
</features>
|
||||||
|
<cpu mode="host-model"/>
|
||||||
|
<clock offset="utc">
|
||||||
|
<timer name="rtc" tickpolicy="catchup"/>
|
||||||
|
<timer name="pit" tickpolicy="delay"/>
|
||||||
|
<timer name="hpet" present="no"/>
|
||||||
|
</clock>
|
||||||
|
<on_reboot>destroy</on_reboot>
|
||||||
|
<pm>
|
||||||
|
<suspend-to-mem enabled="no"/>
|
||||||
|
<suspend-to-disk enabled="no"/>
|
||||||
|
</pm>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||||
|
<disk type="file" device="cdrom">
|
||||||
|
<driver name="qemu"/>
|
||||||
|
<source file="/tmp/fake-f26-netinst.iso"/>
|
||||||
|
<target dev="sda" bus="sata"/>
|
||||||
|
<readonly/>
|
||||||
|
</disk>
|
||||||
|
<controller type="usb" index="0" model="qemu-xhci" ports="15"/>
|
||||||
|
<interface type="bridge">
|
||||||
|
<source bridge="testsuitebr0"/>
|
||||||
|
<mac address="00:11:22:33:44:55"/>
|
||||||
|
<model type="virtio"/>
|
||||||
|
</interface>
|
||||||
|
<console type="pty"/>
|
||||||
|
<channel type="unix">
|
||||||
|
<source mode="bind"/>
|
||||||
|
<target type="virtio" name="org.qemu.guest_agent.0"/>
|
||||||
|
</channel>
|
||||||
|
<rng model="virtio">
|
||||||
|
<backend model="random">/dev/urandom</backend>
|
||||||
|
</rng>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
||||||
|
<domain type="kvm">
|
||||||
|
<name>foobar</name>
|
||||||
|
<uuid>00000000-1111-2222-3333-444444444444</uuid>
|
||||||
|
<metadata>
|
||||||
|
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
|
||||||
|
<libosinfo:os id="http://fedoraproject.org/fedora/26"/>
|
||||||
|
</libosinfo:libosinfo>
|
||||||
|
</metadata>
|
||||||
|
<memory>65536</memory>
|
||||||
|
<currentMemory>65536</currentMemory>
|
||||||
|
<vcpu>2</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch="x86_64" machine="q35">hvm</type>
|
||||||
|
<boot dev="cdrom"/>
|
||||||
|
</os>
|
||||||
|
<features>
|
||||||
|
<acpi/>
|
||||||
|
<apic/>
|
||||||
|
</features>
|
||||||
|
<cpu mode="host-model"/>
|
||||||
|
<clock offset="utc">
|
||||||
|
<timer name="rtc" tickpolicy="catchup"/>
|
||||||
|
<timer name="pit" tickpolicy="delay"/>
|
||||||
|
<timer name="hpet" present="no"/>
|
||||||
|
</clock>
|
||||||
|
<pm>
|
||||||
|
<suspend-to-mem enabled="no"/>
|
||||||
|
<suspend-to-disk enabled="no"/>
|
||||||
|
</pm>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-kvm</emulator>
|
||||||
|
<disk type="file" device="cdrom">
|
||||||
|
<target dev="sda" bus="sata"/>
|
||||||
|
<readonly/>
|
||||||
|
</disk>
|
||||||
|
<controller type="usb" index="0" model="qemu-xhci" ports="15"/>
|
||||||
|
<interface type="bridge">
|
||||||
|
<source bridge="testsuitebr0"/>
|
||||||
|
<mac address="00:11:22:33:44:55"/>
|
||||||
|
<model type="virtio"/>
|
||||||
|
</interface>
|
||||||
|
<console type="pty"/>
|
||||||
|
<channel type="unix">
|
||||||
|
<source mode="bind"/>
|
||||||
|
<target type="virtio" name="org.qemu.guest_agent.0"/>
|
||||||
|
</channel>
|
||||||
|
<rng model="virtio">
|
||||||
|
<backend model="random">/dev/urandom</backend>
|
||||||
|
</rng>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
BIN
tests/cli-test-xml/fake-f26-netinst.iso
Executable file
BIN
tests/cli-test-xml/fake-f26-netinst.iso
Executable file
Binary file not shown.
@ -54,6 +54,7 @@ iso_links = [
|
|||||||
"/tmp/fake-centos65-label.iso",
|
"/tmp/fake-centos65-label.iso",
|
||||||
"/tmp/fake-no-osinfo.iso",
|
"/tmp/fake-no-osinfo.iso",
|
||||||
"/tmp/fake-win7.iso",
|
"/tmp/fake-win7.iso",
|
||||||
|
"/tmp/fake-f26-netinst.iso",
|
||||||
]
|
]
|
||||||
|
|
||||||
exist_files = exist_images
|
exist_files = exist_images
|
||||||
@ -83,6 +84,7 @@ test_files = {
|
|||||||
'ISOLABEL': iso_links[1],
|
'ISOLABEL': iso_links[1],
|
||||||
'ISO-NO-OS': iso_links[2],
|
'ISO-NO-OS': iso_links[2],
|
||||||
'ISO-WIN7': iso_links[3],
|
'ISO-WIN7': iso_links[3],
|
||||||
|
'ISO-F26-NETINST': iso_links[4],
|
||||||
'TREEDIR': "%s/fakefedoratree" % XMLDIR,
|
'TREEDIR': "%s/fakefedoratree" % XMLDIR,
|
||||||
'COLLIDE': "/dev/default-pool/collidevol1.img",
|
'COLLIDE': "/dev/default-pool/collidevol1.img",
|
||||||
}
|
}
|
||||||
@ -802,8 +804,10 @@ c.add_compare("--location https://foobar.com", "fake-http") # fake https:// ins
|
|||||||
c.add_compare("--connect %(URI-KVM)s --os-variant fedora26,install=location", "osinfo-url") # getting URL from osinfo
|
c.add_compare("--connect %(URI-KVM)s --os-variant fedora26,install=location", "osinfo-url") # getting URL from osinfo
|
||||||
c.add_compare("--connect %(URI-KVM)s --os-variant fedora26 --unattended profile=desktop,admin-password=foobar", "osinfo-url-unattended", prerun_check=no_osinfo_unattend_cb) # unattended install for fedora, using initrd injection
|
c.add_compare("--connect %(URI-KVM)s --os-variant fedora26 --unattended profile=desktop,admin-password=foobar", "osinfo-url-unattended", prerun_check=no_osinfo_unattend_cb) # unattended install for fedora, using initrd injection
|
||||||
c.add_compare("--connect %(URI-KVM)s --os-variant win7 --cdrom %(ISO-WIN7)s --unattended profile=desktop,admin-password=foobar", "osinfo-win7-unattended", prerun_check=no_osinfo_unattend_cb) # unattended install for win7
|
c.add_compare("--connect %(URI-KVM)s --os-variant win7 --cdrom %(ISO-WIN7)s --unattended profile=desktop,admin-password=foobar", "osinfo-win7-unattended", prerun_check=no_osinfo_unattend_cb) # unattended install for win7
|
||||||
|
c.add_compare("--connect %(URI-KVM)s --os-variant fedora26 --unattended profile=jeos,admin-password=123456 --cdrom %(ISO-F26-NETINST)s", "osinfo-netinst-unattended", prerun_check=no_osinfo_unattend_cb) # triggering the special netinst checking code
|
||||||
c.add_compare("--connect %(URI-KVM)s --os-variant silverblue29 --location http://example.com", "network-install-resources", prerun_check=no_osinfo_unattend_cb) # triggering network-install resources override
|
c.add_compare("--connect %(URI-KVM)s --os-variant silverblue29 --location http://example.com", "network-install-resources", prerun_check=no_osinfo_unattend_cb) # triggering network-install resources override
|
||||||
c.add_invalid("--pxe --virt-type bogus") # Bogus virt-type
|
c.add_invalid("--pxe --virt-type bogus") # Bogus virt-type
|
||||||
|
c.add_invalid("--pxe --virt-type bogus") # Bogus virt-type
|
||||||
c.add_invalid("--pxe --arch bogus") # Bogus arch
|
c.add_invalid("--pxe --arch bogus") # Bogus arch
|
||||||
c.add_invalid("--livecd") # LiveCD with no media
|
c.add_invalid("--livecd") # LiveCD with no media
|
||||||
c.add_invalid("--pxe --os-variant farrrrrrrge") # Bogus --os-variant
|
c.add_invalid("--pxe --os-variant farrrrrrrge") # Bogus --os-variant
|
||||||
|
Loading…
Reference in New Issue
Block a user