07.06.2014 Views

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

# xm list<br />

Name ID Mem VCPUs State Time(s)<br />

Domain-0 0 940 1 r----- 3896.9<br />

# xm create testxen.cfg<br />

Using config file "/etc/xen/testxen.cfg".<br />

Started domain testxen (id=1)<br />

# xm list<br />

Name ID Mem VCPUs State Time(s)<br />

Domain-0 0 873 1 r----- 3917.1<br />

testxen 1 128 1 -b---- 3.7<br />

CAUTION<br />

Only one domU per image!<br />

While it is of course possible to have several domU systems running in parallel,<br />

they will all need to use their own image, since each domU is made to believe it<br />

runs on its own hardware (apart from the small slice of the kernel that talks to<br />

the hypervisor). In particular, it isn't possible for two domU systems running<br />

simultaneously to share storage space. If the domU systems are not run at<br />

the same time, it is however quite possible to reuse a single swap partition, or<br />

the partition hosting the /home filesystem.<br />

Note that the testxen domU uses real memory taken from the RAM that would otherwise be<br />

available to the dom0, not simulated memory. Care should therefore be taken, when building a<br />

server meant to host Xen instances, to provision the physical RAM accordingly.<br />

Voilà! Our virtual machine is starting up. We can access it in one of two modes. The usual way<br />

is to connect to it “remotely” through the network, as we would connect to a real machine;<br />

this will usually require setting up either a DHCP server or some DNS configuration. The other<br />

way, which may be the only way if the network configuration was incorrect, is to use the hvc0<br />

console, with the xm console command:<br />

# xm console testxen<br />

[...]<br />

Starting enhanced syslogd: rsyslogd.<br />

Starting periodic command scheduler: cron.<br />

Starting OpenBSD Secure Shell server: sshd.<br />

Debian GNU/Linux 6.0 testxen hvc0<br />

testxen login:<br />

One can then open a session, just like one would do if sitting at the virtual machine's keyboard.<br />

Detaching from this console is achieved through the Control+] key combination.<br />

Chapter 12 — Advanced Administration<br />

325

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!