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

some times qemu command line using wrong tapfds and vhostfds #1331

Open
humanux opened this issue Jan 8, 2014 · 5 comments
Open

some times qemu command line using wrong tapfds and vhostfds #1331

humanux opened this issue Jan 8, 2014 · 5 comments

Comments

@humanux
Copy link
Contributor

humanux commented Jan 8, 2014

in qemu_vm.py make_qemu_commands()

# If nothing changed and devices exists, return imediatelly                
if (name is None and params is None and root_dir is None and self.devices is not None): 
      return self.devices

unfortunately these check ignore tap fds change, some times guest tap fds will change, for example.

  1. boot a guest then shutdown it (nic.tapfds=22)
  2. boot another guest with same params,( nic.tapfds=28 may be), will raise error like:

emu: -netdev tap,id=id9DXhqO,vhost=on,vhostfd=23,fd=22: TUNGETIFF ioctl() failed: Operation not permitted\nTUNSETOFFLOAD ioctl() failed: Operation not permitted\nqemu: -netdev tap,id=id9DXhqO,vhost=on,vhostfd=23,fd=22: vhost-net requested but could not be initialized\nqemu: -netdev tap,id=id9DXhqO,vhost=on,vhostfd=23,fd=22: Device 'tap' could not be initialized")

need update nic.tapfds and vhostfds before return self.device, or update them during generate qemu command line.

@humanux
Copy link
Contributor Author

humanux commented Jan 8, 2014

@jzupka please help to fix this issue.

@jzupka
Copy link
Contributor

jzupka commented Jan 8, 2014

@humanux hi, I'll take a look on that.

@jzupka
Copy link
Contributor

jzupka commented Jan 8, 2014

@humanux I try to create patch which recreate system dependent devs (nic, redirs, and what will be necessary more).

@jzupka
Copy link
Contributor

jzupka commented Jan 8, 2014

@humanux After quick fix of this problem I'll try to prepare better solution which totally splits preparation of qemu and system specific (create fd etc) things.

@humanux
Copy link
Contributor Author

humanux commented Jan 9, 2014

@jzupka thanks for your quickly reply. wait your fix patch

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