0

I am trying to use virt-install to install VM on linux using kvm with below command. But it gets stuck at

Domain state after install: 1

$ sudo virt-install --virt-type=kvm --name rhel7-"$buildid" --ram 2048 --vcpus=3 --os-variant=rhel7.0\
  --cdrom="$buildlocalpath"/ssg-rhel-7.7.iso  --graphics vnc,listen=0.0.0.0,keymap=en-us\
  --disk path=xyz,size=49,bus=ide,format=qcow2 --noautoconsole --wait=-1 --noreboot -d

Can anyone help here with what could be possible issue ?

4
  • Can you install the VM via virt-manager? Just curious if you get the same error(s). – ajgringo619 Sep 13 '20 at 21:12
  • installed virt-manager but same issue. – Suraj Sep 14 '20 at 2:43
  • ignore previous comment.. looks actually it has solved the issue. now its failing with some other error - need to investigate in detail – Suraj Sep 14 '20 at 5:49
  • so to conclude here.. that virt-manager installtion did not help. – Suraj Sep 16 '20 at 3:42
1

You ran virt-install with --wait -1 which means 'wait forever until the VM exits', and --noautoconsole which means 'do not launch virt-viewer/virsh console to see guest output'. So what is likely happening if the your VM is sitting at the distro installer waiting for you to click 'Forward' or enter input but you aren't connected to the VM. So there's a few fixes:

  • If you are running that on your local host with graphical access, drop --noautoconsole and you'll get a virt-viewer window connected to the VM

  • If you are running that command on a remote host, try connecting to that remote host with `virt-manager --connect qemu+ssh://root@HOSTNAME/system' and then connecting to the VM graphical console to continue the install

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.