Skip to content

Commit

Permalink
Replace with yast qcow for independent
Browse files Browse the repository at this point in the history
  • Loading branch information
lemon-suse committed Jul 22, 2024
1 parent 1866ed8 commit caf367b
Show file tree
Hide file tree
Showing 2 changed files with 333 additions and 1 deletion.
325 changes: 325 additions & 0 deletions data/yam/autoyast/create_hdd_textmode_xen_hvm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,325 @@
<?xml version="1.0"?>
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<bootloader t="map">
<global t="map">
<cpu_mitigations>auto</cpu_mitigations>
<gfxmode>auto</gfxmode>
<hiddenmenu>false</hiddenmenu>
<os_prober>false</os_prober>
<secure_boot>true</secure_boot>
<terminal>gfxterm</terminal>
<timeout t="integer">30</timeout>
<trusted_grub>false</trusted_grub>
<update_nvram>true</update_nvram>
<xen_kernel_append>vga=gfx-1024x768x16</xen_kernel_append>
</global>
<loader_type>grub2</loader_type>
</bootloader>
<firewall t="map">
<default_zone>public</default_zone>
<enable_firewall t="boolean">true</enable_firewall>
<log_denied_packets>off</log_denied_packets>
<start_firewall t="boolean">true</start_firewall>
<zones t="list">
<zone t="map">
<description>For use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted.</description>
<interfaces t="list">
<interface>eth0</interface>
</interfaces>
<masquerade t="boolean">false</masquerade>
<name>public</name>
<ports t="list"/>
<protocols t="list"/>
<services t="list">
<service>dhcpv6-client</service>
</services>
<short>Public</short>
<target>default</target>
</zone>
</zones>
</firewall>
<general t="map">
<mode t="map">
<confirm t="boolean">false</confirm>
</mode>
</general>
<groups t="list">
<group t="map">
<gid>100</gid>
<groupname>users</groupname>
<userlist/>
</group>
</groups>
<networking t="map">
<dhcp_options t="map">
<dhclient_client_id/>
<dhclient_hostname_option>AUTO</dhclient_hostname_option>
</dhcp_options>
<dns t="map">
<dhcp_hostname t="boolean">true</dhcp_hostname>
<hostname>prg2e-d74</hostname>
<resolv_conf_policy>auto</resolv_conf_policy>
</dns>
<interfaces t="list">
<interface t="map">
<bootproto>dhcp</bootproto>
<name>eth0</name>
<startmode>auto</startmode>
<zone>public</zone>
</interface>
</interfaces>
<ipv6 t="boolean">true</ipv6>
<keep_install_network t="boolean">true</keep_install_network>
<managed t="boolean">false</managed>
<net-udev t="list">
<rule t="map">
<name>eth0</name>
<rule>ATTR{address}</rule>
<value>00:16:3e:ea:05:7c</value>
</rule>
</net-udev>
<routing t="map">
<ipv4_forward t="boolean">false</ipv4_forward>
<ipv6_forward t="boolean">false</ipv6_forward>
</routing>
</networking>
<ntp-client t="map">
<ntp_policy>auto</ntp_policy>
<ntp_servers t="list">
<ntp_server t="map">
<address>2.suse.pool.ntp.org</address>
<iburst t="boolean">true</iburst>
<offline t="boolean">false</offline>
</ntp_server>
</ntp_servers>
<ntp_sync>manual</ntp_sync>
</ntp-client>
<partitioning t="list">
<drive t="map">
<device>/dev/xvdb</device>
<disklabel>gpt</disklabel>
<enable_snapshots t="boolean">true</enable_snapshots>
<partitions t="list">
<partition t="map">
<create t="boolean">true</create>
<format t="boolean">false</format>
<partition_id t="integer">263</partition_id>
<partition_nr t="integer">1</partition_nr>
<resize t="boolean">false</resize>
<size>8388608</size>
</partition>
<partition t="map">
<create t="boolean">true</create>
<create_subvolumes t="boolean">true</create_subvolumes>
<filesystem t="symbol">btrfs</filesystem>
<format t="boolean">true</format>
<mount>/</mount>
<mountby t="symbol">uuid</mountby>
<partition_id t="integer">131</partition_id>
<partition_nr t="integer">2</partition_nr>
<quotas t="boolean">true</quotas>
<resize t="boolean">false</resize>
<size>40791703552</size>
<subvolumes t="list">
<subvolume t="map">
<copy_on_write t="boolean">false</copy_on_write>
<path>var</path>
</subvolume>
<subvolume t="map">
<copy_on_write t="boolean">true</copy_on_write>
<path>usr/local</path>
</subvolume>
<subvolume t="map">
<copy_on_write t="boolean">true</copy_on_write>
<path>tmp</path>
</subvolume>
<subvolume t="map">
<copy_on_write t="boolean">true</copy_on_write>
<path>srv</path>
</subvolume>
<subvolume t="map">
<copy_on_write t="boolean">true</copy_on_write>
<path>root</path>
</subvolume>
<subvolume t="map">
<copy_on_write t="boolean">true</copy_on_write>
<path>opt</path>
</subvolume>
<subvolume t="map">
<copy_on_write t="boolean">true</copy_on_write>
<path>home</path>
</subvolume>
<subvolume t="map">
<copy_on_write t="boolean">true</copy_on_write>
<path>boot/grub2/x86_64-efi</path>
</subvolume>
<subvolume t="map">
<copy_on_write t="boolean">true</copy_on_write>
<path>boot/grub2/i386-pc</path>
</subvolume>
</subvolumes>
<subvolumes_prefix>@</subvolumes_prefix>
</partition>
<partition t="map">
<create t="boolean">true</create>
<filesystem t="symbol">swap</filesystem>
<format t="boolean">true</format>
<mount>swap</mount>
<mountby t="symbol">uuid</mountby>
<partition_id t="integer">130</partition_id>
<partition_nr t="integer">3</partition_nr>
<resize t="boolean">false</resize>
<size>2148515328</size>
</partition>
</partitions>
<type t="symbol">CT_DISK</type>
<use>all</use>
</drive>
</partitioning>
<proxy t="map">
<enabled t="boolean">false</enabled>
</proxy>
<services-manager t="map">
<default_target>multi-user</default_target>
<services t="map">
<enable t="list">
<service>firewalld</service>
<service>wickedd-auto4</service>
<service>wickedd-dhcp4</service>
<service>wickedd-dhcp6</service>
<service>wickedd-nanny</service>
<service>kdump</service>
<service>kdump-early</service>
<service>kdump-notify</service>
<service>wicked</service>
<service>sshd</service>
<service>systemd-remount-fs</service>
</enable>
</services>
</services-manager>
<software t="map">
<install_recommended t="boolean">true</install_recommended>
<instsource/>
<packages t="list">
<package>xen-tools-domU</package>
<package>wicked</package>
<package>snapper</package>
<package>sle-module-server-applications-release</package>
<package>sle-module-python3-release</package>
<package>sle-module-basesystem-release</package>
<package>openssh</package>
<package>numactl</package>
<package>kexec-tools</package>
<package>kdump</package>
<package>irqbalance</package>
<package>grub2</package>
<package>glibc</package>
<package>firewalld</package>
<package>e2fsprogs</package>
<package>btrfsprogs</package>
<package>autoyast2</package>
</packages>
<patterns t="list">
<pattern>apparmor</pattern>
<pattern>base</pattern>
<pattern>basic_desktop</pattern>
<pattern>enhanced_base</pattern>
<pattern>minimal_base</pattern>
<pattern>x11</pattern>
<pattern>x11_yast</pattern>
<pattern>yast2_basis</pattern>
</patterns>
<products t="list">
<product>SLES</product>
</products>
</software>
<ssh_import t="map">
<copy_config t="boolean">false</copy_config>
<import t="boolean">false</import>
</ssh_import>
<suse_register t="map">
<addons t="list">
<addon t="map">
<arch>{{ARCH}}</arch>
<name>sle-module-python3</name>
<reg_code/>
<release_type>nil</release_type>
<version>{{VERSION}}</version>
</addon>
<addon t="map">
<arch>{{ARCH}}</arch>
<name>sle-module-server-applications</name>
<reg_code/>
<release_type>nil</release_type>
<version>{{VERSION}}</version>
</addon>
<addon t="map">
<arch>{{ARCH}}</arch>
<name>sle-module-basesystem</name>
<reg_code/>
<release_type>nil</release_type>
<version>{{VERSION}}</version>
</addon>
</addons>
<do_registration t="boolean">true</do_registration>
<email/>
<install_updates t="boolean">false</install_updates>
<reg_code>{{SCC_REGCODE}}</reg_code>
<reg_server>{{SCC_URL}}</reg_server>
<slp_discovery t="boolean">false</slp_discovery>
</suse_register>
<timezone t="map">
<timezone>America/New_York</timezone>
</timezone>
<user_defaults t="map">
<expire/>
<group>100</group>
<home>/home</home>
<inactive>-1</inactive>
<shell>/bin/bash</shell>
<umask>022</umask>
</user_defaults>
<users t="list">
<user t="map">
<authorized_keys t="list"/>
<encrypted t="boolean">true</encrypted>
<fullname>bernhard</fullname>
<gid>100</gid>
<home>/home/bernhard</home>
<home_btrfs_subvolume t="boolean">false</home_btrfs_subvolume>
<password_settings t="map">
<expire/>
<flag/>
<inact/>
<max>99999</max>
<min>0</min>
<warn>7</warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>1000</uid>
<user_password>$6$qpIpjatdD34jSUuu$NOrHITODtulUgtPeo4yC2E1w0i3SG0rn6bkmSgleiL5wYERnJvX658hjE0RxTjj226A/5DGMZXe2fZHLTr0.f.</user_password>
<username>bernhard</username>
</user>
<user t="map">
<authorized_keys t="list"/>
<encrypted t="boolean">true</encrypted>
<fullname>root</fullname>
<gid>0</gid>
<home>/root</home>
<home_btrfs_subvolume t="boolean">false</home_btrfs_subvolume>
<password_settings t="map">
<expire/>
<flag/>
<inact/>
<max/>
<min/>
<warn/>
</password_settings>
<shell>/bin/bash</shell>
<uid>0</uid>
<user_password>$6$iatorw/Md8iG5Zyo$Xwv8pG4TLcVDSEfOVYvQMlmIQufNHBis72m/vmg5I9mRExkWaJ8Sp4YGVSKoNsET9ScKEX1AQHsHkUr3KpFnR1</user_password>
<username>root</username>
</user>
</users>
</profile>
9 changes: 8 additions & 1 deletion tests/autoyast/installation.pm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ use scheduler 'get_test_suite_data';
use autoyast 'test_ayp_url';
use y2_logs_helper qw(upload_autoyast_profile upload_autoyast_schema);
use validate_encrypt_utils "validate_encrypted_volume_activation";
use power_action_utils 'power_action';

