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

Convert Qemu to KVM #15

Open
yamamushi opened this issue Nov 5, 2015 · 9 comments
Open

Convert Qemu to KVM #15

yamamushi opened this issue Nov 5, 2015 · 9 comments
Labels

Comments

@yamamushi
Copy link
Contributor

We need to switch the qemu instance to run with kvm:

https://github.com/hooklift/node-libvirt

The keymap will need to be updated.

We will need to become familiar with virsh

http://askaralikhan.blogspot.com/2011/01/creating-kvm-guests-using-virsh-tool.html

@ccmolik
Copy link

ccmolik commented Nov 5, 2015

the kvm bits are installed on the hypervisor. using https://libvirt.org/drvqemu.html#xmlimport i imported the qemu args.

to see the vm's definition: (ALL COMMANDS NEED TO BE RUN AS ROOT.)

# virsh dumpxml twitchintheshell

to launch the vm:

# virsh start twitchintheshell

to acpi shutdown the vm:

# virsh shutdown twitchintheshell

to hard shutdown the vm:

# virsh destroy twitchintheshell

to reboot the vm:

# virsh reboot twitchintheshell

The VM will not currently come up at boot if the box restarts. we can fix that easily.

@ccmolik
Copy link

ccmolik commented Nov 5, 2015

To test this, this may be a good idea:

# virsh edit twitchintheshell

And then edit the XML to point to a different image for the hard drive. This lets you test without everything being blown up.

We'll need to update the client code to call libvirt directly (or virsh commands listed above) before rolling this out.

@ccmolik
Copy link

ccmolik commented Nov 5, 2015

In this case, the domain name is 'twitchintheshell' for node.js bindings.

@niemal niemal added the feature label Nov 5, 2015
@jhass
Copy link

jhass commented Nov 5, 2015

Shouldn't a recent QEMU and -enable-kvm to the launch command be enough?

@ccmolik
Copy link

ccmolik commented Nov 5, 2015

Though launching it with qemu --enable-kvm will accomplish perf
improvements, not launching through libvirt / virsh seems to make it so
libvirt has no sense on the state of the VM (the qemu process) so other
libvirt tools / libraries cannot be used to manage the VM. There were
rumblings about trying to use node-libvirt to directly control the VM.

On Thu, Nov 5, 2015 at 2:16 PM, Jonne Haß [email protected] wrote:

Shouldn't a recent QEMU and -enable-kvm to the launch command be enough?


Reply to this email directly or view it on GitHub
#15 (comment)
.

@jhass
Copy link

jhass commented Nov 5, 2015

So -enable-kvm should bring direct improvements for the current setup, we can always switch to libvirt later, no?

@yamamushi
Copy link
Contributor Author

@jhass will enabling that require us to rewrite our input system?

@jhass
Copy link

jhass commented Nov 5, 2015

not from my local tests

@yamamushi
Copy link
Contributor Author

Then we should enable that now, I'll make a pr

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

No branches or pull requests

4 participants