virsh console ubuntu 18 container and frozen

I tried to install ubuntu 18.04 container on the centos 7 host

qemu-img create -f raw /data/pools/ubuntu1804.img 50G

make sure download the iso file to /data/images folder ubuntu-18.04.2-server-amd64.iso

virt-install \
--name ubuntu1804 \
--ram 4096 \
--disk path=/data/pools/ubuntu1804.img,size=20,bus=virtio \
--vcpus 2 \
--os-type linux \
--os-variant ubuntu18.04 \
--network bridge=virbr0 \
--graphics none \
--console pty,target_type=serial \
--location '/data/images/ubuntu-18.04.2-server-amd64.iso' \
--extra-args 'console=ttyS0,115200n8 serial' \
--force --debug

after finishing all the process, when i tried virsh console ubuntu1804, it is frozen, googled and tried a lot of different options, finally this one worked

sudo apt install libguestfs-tools 
sudo virt-edit -d ubuntu1804 /boot/grub/grub.cfg

Replace all instances of quiet with quiet console=ttyS0 in the grub.cfg file and start my VM for console connect. then try to start the container and login again

virsh start ubuntu1804
virsh console ubuntu1804

after login, make sure update the grub

vi /etc/default/grubĀ 

change GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash” to GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash console=ttyS0″, then

sudo update-grub