my $confirmed_licenses = 0;
my $stage = 'stage1';
Expand Down Expand Up @@ -127,7 +128,7 @@ sub run {
push @needles, 'autoyast-error' unless get_var('AUTOYAST_EXPECT_ERRORS');
# Autoyast reboot automatically without confirmation, usually assert 'bios-boot' that is not existing on zVM
# So push a needle to check upcoming reboot on zVM that is a way to indicate the stage done
push @needles, 'autoyast-stage1-reboot-upcoming' if is_s390x || (is_pvm && !is_upgrade);
push @needles, 'autoyast-stage1-reboot-upcoming' if is_s390x || (is_pvm && !is_upgrade) || (check_var('VIRSH_VMM_FAMILY', 'xen') && check_var('VIRSH_VMM_TYPE', 'hvm'));
# Similar situation over IPMI backend, we can check against PXE menu
push @needles, qw(prague-pxe-menu qa-net-selection) if is_ipmi and !get_var('IPXE');
# Import untrusted certification for SMT
Expand Down Expand Up @@ -320,6 +321,12 @@ sub run {
}
}

# For xen, need set hard-disk as the boot device, then reboot and connect to existing VNC.
if (check_var('VIRSH_VMM_FAMILY', 'xen') && check_var('VIRSH_VMM_TYPE', 'hvm')) {
my $svirt = console('svirt');
$svirt->change_domain_element(os => boot => {dev => 'hd'});
power_action('reboot', observe => 1, keepconsole => 1, first_reboot => 1);
}
# Cannot verify second stage properly on s390x, so reconnect to already installed system
if (is_s390x) {
reconnect_mgmt_console(timeout => 1400, grub_timeout => 360);
Expand Down

0 comments on commit caf367b

Please sign in to comment.