Enjoy Slackware 15.0!
Welcome to the Slackware Documentation Project
Trace:
====== vms ====== An example using vms for creating and managing a qemu virtual machine ===== Installation ===== You need to install vde2, tigervnc and qemu first Get the ready made package and install it, you should use the latest release <code bash> wget https://bitbucket.org/yotis/vms/vms-0.2.1-noarch-1did.tgz upgradepkg --install-new vms-0.2.1-noarch-1did.tgz </code> Or use slackbuilds.org, eg via sbopkg <code> sbopkg -i vms </code> ===== Creating vm1 ===== Create the vm1 virtual machine and show the related configuration and files <code bash> vms create vm1 vms list grep vm1 ~/.vms/vms.conf ls ~/.vms/vm1 </code> You can use the ~/.vms/vm1 directory to store anything you want, but this is not mandatory. The only thing that is needed is the ~/.vms/vm1/vm1.sh script. To show the configuration of the vm1 virtual machine, use this <code bash> vms info vm1 </code> You should be able to start vm1 now with <code bash> vms start vm1 </code> To display the running status of vm1 use this <code bash> vms status vm1 </code> If you want to kill vm1, you can do it like this <code bash> vms kill vm1 </code> Now, add 2GB of memory <code bash> vms conf vm1 mem 2048 </code> Let's create a 20G disk and attach it to vm1 <code bash> cd ~/.vms/vm1 qemu-img create -f qcow2 disk0.img 20G vms conf vm1 disk0 '~/.vms/vm1/disk0.img' </code> And now, let's add a cdrom and boot from it. If there is a slackware install dvd located in ~/os <code bash> vms conf vm1 bootcd ~/os/slackware64-14.2-install-dvd.iso vms info vm1 </code> Even though you can edit vm1's configuration via <code bash>vms conf</code> commands, you are encouraged to edit ~/.vms/vms.conf by hand. The format is very simple and since this file is sourced during vms execution you can be creative with bash variables. For example, you could configure shared storage for the os images by declaring a variable at the beginning of ~/.vms/vms.conf. <code bash> ISOS=/path/to/isos </code> Then you would use the ISOS variable via 'vms conf' like this <code bash> vms conf vm1 bootcd '"$ISOS/slackware64-14.2-install-dvd.iso"' </code> Notice the use of single and double quotes. ===== Sources ===== * Nikos Giotis <!-- Please do not modify anything below, except adding new tags.--> <!-- This page needs a better name, maybe something like "Vms for creating and managing a qemu VM" --> {{tag>howtos software emulator vms qemu needs_attention}}
Article
Discussion
Show pagesource
Old revisions
PDF export
Log In
Navigation
Main Page
Project Charter
Site News
Staff
Table of Contents
Search
Toolbox
What links here
Recent Changes
Media Manager
Site index
Printable version
Permanent link
Cite this article
In Other Languages
SlackDocs
Request an account
Dokuwiki Manual
Dokuwiki Syntax
SlackDocs Style Guide
Authoring Guidelines
Translation Guide
Slackware Links
Slackware.com
Slackware-Current Change Log
Package Browser
Slackware Mirrors
@LinuxQuestions.org
QR Code