Difference between pages "Linux on KVM" and "Help talk:Funtoo Editing Guidelines"

From Funtoo
(Difference between pages)
Jump to: navigation, search
(Created page with "== Starting your first KVM virtual machine == To start your first KVM virtual machine, first download SysRescueCD and save it to systemrescuecd.iso. Then use the following co...")
 
m (add console revision suggestion)
 
Line 1: Line 1:
== Starting your first KVM virtual machine ==
+
== Fancy Boxes ==
 +
TODO: Describe fancy* boxes, and explain the most fool-proof way of using them. Use this format, exactly:
  
To start your first KVM virtual machine, first download SysRescueCD and save it to systemrescuecd.iso. Then use the following commands, which will create a 10GB qcow disk image to use for the first disk, and then the next command will start your virtual machine, booting from the CD:
+
{{fancyimportant|1=
 +
Now you can put lots of funky stuff in here, like <tt>html</tt> tags, etc, and not
 +
have a problem with the parameter getting passed as the first parameter.
  
<console>
+
Cool!
# ##i##qemu-img create -f qcow2 vdisk.qcow2 10
+
# ##i##qemu-system-x86_64 vdisk.qcow2 -m 1024 -cdrom systemrescuecd.iso  -vnc 127.0.0.1:1 -cpu host -net nic -net user
+
VNC server running on `127.0.0.1:5900'
+
</console>
+
  
Now you should be able to use a VNC client to connect to 127.0.0.1:5901 (VNC session 1) and access your virtual machine.
 
  
== Networking Options ==
+
}}
  
Above, networking will be enabled but will be on its own private LAN, and ping will not work. If you have a local bridge that you use for networking, the following steps will allow you use your existing bridge to provide higher-performance and full-featured network access to your virtual machine.
 
  
First, create <tt>/etc/qemu-ifup</tt> and add the following to it. Replace <tt>brlan</tt> with the name of your bridge:
+
== Console Revisions ==
 +
the console commands are strange and do not reflect the systems very well. rolling up to a page id see # or $ as the major identifiers of root vs user and i would probably not notice.  i suggest they are changed to.
  
<syntaxhighlight lang="bash">
 
#!/bin/bash
 
ifconfig $1 0.0.0.0 promisc up
 
brctl addif brlan $1
 
sleep 2
 
</syntaxhighlight>
 
  
Make it executable:
+
<pre><console>##g##user $ ##b## test</console></pre><br />
  
<console>
+
<console>##g##user $ ##b## test</console><br />
# ##i##chmod +x /etc/qemu-ifup
+
</console>
+
  
Start the virtual machine as follows:
+
<pre><console>##r##root $ ##b## tube</console></pre><br />
  
<console>
+
<console>##r##root # ##b## tube</console>
# ##i##qemu-system-x86_64 vdisk.qcow2 -m 1024 -cdrom systemrescuecd-x86-2.8.0.iso -cpu host -vnc 127.0.0.1:1 -net nic -net tap,id=foo
+
</console>
+
  
== Tweaking KVM ==
+
to make it obvious as to what is going on.
 
+
=== VNC Output ===
+
 
+
If you wanted to have VNC listen on a different IP address or port, you can use the format <tt>-vnc IP:vncnum</tt> which will cause VNC to listen on the IP specified, and the TCP port 5900+vncnum.
+
 
+
=== CPU Settings ===
+
 
+
By default, the KVM guest will have one CPU with one core. To change this, use <tt>-cpu host</tt> (to export all of the host's CPU features) and <tt>-smp cores=X,threads=Y</tt>, where X is the number of cores, and Y is the number of threads on each core. You can emulate more CPUs and cores than you actually have.
+
[[Category:Virtualization]][[Category:KVM]]
+

Revision as of 01:07, 16 March 2014

Fancy Boxes

TODO: Describe fancy* boxes, and explain the most fool-proof way of using them. Use this format, exactly:

Important: Now you can put lots of funky stuff in here, like html tags, etc, and not

have a problem with the parameter getting passed as the first parameter.

Cool!


Console Revisions

the console commands are strange and do not reflect the systems very well. rolling up to a page id see # or $ as the major identifiers of root vs user and i would probably not notice. i suggest they are changed to.


<console>##g##user $ ##b## test</console>

user $  test

<console>##r##root $ ##b## tube</console>

root #  tube

to make it obvious as to what is going on.