hi,
Should someone faced with this before, please let me know.
ISSUE
virt-install works well when passing arguments --cdrom /path/to/iso (and it creates the guest)
when those 2 commands using working http and ftp repository*it just hangs
[root@192-168-0-101 ~]# virt-install --name tester2 --location
ftp://localhost/pub/inst --memory 3096 --disk path=/var/lib/libvirt/images/tester2.qcow2,size=20 *--os-variant rhel8.1 --extra-args "ftp://localhost/pub/inst/anaconda-ks.cfg" &
same it hangs with
[root@192-168-0-101 ~]# virt-install --name tester2 --location
http://localhost/inst --memory 3096 --disk path=/var/lib/libvirt/images/tester2.qcow2,size=20 *--os-variant rhel8.1 --extra-args "http://localhost/inst/anaconda-ks.cfg" &
the guest just created stops at [ ok ] reached target basic system
and then dracut times out after a while having the following sequence:
dracut-initqueue[941]: Warning:
dracut-initqueue timeout - starting timeout scripts
dracut-initqueue[941]: Warning: could not boot[ ok ]
Starting setup virtual console
Starting emergency shell ...
Reached target emergency modeWarning: /dev/root/ does not exists
Generating "/run/initramfs/rdsosreport.txt"
The GUI of the virtual console of the client doesn't create and it hangs.
CONDITIONS
version Centos 8.1
cat /etc/*release|grep rel
CentOS Linux release 8.1.1911 (Core)
selinux disabled or enabled on http or ftp repos has the same effect.
Code:
[root@192-168-0-101 admin]# firewall-cmd --zone=public --list-all
public (active)
* target: default
* icmp-block-inversion: no
* interfaces: wlp3s0
* sources:
* services: cockpit dhcpv6-client ftp http ssh
* ports: 80/tcp 21/tcp 20/tcp 443/tcp
* protocols:
* masquerade: no
* forward-ports:
* source-ports:
* icmp-blocks:
* rich rules:
[root@192-168-0-101 admin]# firewall-cmd --zone=libvirt --list-all
libvirt
[root@192-168-0-101 admin]# firewall-cmd --zone=libvirt --list-all
libvirt
[root@192-168-0-101 admin]# firewall-cmd --zone=libvirt --list-all
libvirt (active)
* target: ACCEPT
* icmp-block-inversion: no
* interfaces: virbr0 virbr1
* sources:
* services: dhcp dhcpv6 dns ssh tftp
* ports: 80/tcp 20/tcp 21/tcp 443/tcp
* protocols: icmp ipv6-icmp
* masquerade: no
* forward-ports:
* source-ports:
* icmp-blocks:
* rich rules:
rule priority="32767" reject
[root@192-168-0-101 admin]#
onfined_u:object_r:httpd_user_ra_content_t:s0
/etc/selinux/targeted/contexts/files/file_contexts.homedirs:/home/[^/]+/public_git(/.*)? unconfined_u:object_r:git_user_content_t:s0
/etc/selinux/targeted/contexts/files/file_contexts.local:/var/ftp/pub * *system_u:object_r:public_content_t:s0
/etc/selinux/targeted/contexts/files/file_contexts.local:/var/ftp/ * *system_u:object_r:public_content_t:s0
Binary file /etc/selinux/targeted/contexts/files/file_contexts.bin matches
Binary file /etc/selinux/targeted/contexts/files/file_contexts.homedirs.bin matches
Binary file /etc/selinux/targeted/contexts/files/file_contexts.local.bin matches
Binary file /etc/selinux/targeted/policy/policy.31 matches
[root@192-168-0-101 admin]# grep -i -R public /etc/selinux/
[root@192-168-0-101 admin]# ll -aZ /var/ftp/
total 4
drwxr-xr-x. *3 root root system_u:object_r:public_content_t:s0 * 17 May 14 *2019 .
drwxr-xr-x. 22 root root system_u:object_r:var_t:s0 * * * * * *4096 Mar 26 22:55 ..
dr-xr-xr-x. *3 root root system_u:object_r:public_content_t:s0 * 52 Apr 14 11:47 pub
[root@192-168-0-101 admin]#
*chcon -R -t public_content_t /var/ftp/
[root@192-168-0-101 admin]#
[root@192-168-0-101 admin]#
[root@192-168-0-101 admin]#
[root@192-168-0-101 admin]#
[root@192-168-0-101 admin]# ll -aZ /var/ftp/pub/
total 8
dr-xr-xr-x. 3 root *root *system_u:object_r:public_content_t:s0 * 52 Apr 14 11:47 .
drwxr-xr-x. 3 root *root *system_u:object_r:public_content_t:s0 * 17 May 14 *2019 ..
-r--r--r--. 1 root *root *system_u:object_r:public_content_t:s0 * 44 Jan *3 23:41 .discinfo
dr-xr-xr-x. 8 admin admin system_u:object_r:public_content_t:s0 *163 Apr 11 15:23 inst
-r--r--r--. 1 root *root *system_u:object_r:public_content_t:s0 1520 Jan *3 23:41 .treeinfo
[root@192-168-0-101 admin]# ls -aZ /var/ftp/pub/
system_u:object_r:public_content_t:s0 .
system_u:object_r:public_content_t:s0 ..
system_u:object_r:public_content_t:s0 .discinfo
system_u:object_r:public_content_t:s0 inst
system_u:object_r:public_content_t:s0 .treeinfo
[root@192-168-0-101 admin]# systemctl status vsftpd
● vsftpd.service - Vsftpd ftp daemon
* *Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor pres>
* *Active: active (running) since Tue 2020-04-14 10:48:36 EEST; 1h 10min ago
* Process: 2145 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited>
*Main PID: 2154 (vsftpd)
* * Tasks: 1 (limit: 26213)
* *Memory: 900.0K
* *CGroup: /system.slice/vsftpd.service
* * * * * *└─2154 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
[root@192-168-0-101 ~]# cp /etc/vsftpd/vsftpd.conf bck/
[root@192-168-0-101 ~]# vi /etc/vsftpd/vsftpd.conf
[root@192-168-0-101 ~]# systemctl restart vsftpd.
Failed to restart vsftpd..service: Unit vsftpd..service not found.
[root@192-168-0-101 ~]# systemctl restart vsftpd.service
[root@192-168-0-101 ~]# systemctl status vsftpd.service
● vsftpd.service - Vsftpd ftp daemon
* *Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor pres>
* *Active: active (running) since Tue 2020-04-14 12:14:27 EEST; 7s ago
* Process: 9271 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited>
*Main PID: 9272 (vsftpd)
* * Tasks: 1 (limit: 26213)
* *Memory: 540.0K
* *CGroup: /system.slice/vsftpd.service
* * * * * *└─9272 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
Apr 14 12:14:27 192-168-0-101.rdsnet.ro systemd[1]: Starting Vsftpd ftp daemon.>
Apr 14 12:14:27 192-168-0-101.rdsnet.ro systemd[1]: Started Vsftpd ftp daemon.
[root@192-168-0-101 ~]#
[root@192-168-0-101 ~]#
[root@192-168-0-101 ~]#
[root@192-168-0-101 ~]#
[root@192-168-0-101 ~]#
[root@192-168-0-101 ~]#
[root@192-168-0-101 ~]# !lftp
lftp 192.168.0.101
lftp 192.168.0.101:~> ls
dr-xr-xr-x * *3 0 * * * *0 * * * * * * *52 Apr 14 08:47 pub
lftp 192.168.0.101:/> ls pub/inst/
dr-xr-xr-x * *4 1000 * * 1000 * * * * * 38 Jan 03 21:42 AppStream
dr-xr-xr-x * *4 1000 * * 1000 * * * * * 38 Jan 03 21:42 BaseOS
dr-xr-xr-x * *3 1000 * * 1000 * * * * * 18 Jan 03 21:42 EFI
-r--r--r-- * *1 1000 * * 1000 * * * * *664 Jan 03 21:42 TRANS.TBL
dr-xr-xr-x * *3 1000 * * 1000 * * * * * 76 Jan 03 21:42 images
dr-xr-xr-x * *2 1000 * * 1000 * * * * *256 Jan 03 21:42 isolinux
-r--r--r-- * *1 1000 * * 1000 * * * * * 87 Jan 03 21:41 media.repo
drwxr-xr-x * *2 0 * * * *0 * * * * * *4096 Apr 11 12:23 repodata
lftp 192.168.0.101:/>
101 ~]# grep YES /etc/vsftpd/vsftpd.conf
anonymous_enable=YES
local_enable=YES
write_enable=YES
#anon_upload_enable=YES
#anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
#chown_uploads=YES
xferlog_std_format=YES
#async_abor_enable=YES
#ascii_upload_enable=YES
#ascii_download_enable=YES
#deny_email_enable=YES
# directory. If chroot_local_user is YES, then this list becomes a list of
#chroot_local_user=YES
#chroot_list_enable=YES
ls_recurse_enable=YES
listen=YES
#listen_ipv6=YES
userlist_enable=YES
*-x, --extra-args KERNELARGS
* * * * * *Additional kernel command line arguments to pass to the installer when performing a guest
* * * * * *install from "--location". One common usage is specifying an anaconda kickstart file for
* * * * * *automated installs, such as --extra-args "ks=https://myserver/my.ks"
[root@192-168-0-101 ~]# man virt-install
[root@192-168-0-101 ~]# cp anaconda-ks.cfg /var/ftp/pub/inst/
[root@192-168-0-101 ~]# ll /var/ftp/pub/inst/
total 16
-rw-------. 1 root *root *1502 Apr 14 13:26 anaconda-ks.cfg
dr-xr-xr-x. 4 admin admin * 38 Jan *3 23:42 AppStream
dr-xr-xr-x. 4 admin admin * 38 Jan *3 23:42 BaseOS
dr-xr-xr-x. 3 admin admin * 18 Jan *3 23:42 EFI
dr-xr-xr-x. 3 admin admin * 76 Jan *3 23:42 images
dr-xr-xr-x. 2 admin admin *256 Jan *3 23:42 isolinux
-r--r--r--. 1 admin admin * 87 Jan *3 23:41 media.repo
drwxr-xr-x. 2 root *root *4096 Apr 11 15:23 repodata
-r--r--r--. 1 admin admin *664 Jan *3 23:42 TRANS.TBL
[root@192-168-0-101 ~]# chmod ugo+r /var/ftp/pub/inst/anaconda-ks.cfg
[root@192-168-0-101 ~]# ll /var/ftp/pub/inst/
total 16
-rw-r--r--. 1 root *root *1502 Apr 14 13:26 anaconda-ks.cfg
dr-xr-xr-x. 4 admin admin * 38 Jan *3 23:42 AppStream
dr-xr-xr-x. 4 admin admin * 38 Jan *3 23:42 BaseOS
dr-xr-xr-x. 3 admin admin * 18 Jan *3 23:42 EFI
dr-xr-xr-x. 3 admin admin * 76 Jan *3 23:42 images
dr-xr-xr-x. 2 admin admin *256 Jan *3 23:42 isolinux
-r--r--r--. 1 admin admin * 87 Jan *3 23:41 media.repo
drwxr-xr-x. 2 root *root *4096 Apr 11 15:23 repodata
-r--r--r--. 1 admin admin *664 Jan *3 23:42 TRANS.TBL
[root@192-168-0-101 ~]# virt-install --name tester2 --location ftp://localhost/pub/inst --memory 3096 --disk path=/var/lib/libvirt/images/tester2.qcow2,size=20 *--os-variant rhel8.1 --extra-args "ftp://localhost/pub/inst/anaconda-ks.cfg" &
[1] 12084
[root@192-168-0-101 ~]#
Starting install...
Retrieving file vmlinuz... * * * * * * * * * * * * * * * * * * * * * * * * * * * * | 7.7 MB *00:00:00 * *
Retrieving file initrd.img... * * * * * * * * * * * * * * * * * * * * * * * * * * *| *59 MB *00:00:00 * *
Allocating 'tester2.qcow2' * * * * * * * * * * * * * * * * * * * * * * * * * * * * | *20 GB *00:00:00 * *
No protocol specified
(virt-viewer:12245): dbind-WARNING **: 13:28:20.504: Could not open X display
(virt-viewer:12245): GLib-GIO-CRITICAL **: 13:28:20.526: g_dbus_proxy_new_sync: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
No protocol specified
xcb_connection_has_error() returned true
XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), but by uid 1000! (This could e g happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
(virt-viewer:12245): GSpice-WARNING **: 13:28:20.597: PulseAudio context failed Connection refused
(virt-viewer:12245): GSpice-WARNING **: 13:28:20.598: pa_context_connect() failed: Connection refused
(virt-viewer:12245): GSpice-WARNING **: 13:28:20.610: Bad pulsesrc version 1.14.0, lowering its rank
(virt-viewer:12245): GSpice-WARNING **: 13:28:20.693: Could not create org.gnome.SessionManager dbus proxy: The connection is closed
(virt-viewer:12245): GSpice-WARNING **: 13:28:20.693: Warning no automount-inhibiting implementation available
(virt-viewer:12245): GLib-GObject-WARNING **: 13:28:28.226: value "64" of type 'gint' is invalid or out of range for property 'desktop-width' of type 'gint'
(virt-viewer:12245): GLib-GObject-WARNING **: 13:28:28.226: value "64" of type 'gint' is invalid or out of range for property 'desktop-height' of type 'gint'
Domain installation still in progress. You can reconnect to
the console to complete the installation process.
[1]+ *Done * * * * * * * * * *virt-install --name tester2 --location ftp://localhost/pub/inst --memory 3096 --disk path=/var/lib/libvirt/images/tester2.qcow2,size=20 --os-variant rhel8.1 --extra-args "ftp://localhost/pub/inst/anaconda-ks.cfg"
[root@192-168-0-101 ~]# ls -Z /var/ftp/
system_u:object_r:public_content_t:s0 pub
[root@192-168-0-101 ~]# chcon -t public_content_t /var/ftp/pub/inst/anaconda-ks.cfg
[root@192-168-0-101 ~]# chcon -R --reference /var/www/ /var/www/html/inst/
[root@192-168-0-101 ~]#
[root@192-168-0-101 ~]# chmod ugo+r /var/www/html/inst/anaconda-ks.cfg
[root@192-168-0-101 ~]# ll -a /var/www/html/inst/
total 24
dr-xr-xr-x. 8 admin admin *186 Apr 14 13:31 .
drwxr-xr-x. 3 root *root * *18 Apr 11 15:25 ..
-rw-r--r--. 1 root *root *1502 Apr 14 13:31 anaconda-ks.cfg
dr-xr-xr-x. 4 admin admin * 38 Jan *3 23:42 AppStream
dr-xr-xr-x. 4 admin admin * 38 Jan *3 23:42 BaseOS
-r--r--r--. 1 admin admin * 44 Jan *3 23:41 .discinfo
dr-xr-xr-x. 3 admin admin * 18 Jan *3 23:42 EFI
dr-xr-xr-x. 3 admin admin * 76 Jan *3 23:42 images
dr-xr-xr-x. 2 admin admin *256 Jan *3 23:42 isolinux
-r--r--r--. 1 admin admin * 87 Jan *3 23:41 media.repo
drwxr-xr-x. 2 root *root *4096 Apr 11 15:23 repodata
-r--r--r--. 1 admin admin *664 Jan *3 23:42 TRANS.TBL
-r--r--r--. 1 admin admin 1542 Apr 11 15:52 .treeinfo
==> /var/log/httpd/ssl_request_log <==
==> /var/log/httpd/access_log <==
::1 - - [14/Apr/2020:13:38:44 +0300] "GET /inst/.treeinfo HTTP/1.1" 200 1542 "-" "python-requests/2.20.0"
::1 - - [14/Apr/2020:13:38:44 +0300] "HEAD /inst/images/pxeboot/vmlinuz HTTP/1.1" 200 - "-" "python-requests/2.20.0"
::1 - - [14/Apr/2020:13:38:44 +0300] "HEAD /inst/images/pxeboot/initrd.img HTTP/1.1" 200 - "-" "python-requests/2.20.0"
::1 - - [14/Apr/2020:13:38:44 +0300] "GET /inst/images/pxeboot/vmlinuz HTTP/1.1" 200 8106744 "-" "python-requests/2.20.0"
::1 - - [14/Apr/2020:13:38:44 +0300] "GET /inst/images/pxeboot/initrd.img HTTP/1.1" 200 62113500 "-" "python-requests/2.20.0"
[root@192-168-0-101 ~]# virt-install --name tester2 --location http://localhost/inst --memory 3096 --disk path=/var/lib/libvirt/images/tester2.qcow2,size=20 *--os-variant rhel8.1 --extra-args "http://localhost/inst/anaconda-ks.cfg" &
[1] 12774
[root@192-168-0-101 ~]#
Starting install...
Retrieving file vmlinuz... * * * * * * * * * * * * * * * * * * * * * * * * * * * * | 7.7 MB *00:00:00 * *
Retrieving file initrd.img... * * * * * * * * * * * * * * * * * * * * * * * * * * *| *59 MB *00:00:00 * *
Allocating 'tester2.qcow2' * * * * * * * * * * * * * * * * * * * * * * * * * * * * | *20 GB *00:00:00 * *
No protocol specified
(virt-viewer:12927): dbind-WARNING **: 13:38:45.403: Could not open X display
(virt-viewer:12927): GLib-GIO-CRITICAL **: 13:38:45.425: g_dbus_proxy_new_sync: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
No protocol specified
xcb_connection_has_error() returned true
XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), but by uid 1000! (This could e g happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
(virt-viewer:12927): GSpice-WARNING **: 13:38:45.517: PulseAudio context failed Connection refused
(virt-viewer:12927): GSpice-WARNING **: 13:38:45.517: pa_context_connect() failed: Connection refused
(virt-viewer:12927): GSpice-WARNING **: 13:38:45.529: Bad pulsesrc version 1.14.0, lowering its rank
(virt-viewer:12927): GSpice-WARNING **: 13:38:45.582: Could not create org.gnome.SessionManager dbus proxy: The connection is closed
(virt-viewer:12927): GSpice-WARNING **: 13:38:45.582: Warning no automount-inhibiting implementation available
(virt-viewer:12927): GLib-GObject-WARNING **: 13:38:53.171: value "64" of type 'gint' is invalid or out of range for property 'desktop-width' of type 'gint'
(virt-viewer:12927): GLib-GObject-WARNING **: 13:38:53.171: value "64" of type 'gint' is invalid or out of range for property 'desktop-height' of type 'gint'
Domain installation still in progress. You can reconnect to
the console to complete the installation process.
[1]+ *Done * * * * * * * * * *virt-install --name tester2 --location http://localhost/inst --memory 3096 --disk path=/var/lib/libvirt/images/tester2.qcow2,size=20 --os-variant rhel8.1 --extra-args "http://localhost/inst/anaconda-ks.cfg"
==> /var/log/xferlog <==
Tue Apr 14 13:41:52 2020 1 127.0.0.1 1520 /pub/inst/.treeinfo b _ o a anonymous@ ftp 0 * c
Tue Apr 14 13:41:52 2020 1 127.0.0.1 8106744 /pub/inst/images/pxeboot/vmlinuz b _ o a anonymous@ ftp 0 * c
Tue Apr 14 13:41:52 2020 1 127.0.0.1 62113500 /pub/inst/images/pxeboot/initrd.img b _ o a anonymous@ ftp 0 * c
==> /var/log/messages <==
Apr 14 13:41:52 192-168-0-101 kernel: virbr0: port 5(vnet4) entered blocking state
Apr 14 13:41:52 192-168-0-101 kernel: virbr0: port 5(vnet4) entered disabled state
Apr 14 13:41:52 192-168-0-101 kernel: device vnet4 entered promiscuous mode
Apr 14 13:41:52 192-168-0-101 kernel: virbr0: port 5(vnet4) entered blocking state
Apr 14 13:41:52 192-168-0-101 kernel: virbr0: port 5(vnet4) entered listening state
Apr 14 13:41:52 192-168-0-101 NetworkManager[2125]: <info> *[1586860912.9600] manager: (vnet4): new Tun device (/org/freedesktop/NetworkManager/Devices/20)
Apr 14 13:41:52 192-168-0-101 systemd-udevd[13493]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Apr 14 13:41:52 192-168-0-101 NetworkManager[2125]: <info> *[1586860912.9758] device (vnet4): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
Apr 14 13:41:52 192-168-0-101 NetworkManager[2125]: <info> *[1586860912.9777] device (vnet4): state change: unavailable -> disconnected (reason 'connection-assumed', sys-iface-state: 'external')
Apr 14 13:41:52 192-168-0-101 NetworkManager[2125]: <info> *[1586860912.9785] device (vnet4): Activation: starting connection 'vnet4' (278cadba-203e-4cec-8a07-bbcdf7b33b81)
Apr 14 13:41:52 192-168-0-101 NetworkManager[2125]: <info> *[1586860912.9786] device (vnet4): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
Apr 14 13:41:52 192-168-0-101 NetworkManager[2125]: <info> *[1586860912.9791] device (vnet4): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
Apr 14 13:41:52 192-168-0-101 NetworkManager[2125]: <info> *[1586860912.9793] device (vnet4): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
Apr 14 13:41:52 192-168-0-101 NetworkManager[2125]: <info> *[1586860912.9795] device (virbr0): bridge port vnet4 was attached
Apr 14 13:41:52 192-168-0-101 NetworkManager[2125]: <info> *[1586860912.9795] device (vnet4): Activation: connection 'vnet4' enslaved, continuing activation
Apr 14 13:41:52 192-168-0-101 NetworkManager[2125]: <info> *[1586860912.9797] device (vnet4): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
Apr 14 13:41:53 192-168-0-101 NetworkManager[2125]: <info> *[1586860913.0037] device (vnet4): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
Apr 14 13:41:53 192-168-0-101 NetworkManager[2125]: <info> *[1586860913.0040] device (vnet4): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
Apr 14 13:41:53 192-168-0-101 systemd-machined[1928]: New machine qemu-10-tester2.
Apr 14 13:41:53 192-168-0-101 systemd[1]: Started Virtual Machine qemu-10-tester2.
Apr 14 13:41:53 192-168-0-101 NetworkManager[2125]: <info> *[1586860913.0052] device (vnet4): Activation: successful, device activated.
Apr 14 13:41:53 192-168-0-101 systemd[1]: iscsi.service: Unit cannot be reloaded because it is inactive.
Apr 14 13:41:53 192-168-0-101 kvm[13515]: 4 guests now active
Apr 14 13:41:54 192-168-0-101 avahi-daemon[1929]: Joining mDNS multicast group on interface vnet4.IPv6 with address fe80::fc54:ff:feb2:404c.
Apr 14 13:41:54 192-168-0-101 avahi-daemon[1929]: New relevant interface vnet4.IPv6 for mDNS.
Apr 14 13:41:54 192-168-0-101 avahi-daemon[1929]: Registering new address record for fe80::fc54:ff:feb2:404c on vnet4.*.
Apr 14 13:41:54 192-168-0-101 kernel: virbr0: port 5(vnet4) entered learning state
Apr 14 13:41:57 192-168-0-101 kernel: virbr0: port 5(vnet4) entered forwarding state
Apr 14 13:41:57 192-168-0-101 kernel: virbr0: topology change detected, propagating
thank you