Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description
Can not set write policy of filesystem as immediate for lxc guest from virt-manager GUI
Version:
virt-manager-0.10.0-8.el7.noarch
How reproducible:
100%
Steps to Reproduce:
1: #virt-manager --connect lxc:///
2: open lxc guest via virt-manager,make sure the vm in shutdown status,attached the detailed steps of creating lxc guest in additional info B.
3: switch to hardware detail page,click add Hardware button
4: select Filesystem in left panel, input source path(the path of host,e.g. /tmp),input target path(the path of guest,e.g. /mnt),choose write policy as "immediate".
5: click Finish,click Apply
6: start the guest,check the xml of the guest,the write policy is "default" instead of "immediate",also write policy shows as "default" from virt-manager GUI.
# virsh -c lxc:/// dumpxml $gueset
<filesystem type='mount' accessmode='passthrough'>
<source dir='/tmp'/>
<target dir='/mnt'/>
</filesystem>
Actual results:
As description.
Expected results:
The write policy of lxc guest can be set as "immediate" from virt-manager GUI.
Additional info:
A.If I add the below line in guest xml,then boot the guest,write policy shows as "immediate" from virt-manager GUI.
<driver type='path' wrpolicy='immediate'/>
B.Attach the detailed steps to create a lxc guest.
1. add the following yum repo
#vim /etc/yum.repos.d/yum-fedora.conf
[main]
cachedir=/var/cache/yum/$basearch/$releaseverkeepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
[fedora]
name=Fedora $releasever - $basearch failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
[updates]
name=Fedora $releasever - $basearch - Updates failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/$basearch/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch
enabled=1
gpgcheck=1
2.#yum -y --nogpg --releasever=19 --config=/etc/yum.repos.d/yum-fedora.conf --installroot=/var/lib/libvirt/filesystems/f19x86_64 --disablerepo='*' --enablerepo=fedora install systemd passwd yum redhat-release vim-minimal openssh-server procps
3. #echo "pts/0" >> /var/lib/libvirt/filesystems/f19x86_64/etc/securetty
4. #vi /var/lib/libvirt/filesystems/f19x86_64/etc/pam.d/login
commnent out the following lines
#session required pam_selinux.so close
#session required pam_loginuid.so
5.add root user and the passwd.
#chroot /var/lib/libvirt/filesystems/f19x86_64 /bin/passwd root
6. Launch virt-manager
#virt-manager
7.Click "Create a new virtual machine"
8.input vm name,select "Localhost(LXC)" in "Connetion"
9.select "operating system container" and click "Forward"
10.Browse to path of rootfs.fedora,in this case is /var/lib/libvirt/filesystems/f19x86_64
11.set Memory and cpu ,and click "Forward"
12.click "Advanced options", click "Finish"
Comment 2Martin Kletzander
2013-12-10 08:01:25 UTC
I guess that's just an XML Builder triviality somewhere, could you attach debug output of virt-manager when reproducing this? Thanks.
(In reply to Martin Kletzander from comment #2)
> I guess that's just an XML Builder triviality somewhere, could you attach
> debug output of virt-manager when reproducing this? Thanks.
When adding filesystem on lxc guest,debug info will show as:
2013-12-10 16:05:12,968 (addhardware:1320): Adding device:
<filesystem>
<source dir='/tmp'/>
<target dir='/mnt'/>
</filesystem>
2013-12-10 16:05:12,982 (libvirtobject:145): Redefining 'test' with XML diff:
--- Original XML
+++ New XML
@@ -25,5 +25,9 @@
<console type="pty">
<target type="lxc" port="0"/>
</console>
+ <filesystem>
+ <source dir="/tmp"/>
+ <target dir="/mnt"/>
+ </filesystem>
</devices>
</domain>
Comment 4Giuseppe Scrivano
2013-12-10 16:08:40 UTC
this option shouldn't be modifiable for non-qemu connections. It is fixed upstream with:
commit 1ce02cc7d954069ce87bc5b330dfddf8491a1121
Author: Cole Robinson <crobinso>
Date: Sun Sep 1 20:07:46 2013 -0400
addhw: Fix FS UI for non-qemu
The patch changes other things that we wouldn't probably like to change for RHEL-7, so I am going to cherry-pick the parts that fix this particular issue.
Verified the bug according to the following steps and comments4
# rpm -qa virt-manager
virt-manager-0.10.0-11.el7.noarch
1. open lxc guest via virt-manager, switch to hardware detail page,click add Hardware button
2 select Filesystem in left panel,there's no write policy option on the GUI.
This request was resolved in Red Hat Enterprise Linux 7.0.
Contact your manager or support representative in case you have further questions about the request.
Description Can not set write policy of filesystem as immediate for lxc guest from virt-manager GUI Version: virt-manager-0.10.0-8.el7.noarch How reproducible: 100% Steps to Reproduce: 1: #virt-manager --connect lxc:/// 2: open lxc guest via virt-manager,make sure the vm in shutdown status,attached the detailed steps of creating lxc guest in additional info B. 3: switch to hardware detail page,click add Hardware button 4: select Filesystem in left panel, input source path(the path of host,e.g. /tmp),input target path(the path of guest,e.g. /mnt),choose write policy as "immediate". 5: click Finish,click Apply 6: start the guest,check the xml of the guest,the write policy is "default" instead of "immediate",also write policy shows as "default" from virt-manager GUI. # virsh -c lxc:/// dumpxml $gueset <filesystem type='mount' accessmode='passthrough'> <source dir='/tmp'/> <target dir='/mnt'/> </filesystem> Actual results: As description. Expected results: The write policy of lxc guest can be set as "immediate" from virt-manager GUI. Additional info: A.If I add the below line in guest xml,then boot the guest,write policy shows as "immediate" from virt-manager GUI. <driver type='path' wrpolicy='immediate'/> B.Attach the detailed steps to create a lxc guest. 1. add the following yum repo #vim /etc/yum.repos.d/yum-fedora.conf [main] cachedir=/var/cache/yum/$basearch/$releaseverkeepcache=0 debuglevel=2 logfile=/var/log/yum.log exactarch=1 obsoletes=1 gpgcheck=1 plugins=1 installonly_limit=3 [fedora] name=Fedora $releasever - $basearch failovermethod=priority #baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/ mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch enabled=1 metadata_expire=7d gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch [updates] name=Fedora $releasever - $basearch - Updates failovermethod=priority #baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/$basearch/ mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch enabled=1 gpgcheck=1 2.#yum -y --nogpg --releasever=19 --config=/etc/yum.repos.d/yum-fedora.conf --installroot=/var/lib/libvirt/filesystems/f19x86_64 --disablerepo='*' --enablerepo=fedora install systemd passwd yum redhat-release vim-minimal openssh-server procps 3. #echo "pts/0" >> /var/lib/libvirt/filesystems/f19x86_64/etc/securetty 4. #vi /var/lib/libvirt/filesystems/f19x86_64/etc/pam.d/login commnent out the following lines #session required pam_selinux.so close #session required pam_loginuid.so 5.add root user and the passwd. #chroot /var/lib/libvirt/filesystems/f19x86_64 /bin/passwd root 6. Launch virt-manager #virt-manager 7.Click "Create a new virtual machine" 8.input vm name,select "Localhost(LXC)" in "Connetion" 9.select "operating system container" and click "Forward" 10.Browse to path of rootfs.fedora,in this case is /var/lib/libvirt/filesystems/f19x86_64 11.set Memory and cpu ,and click "Forward" 12.click "Advanced options", click "Finish"