RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1670491 - [RFE] Enable/Disable VM autostart
Summary: [RFE] Enable/Disable VM autostart
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: cockpit-appstream
Version: 8.0
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: 8.1
Assignee: Martin Pitt
QA Contact: YunmingYang
URL:
Whiteboard:
: 1683342 (view as bug list)
Depends On: 1678935
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-29 16:41 UTC by Sachin Raje
Modified: 2020-11-14 10:37 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-05 20:41:39 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)
VM Autostart Disabled (120.40 KB, image/png)
2019-01-29 16:41 UTC, Sachin Raje
no flags Details
VM Autostart Enabled (121.49 KB, image/png)
2019-01-29 16:42 UTC, Sachin Raje
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3942711 0 Supportability None How to set VM to start on host boot through cockpit UI ? 2019-03-13 11:36:22 UTC
Red Hat Product Errata RHBA-2019:3325 0 None None None 2019-11-05 20:41:48 UTC

Description Sachin Raje 2019-01-29 16:41:13 UTC
Created attachment 1524729 [details]
VM Autostart Disabled

Description of problem:
Cannot Edit Vm "Autostart" enabled/ disabled option from host cockpit portal.


Version-Release number of selected component (if applicable):

Red Hat Enterprise Linux release 8.0 Beta (Ootpa)
cockpit-machines-184-1.el8.noarch

How reproducible:
Always


Steps to Reproduce:
1. Create a New VM from "Virtula Machines" tab of cockpit portal.
2. Under VM 'Overview' tab, Autostart always shows 'disabled'.


Actual results:
Missing the way to 'enable / disable' the VM Autostart using cockpit portal.


Expected results:
There should be an option to 'Enable / Disable' the "Autostart" option for VM from cockpit portal.

Additional info:
Virtual Machine Manager in RHEL 7 has the option to "Enable / Disable" VM Autostart option under VM "Boot Options".

Comment 1 Sachin Raje 2019-01-29 16:42:08 UTC
Created attachment 1524730 [details]
VM Autostart Enabled

Comment 2 Sachin Raje 2019-01-29 16:43:09 UTC
From command line can enable / disable the vm autostart.

For Example,

1. The VM dominfo : By default "Autostart" is Disabled.

# virsh dominfo testvm
Id:             -
Name:           testvm
UUID:           4252500d-4fe0-4c4d-beb3-6ffe55432136
OS Type:        hvm
State:          shut off
CPU(s):         1
Max memory:     2097152 KiB
Used memory:    2097152 KiB
Persistent:     yes
Autostart:      disable   <<==
Managed save:   no
Security model: selinux
Security DOI:   0



2. Enabled the "Autostart" for VM using 'virsh' command :

# virsh autostart testvm
Domain testvm marked as autostarted

# virsh dominfo testvm
Id:             -
Name:           testvm
UUID:           4252500d-4fe0-4c4d-beb3-6ffe55432136
OS Type:        hvm
State:          shut off
CPU(s):         1
Max memory:     2097152 KiB
Used memory:    2097152 KiB
Persistent:     yes
Autostart:      enable    <<==
Managed save:   no
Security model: selinux
Security DOI:   0

# ll /etc/libvirt/qemu/autostart/
total 0
lrwxrwxrwx. 1 root root 28 Jan 29 20:28 testvm.xml -> /etc/libvirt/qemu/testvm.xml


3. Disable the "Autostart" for VM using 'virsh' command :  

# virsh autostart --disable testvm
Domain testvm unmarked as autostarted

# virsh dominfo testvm
Id:             1
Name:           testvm
UUID:           4252500d-4fe0-4c4d-beb3-6ffe55432136
OS Type:        hvm
State:          running
CPU(s):         1
CPU time:       63.0s
Max memory:     2097152 KiB
Used memory:    2097152 KiB
Persistent:     yes
Autostart:      disable   <<==
Managed save:   no
Security model: selinux
Security DOI:   0
Security label: system_u:system_r:svirt_t:s0:c606,c804 (enforcing)

# ll /etc/libvirt/qemu/autostart/
total 0

Comment 3 Simon Kobyda 2019-01-30 16:18:04 UTC
Pull Request created, referencing this issue: https://github.com/cockpit-project/cockpit/pull/11083

Comment 4 Katerina Koukiou 2019-03-11 08:36:25 UTC
This was implemented by:

commit ff9c62f7bf7736a9727f6ee0d0482b174b5c7ce5
Author: skobyda <42733240+skobyda.github.com>
Date:   Fri Feb 8 13:03:55 2019 +0100

    machines: Add autostart option for VM
    
    Implementation of a simple checkbox, so user can choose whetever certain VM
    starts at the host's boot time.
    
    Closes #11083


$ git describe ff9c62f7bf7736a9727f6ee0d0482b174b5c7ce5
187-11-gff9c62f7b

Comment 5 Martin Pitt 2019-03-13 11:36:22 UTC
*** Bug 1683342 has been marked as a duplicate of this bug. ***

Comment 7 YunmingYang 2019-05-29 02:50:45 UTC
Test Versions:
cockpit-machines-193-1.el8.noarch
libvirt-dbus-1.2.0-2.module+el8.1.0+2983+b2ae9c0a.x86_64


Test Steps:
1.Check the 'Autostart' checkbox which is on the overview tab of the VM row.Then use command which is 'virsh dominfo ${vmname}' to make sure the setting has been in effect.
1.Uncheck the 'Autostart' checkbox which is on the overview tab of the VM row.Then use command which is 'virsh dominfo ${vmname}' to make sure the setting has been in effect


Test Results:
1.The option of 'Autostart' can be checked on the page, and the setting is in effect by using command which is 'virsh dominfo ${vmname}'


According to the results, The 'autostart' option can be set from the page.So move the status to VERIFIED.

Comment 9 errata-xmlrpc 2019-11-05 20:41:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:3325


Note You need to log in before you can comment on or make changes to this bug.