Commit cfee4434 authored by Joel Alarcón's avatar Joel Alarcón Committed by Francesc Guasch
Browse files

825 dist linux (#869)

* wip(feat): Linux Mint 19 added.

issue [#825].

* 825_dist_linux: wip(feat): Alpine xml added. issue [#825].

* 825_dist_linux: wip(fix): minor changes. issue [#825]

* 825_dist_linux: feat: Alpine machines implemented. issue [#825]

* 825_dist_linux: feat:Mint machines implemented. issue [#825]

* 825_dist_linux: fix: Renamed mint19 and alpine381. issue [#825]

* wip(downloads): improve description and file_re for Mint and Alpine

It is better plan ahead and have file_re less specific.
With \d+ it will download future releases like 3.8.2 and
whatever

issue #869

* 825_dist_linux: fix: Substitute md5 for sha256. Issue [#825].

* wip(frontend): Alpine minimun disk is only 1

issue #825
parent a382ee3a
<domain type='kvm'>
<name>alpine_64</name>
<uuid>a289e5a7-77c8-4447-b21e-177105598ec6</uuid>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu placement='static'>1</vcpu>
<resource>
<partition>/machine</partition>
</resource>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
</os>
<features>
<acpi/>
<apic/>
<vmport state='off'/>
</features>
<cpu mode='custom' match='exact' check='full'>
<model fallback='forbid'>Penryn</model>
<feature policy='require' name='vme'/>
<feature policy='require' name='x2apic'/>
<feature policy='require' name='hypervisor'/>
</cpu>
<clock offset='utc'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='no'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<pm>
<suspend-to-mem enabled='no'/>
<suspend-to-disk enabled='no'/>
</pm>
<devices>
<emulator>/usr/bin/kvm-spice</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/alpine_64.img'/>
<backingStore/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
<boot order='1'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/alpine-standard-3.8.1-x86_64.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' target='0' unit='0'/>
<boot order='2'/>
</disk>
<controller type='usb' index='0' model='ich9-ehci1'>
<alias name='usb'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci1'>
<alias name='usb'/>
<master startport='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci2'>
<alias name='usb'/>
<master startport='2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci3'>
<alias name='usb'/>
<master startport='4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'>
<alias name='pci.0'/>
</controller>
<controller type='ide' index='0'>
<alias name='ide'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='virtio-serial' index='0'>
<alias name='virtio-serial0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</controller>
<interface type='network'>
<mac address='52:54:00:c2:a0:0b'/>
<source network='default' bridge='virbr0'/>
<target dev='vnet0'/>
<model type='rtl8139'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/1'/>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
<alias name='serial0'/>
</serial>
<console type='pty' tty='/dev/pts/1'>
<source path='/dev/pts/1'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
<channel type='spicevmc'>
<target type='virtio' name='com.redhat.spice.0' state='disconnected'/>
<alias name='channel0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
<input type='mouse' bus='ps2'>
<alias name='input0'/>
</input>
<input type='keyboard' bus='ps2'>
<alias name='input1'/>
</input>
<graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
<image compression='off'/>
</graphics>
<sound model='ich6'>
<alias name='sound0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<video>
<model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
<alias name='video0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<redirdev bus='usb' type='spicevmc'>
<alias name='redir0'/>
<address type='usb' bus='0' port='1'/>
</redirdev>
<redirdev bus='usb' type='spicevmc'>
<alias name='redir1'/>
<address type='usb' bus='0' port='2'/>
</redirdev>
<memballoon model='virtio'>
<alias name='balloon0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</memballoon>
</devices>
<seclabel type='dynamic' model='apparmor' relabel='yes'>
<label>libvirt-a289e5a7-77c8-4447-b21e-177105598ec6</label>
<imagelabel>libvirt-a289e5a7-77c8-4447-b21e-177105598ec6</imagelabel>
</seclabel>
<seclabel type='dynamic' model='dac' relabel='yes'>
<label>+64055:+130</label>
<imagelabel>+64055:+130</imagelabel>
</seclabel>
</domain>
<domain type='kvm'>
<name>alpine_32</name>
<uuid>9d9d5321-57ba-49e7-8340-2c015c7e206f</uuid>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
</os>
<features>
<acpi/>
<apic/>
<vmport state='off'/>
</features>
<cpu mode='custom' match='exact' check='partial'>
<model fallback='allow'>Penryn</model>
</cpu>
<clock offset='utc'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='no'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<pm>
<suspend-to-mem enabled='no'/>
<suspend-to-disk enabled='no'/>
</pm>
<devices>
<emulator>/usr/bin/kvm-spice</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/alpine_32.img'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
<boot order='1'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/alpine-standard-3.8.1-x86.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' target='0' unit='0'/>
<boot order='2'/>
</disk>
<controller type='usb' index='0' model='ich9-ehci1'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci1'>
<master startport='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci2'>
<master startport='2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci3'>
<master startport='4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</controller>
<interface type='network'>
<mac address='52:54:00:3b:11:8a'/>
<source network='default'/>
<model type='rtl8139'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<channel type='spicevmc'>
<target type='virtio' name='com.redhat.spice.0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='spice' autoport='yes'>
<listen type='address'/>
<image compression='off'/>
</graphics>
<sound model='ich6'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<video>
<model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<redirdev bus='usb' type='spicevmc'>
<address type='usb' bus='0' port='1'/>
</redirdev>
<redirdev bus='usb' type='spicevmc'>
<address type='usb' bus='0' port='2'/>
</redirdev>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</memballoon>
</devices>
</domain>
<volume type='file'>
<name>__name__.img</name>
<key>/var/lib/libvirt/images/__name__.img</key>
<source>
</source>
<capacity unit='bytes'>21474836480</capacity>
<allocation unit='bytes'>3485696</allocation>
<physical unit='bytes'>21478375424</physical>
<target>
<path>/var/lib/libvirt/images/__name__.img</path>
<format type='qcow2'/>
<permissions>
<mode>0600</mode>
<owner>0</owner>
<group>0</group>
</permissions>
<timestamps>
<atime>1538407038.168298505</atime>
<mtime>1538406915.308849295</mtime>
<ctime>1538407050.036621775</ctime>
</timestamps>
<compat>1.1</compat>
<features>
<lazy_refcounts/>
</features>
</target>
</volume>
<volume type='file'>
<name>__name__.img</name>
<key>/var/lib/libvirt/images/__name__.img</key>
<source>
</source>
<capacity unit='bytes'>21474836480</capacity>
<allocation unit='bytes'>3485696</allocation>
<physical unit='bytes'>21478375424</physical>
<target>
<path>/var/lib/libvirt/images/__name__.img</path>
<format type='qcow2'/>
<permissions>
<mode>0600</mode>
<owner>64055</owner>
<group>130</group>
</permissions>
<timestamps>
<atime>1538405758.143642388</atime>
<mtime>1538405721.414908071</mtime>
<ctime>1538405757.419627935</ctime>
</timestamps>
<compat>1.1</compat>
<features>
<lazy_refcounts/>
</features>
</target>
</volume>
<domain type='kvm'>
<name>mint19_32</name>
<uuid>0c78e190-9883-4fe5-bb09-342068a0f998</uuid>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc-i440fx-bionic'>hvm</type>
</os>
<features>
<acpi/>
<apic/>
<vmport state='off'/>
</features>
<cpu mode='custom' match='exact' check='partial'>
<model fallback='allow'>Penryn</model>
</cpu>
<clock offset='utc'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='no'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<pm>
<suspend-to-mem enabled='no'/>
<suspend-to-disk enabled='no'/>
</pm>
<devices>
<emulator>/usr/bin/kvm-spice</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/mint19_32.img'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
<boot order='1'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/linuxmint-19-mate-32bit.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' target='0' unit='0'/>
<boot order='2'/>
</disk>
<controller type='usb' index='0' model='ich9-ehci1'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci1'>
<master startport='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci2'>
<master startport='2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci3'>
<master startport='4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</controller>
<interface type='network'>
<mac address='52:54:00:30:5c:db'/>
<source network='default'/>
<model type='rtl8139'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<channel type='spicevmc'>
<target type='virtio' name='com.redhat.spice.0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='spice' autoport='yes'>
<listen type='address'/>
<image compression='off'/>
</graphics>
<sound model='ich6'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<video>
<model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<redirdev bus='usb' type='spicevmc'>
<address type='usb' bus='0' port='1'/>
</redirdev>
<redirdev bus='usb' type='spicevmc'>
<address type='usb' bus='0' port='2'/>
</redirdev>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</memballoon>
</devices>
</domain>
<volume type='file'>
<name>__name__.img</name>
<key>/var/lib/libvirt/images/__name__.img</key>
<source>
</source>
<capacity unit='bytes'>21474836480</capacity>
<allocation unit='bytes'>8119472128</allocation>
<physical unit='bytes'>21478375424</physical>
<target>
<path>/var/lib/libvirt/images/__name__.img</path>
<format type='qcow2'/>
<permissions>
<mode>0600</mode>
<owner>0</owner>
<group>0</group>
</permissions>
<timestamps>
<atime>1537976862.260775695</atime>
<mtime>1537976613.094724755</mtime>
<ctime>1537976622.843928663</ctime>
</timestamps>
<compat>1.1</compat>
<features>
<lazy_refcounts/>
</features>
</target>
</volume>
......@@ -251,6 +251,70 @@ sub _update_isos {
,min_disk_size => '10'
}
,mint19_64 => {
name => 'Mint 19 Mate 64 bits'
,description => 'Mint Tara 19 with Mate Desktop 64 bits'
,arch => 'amd64'
,xml => 'xenial64-amd64.xml'
,xml_volume => 'xenial64-volume.xml'
,url => 'http://ftp.cixug.es/mint/linuxmint.com/stable/19/'
,file_re => 'linuxmint-19-mate-64bit-v2.iso'
,sha256_url => 'http://ftp.cixug.es/mint/linuxmint.com/stable/19/sha256sum.txt'
,min_disk_size => '15'
}
,mint19_32 => {
name => 'Mint 19 Mate 32 bits'
,description => 'Mint Tara 19 with Mate Desktop 32 bits'
,arch => 'i386'
,xml => 'mint19-i386.xml'
,xml_volume => 'mint19_32-volume.xml'
,url => 'http://ftp.cixug.es/mint/linuxmint.com/stable/19/'
,file_re => 'linuxmint-19-mate-32bit.iso'
,sha256_url => 'http://ftp.cixug.es/mint/linuxmint.com/stable/19/sha256sum.txt'
,min_disk_size => '15'
}
,alpine381_64 => {
name => 'Alpine 3.8 64 bits'
,description => 'Alpine Linux 3.8 64 bits ( Minimal Linux Distribution )'
,arch => 'amd64'
,xml => 'alpine-amd64.xml'
,xml_volume => 'alpine381_64-volume.xml'
,url => 'http://dl-cdn.alpinelinux.org/alpine/v3.8/releases/x86_64/'
,file_re => 'alpine-standard-3.8.1-x86_64.iso'
,sha256_url => 'http://dl-cdn.alpinelinux.org/alpine/v3.8/releases/x86_64/alpine-standard-3.8.1-x86_64.iso.sha256'
,min_disk_size => '1'
}
,alpine381_32 => {
name => 'Alpine 3.8 32 bits'
,description => 'Alpine Linux 3.8 32 bits ( Minimal Linux Distribution )'
,arch => 'i386'
,xml => 'alpine-i386.xml'
,xml_volume => 'alpine381_32-volume.xml'
,url => 'http://dl-cdn.alpinelinux.org/alpine/v3.8/releases/x86/'
,file_re => 'alpine-standard-3.8.1-x86.iso'
,sha256_url => 'http://dl-cdn.alpinelinux.org/alpine/v3.8/releases/x86/alpine-standard-3.8.1-x86.iso.sha256'
,min_disk_size => '1'
}
,fedora => {
name => 'Fedora 25'
,description => 'RedHat Fedora 25 Workstation 64 bits'
,url => 'http://ftp.halifax.rwth-aachen.de/fedora/linux/releases/25/Workstation/x86_64/iso/Fedora-Workstation-netinst-x86_64-25-.*\.iso'
,arch => 'amd64'
,xml => 'xenial64-amd64.xml'
,xml_volume => 'xenial64-volume.xml'
,sha256_url => '$url/Fedora-Workstation-25-.*-x86_64-CHECKSUM'
,min_disk_size => '10'
}
,fedora_26 => {
name => 'Fedora 26'
,description => 'RedHat Fedora 26 Workstation 64 bits'
,url => 'http://ftp.halifax.rwth-aachen.de/fedora/linux/releases/26/Workstation/x86_64/iso/Fedora-Workstation-netinst-x86_64-26-.*\.iso'
,arch => 'amd64'
,xml => 'xenial64-amd64.xml'
,xml_volume => 'xenial64-volume.xml'
,sha256_url => '$url/Fedora-Workstation-26-.*-x86_64-CHECKSUM'
,min_disk_size => '10'
}
,fedora_27 => {
name => 'Fedora 27'
,description => 'RedHat Fedora 27 Workstation 64 bits'
......@@ -2402,32 +2466,32 @@ sub _cmd_download {
sub _cmd_add_hardware {
my $self = shift;
my $request = shift;
my $uid = $request->args('uid');
my $hardware = $request->args('name') or confess "Missing argument name";
my $id_domain = $request->defined_arg('id_domain') or confess "Missing argument id_domain";
my $number = $request->args('number');
my $domain = $self->search_domain_by_id($id_domain);
my $user = Ravada::Auth::SQL->search_by_id($uid);
$domain->set_controller($hardware, $number);
}
sub _cmd_remove_hardware {
my $self = shift;
my $request = shift;
my $uid = $request->args('uid');
my $hardware = $request->args('name') or confess "Missing argument name";
my $id_domain = $request->defined_arg('id_domain') or confess "Missing argument id_domain";
my $index = $request->args('index');
my $domain = $self->search_domain_by_id($id_domain);
my $user = Ravada::Auth::SQL->search_by_id($uid);
$domain->remove_controller($hardware, $index);
}
......@@ -2592,7 +2656,7 @@ sub _cmd_change_max_memory($self, $request) {
my $uid = $request->args('uid');
my $id_domain = $request->args('id_domain');
my $memory = $request->args('ram');
my $domain = $self->search_domain_by_id($id_domain);
$domain->set_max_mem($memory);
}
......@@ -2601,7 +2665,7 @@ sub _cmd_change_curr_memory($self, $request) {
my $uid = $request->args('uid');
my $id_domain = $request->args('id_domain');
my $memory = $request->args('ram');
my $domain = $self->search_domain_by_id($id_domain);
$domain->set_memory($memory);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment