Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error bringing up box with qemu:///session - Guest Specific Operations #1782

Open
SpencerCBrown opened this issue Oct 9, 2023 · 1 comment

Comments

@SpencerCBrown
Copy link

When running vagrant up, I'm getting the following error:
Guest-specific operations were attempted on a machine that is not ready for guest communication. This should not happen and a bug should be reported.
This only happens when I set libvirt.uri = "qemu:///session", not when I use libvirt.uri = "qemu:///system"

To Reproduce
Steps to reproduce the behavior:

  1. Go to folder containing Vagrantfile with libvirt.uri = "qemu:///session"
  2. Run vagrant up
  3. See error at the end of the log.

I tried building and using the latest on development, still have the same issue. I'm not sure if it's vagrant-libvirt or something wrong with my environment.

Versions (please complete the following information)::

  • Libvirt version: 0.12.2, and 0.12.3-pre
  • Vagrant version [output of vagrant version]: vagrant 2.3.7, also tried 2.3.6 and 2.3.0
  • Vagrant flavour [Upstream or Distro]: Tried both
  • Vagrant plugins versions (including vagrant-libvirt) [output of vagrant plugin list]:

Debug Log

vagrant.log

A Vagrantfile to reproduce the issue:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"

  config.vm.provider :libvirt do |libvirt|
    libvirt.uri = "qemu:///session"
  end
end

@abbbi
Copy link
Contributor

abbbi commented Oct 25, 2023

according to the logfile the virtual machine is defined and starting up. The vagrant-libvirt plugin itself seems to work correctly. It also detects that the virtual machine has been assigned an IP address and attempts to reach it via SSH, but fails to do so:

[..]
start_domain: Using vagrant-libvirt at 192.168.121.0/24 as the management network nat is the mode
DEBUG wait_till_up: Searching for IP for MAC address: 52:54:00:ef:82:15
 INFO interface: info: Waiting for domain to get an IP address...
 INFO interface: info: ==> default: Waiting for domain to get an IP address...
==> default: Waiting for domain to get an IP address...
 INFO wait_till_up: Got IP address·
DEBUG ssh: Checking whether SSH is ready...
 INFO ssh: SSH not up: #<Vagrant::Errors::SSHNotReady: The provider for this Vagrant-managed machine is reporting that it
is not yet ready for SSH.

you should check if the virtual machine in fact did boot up correctly and is reachable via SSH (via VNC console
or other tools like virt-manager/virt-viewer). This look to me as if the image in the virtual machine was not able to boot into a state where SSH is reachable. Another option might be that something is messed up with the network communication that is used if you spin up via qemu://session (the default vagrant-libvirt networking).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants