aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-10-06 14:12:23 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-10-06 14:12:23 -0300
commitb6410cce7d2e429addaf4cc6a4a2da10173abfad (patch)
tree1c24beff8d766f32d44eb09382d1285cea3749a3
parent9cc1157bf5109383f927ade330900b2b3cb51b64 (diff)
downloadkvmx-b6410cce7d2e429addaf4cc6a4a2da10173abfad.tar.gz
kvmx-b6410cce7d2e429addaf4cc6a4a2da10173abfad.tar.bz2
Doc: using with existing or manually created guests
-rw-r--r--README.md30
-rwxr-xr-xkvmx2
2 files changed, 31 insertions, 1 deletions
diff --git a/README.md b/README.md
index 0e18f49..6d9df06 100644
--- 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 4369de1..2ed3dd4 100755
--- 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 &