]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Doc: using with existing or manually created guests
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 6 Oct 2017 17:12:23 +0000 (14:12 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 6 Oct 2017 17:12:23 +0000 (14:12 -0300)
README.md
kvmx

index 0e18f49c889e92c792a1146d817fcbed9b699134..6d9df068e06c307767c302766ec94aec87c57f78 100644 (file)
--- a/README.md
+++ b/README.md
@@ -49,6 +49,36 @@ you might have available on your shell.
 If no project name is specified, the current folder name is assumed as the project name.
 If no folder is specified, the current folder is assumed as the project home.
 
+## Using with existing guests
+
+Instead of a simple `kvmx up`, you might want to use and existing virtual machine.
+Simply point the `image` parameter at your project's `kvmxfile` to where you image
+resides.
+
+## Manually creating a guest
+
+Alternativelly, you might create a new one by hand. To do so, proceed as usual
+with `kvmx init` and `kvmx edit` acording to the Basic Usage stated above.
+
+Then, before, doing `kvmx up`, do something like the following example:
+
+    # Create the environment
+    kvmx init <guest> /var/cache/qemu/<guest>
+    cd /var/cache/qemu/<guest>
+    qemu-img create -f raw box.raw 10G
+
+    # Install the Operating System
+    kvm -m 2048 -net nic,model=virtio -net user -drive file=box.raw,format=raw -cdrom ~/path/to/installation.iso 
+
+    # Convert image to qcow2 format
+    qemu-img convert -O qcow2 bow.raw box.img
+
+If you want OpenSSH functionality, make sure to create an user and set a password
+related to the configuration present at the project's `kvmxfile`. Also, make sure
+to to create an OpenSSH keypair for this virtual machine and put the public key
+into the guest user's home folder. Passwordless sudo might also be desired for the
+full development functionality.
+
 ## Further development
 
 * Fix isolinux support:
diff --git a/kvmx b/kvmx
index 4369de1acf03e0ba600c2236b827f2843fa17b07..2ed3dd4b3197be50d87fb416fc4ad9e195ce8ffb 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -359,7 +359,7 @@ function kvmx_up {
       -device virtio-serial-pci \
       -device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 \
       -chardev spicevmc,id=spicechannel0,name=vdagent \
-      -smp $smp -soundhw ac97 -cpu host -balloon virtio  \
+      -smp $smp -soundhw ac97 -cpu host -balloon virtio \
       -net nic,model=virtio \
       -net user,hostfwd=tcp:127.0.0.1:$SSH-:22,hostfwd=udp:127.0.0.1:$XDMCP_PORT-:177$hostfwd $qemu_opts &> $LOGFILE < /dev/null &