qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: RHEL8 virt-manager QEMU 4.2.0 guest network no connection


From: Leek, Jim
Subject: RE: RHEL8 virt-manager QEMU 4.2.0 guest network no connection
Date: Wed, 14 Jul 2021 14:50:44 +0000

I got the network to partially work.  (DNS resolves and I can get to the host, which is all I wanted anyway.)  The problem was that I needed to be able to run as a normal user.  Which was a matter of uncommenting this line in file /etc/libvirt/libvirt.conf:

uri_default = "qemu:///system"

 

And perhaps copying that file to

~/.config/libvirt/libvirt.conf

 

As seen in this stack overflow question:
https://serverfault.com/questions/803283/how-do-i-list-virsh-networks-without-sudo

 

 

From: Leek, Jim
Sent: Tuesday, July 13, 2021 4:42 PM
To: qemu-discuss@nongnu.org
Subject: RHEL8 virt-manager QEMU 4.2.0 guest network no connection

 

I need to setup a CentOS 8 VM on my RHEL 8 workstation.  I read that I can use virt-manager for this and everything should work OK.  I was able to built and install the guest OS, but I cannot find anyway to get files from the host to the guest, including getting the network hooked up.  (I don't really need internet access, just the ability to get files back and forth.)

The host is RHEL 8.4, the guest is CentOS 8.  

Everything is installed from the yum repos, so it's all default, but my corporate IT environment is pretty locked down.  So that might be related.

I tried to use a shared drive, but apparently that is disabled in RHEL 8.

By default the network is 'NAT' with virtio.  

 

One weird thing is I don't seem to have any domains, I don't know what to do about that:

$ virsh list --all

 Id   Name   State

--------------------

$ virsh net-list --inactive

 Name      State      Autostart   Persistent

----------------------------------------------

 default   inactive   yes         yes

 

The Host ifconfig:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 10.251.13.178  netmask 255.255.252.0  broadcast 10.251.15.255

        inet6 fe80::bbed:c35d:746a:309f  prefixlen 64  scopeid 0x20<link>

        ether 6c:2b:59:e9:44:49  txqueuelen 1000  (Ethernet)

        RX packets 62689574  bytes 31243439143 (29.0 GiB)

        RX errors 30  dropped 160  overruns 0  frame 19

        TX packets 167884075  bytes 222032001741 (206.7 GiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

        device interrupt 16  memory 0x90380000-903a0000  

 

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 1000  (Local Loopback)

        RX packets 763348  bytes 130801178 (124.7 MiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 763348  bytes 130801178 (124.7 MiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500

        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255

        ether 52:54:00:40:58:59  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 70  bytes 11200 (10.9 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

-------

My guest ifconfig:

enp8s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        ether 6c:2b:59:e9:44:50  txqueuelen 1000  (Ethernet)

        RX packets 38  bytes 4953 (4.8 KiB)

        RX errors 0  dropped 7  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 1000  (Local Loopback)

        RX packets 1840  bytes 159880 (156.1 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 1840  bytes 159880 (156.1 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500

        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255

        ether 52:54:00:a8:4e:b8  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

----

The command line from the log file:

2021-07-10 00:47:56.514+0000: starting up libvirt version: 6.0.0, package: 35.module+el8.4.0+10230+7a9b21e4 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2021-03-04-13:36:50, ), qemu version: 4.2.0qemu-kvm-4.2.0-48.module+el8.4.0+10368+630e803b, kernel: 4.18.0-305.7.1.el8_4.x86_64, hostname: yonggary.llnl.gov

LC_ALL=C \

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin \

HOME=/var/lib/libvirt/qemu/domain-8-centos8_1 \

XDG_DATA_HOME=/var/lib/libvirt/qemu/domain-8-centos8_1/.local/share \

XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain-8-centos8_1/.cache \

XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain-8-centos8_1/.config \

QEMU_AUDIO_DRV=spice \

/usr/libexec/qemu-kvm \

-name guest=centos8_1,debug-threads=on \

-S \

-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-8-centos8_1/master-key.aes \

-enable-fips \

-machine pc-q35-rhel8.2.0,accel=kvm,usb=off,vmport=off,dump-guest-core=off \

-cpu Skylake-Server-IBRS,ss=on,vmx=on,pdcm=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,pku=on,md-clear=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,ibpb=on,ibrs=on,amd-stibp=on,amd-ssbd=on,skip-l1dfl-vmentry=on,pschange-mc-no=on \

-m 24000 \

-overcommit mem-lock=off \

-smp 2,sockets=2,cores=1,threads=1 \

-uuid d1d4a827-fe87-4c49-9ab2-3b4f52423c2a \

-no-user-config \

-nodefaults \

-chardev socket,id=charmonitor,fd=38,server,nowait \

-mon chardev=charmonitor,id=monitor,mode=control \

-rtc base=utc,driftfix=slew \

-global kvm-pit.lost_tick_policy=delay \

-no-hpet \

-no-shutdown \

-global ICH9-LPC.disable_s3=1 \

-global ICH9-LPC.disable_s4=1 \

-boot strict=on \

-device pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \

-device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \

-device pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 \

-device pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 \

-device pcie-root-port,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 \

-device pcie-root-port,port=0x15,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5 \

-device pcie-root-port,port=0x16,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x6 \

-device pcie-root-port,port=0x17,chassis=8,id=pci.8,bus=pcie.0,addr=0x2.0x7 \

-device pcie-pci-bridge,id=pci.9,bus=pci.1,addr=0x0 \

-device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 \

-device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 \

-blockdev '{"driver":"file","filename":"/home/leek2/qemu/rhel8_1.qcow2","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \

-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"qcow2","file":"libvirt-2-storage","backing":null}' \

-device virtio-blk-pci,scsi=off,bus=pci.4,addr=0x0,drive=libvirt-2-format,id=virtio-disk0,bootindex=1 \

-device ide-cd,bus=ide.0,id=sata0-0-0 \

-netdev tap,fd=40,id=hostnet0,vhost=on,vhostfd=41 \

-device virtio-net-pci,netdev=hostnet0,id=net0,mac=6c:2b:59:e9:44:50,bus=pci.7,addr=0x0 \

-chardev pty,id=charserial0 \

-device isa-serial,chardev=charserial0,id=serial0 \

-chardev socket,id=charchannel0,fd=42,server,nowait \

-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 \

-chardev spicevmc,id=charchannel1,name=vdagent \

-device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 \

-device usb-tablet,id=input0,bus=usb.0,port=1 \

-spice port=5900,addr=127.0.0.1,disable-ticketing,image-compression=off,seamless-migration=on \

-device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pcie.0,addr=0x1 \

-device ich9-intel-hda,id=sound0,bus=pcie.0,addr=0x1b \

-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 \

-chardev spicevmc,id=charredir0,name=usbredir \

-device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 \

-chardev spicevmc,id=charredir1,name=usbredir \

-device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 \

-device virtio-balloon-pci,id=balloon0,bus=pci.5,addr=0x0 \

-object rng-random,id=objrng0,filename=/dev/urandom \

-device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.6,addr=0x0 \

-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \

-msg timestamp=on

char device redirected to /dev/pts/2 (label charserial0)

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]