Changes

Jump to: navigation, search
m
Text replacement - "<htmlet>xen<htmlet>" to "<htmlet>xen</htmlet>"
<table border="0" cellspacing="0" width="100%"><tr><td width="20%">[[Running and Connecting to VNC Servers on a Xen Guest (domainU) System|Previous]]<td align="center">[[Xen Virtualization Essentials|Table of Contents]]<td width="20%" align="right">[[Xen Monitoring Tools and Techniques|Next]]</td><tr><td width="20%">Running and Connecting to VNC Servers on a Xen Guest (domainU) System<td align="center"><td width="20%" align="right">Xen Monitoring Tools and Techniques</td></table><hr>  <htmlet>xen</htmlet>  Most Xen domainU guests are configured with access to a number of devices, typically for the root filesystem and swap space. it It is not uncommon, however, to need to provide an executing domainU system with temporary access to block devices such as disks and CD/DVD drives.
Fortunately Xen provides considerable flexibility in terms of adding devices to a running domainU guest system and subsequently detaching them when they are no longer required. This chapter will cover the basics of this topic area.
== Attaching a Device to a domainU Guest ==
With the above information in mind we can now attach a device to a domainU guest. The first piece of information we need is the dID ID of the guest domain. this This can be obtained using the ''xm list'' command. the The following output shows only one guest running on our system and it has an ID of 3:
<pre>
xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 875 1 r----- 790.2
</pre>
Next we need to know the name by which the device to be added is accessed on the domain0 host (otherwise known as the ''backend device''). For the purposes of this chapter we will assume that we are added adding a DVD drive that is visible to the domain0 host system as ''/dev/sr0''. This could equally be a disk drive partition such as ''/dev/hdb1'' or ''/dev/sda3''.
Before performing the attachment, we need to decide on a device name by which the device will be accessible on the domainU system (known as the ''frontend'' device''). As mentioned previously the device name must be an ''xvd'' device (for example ''/dev/xvda2''). Failure to use an ''xvd'' device type will result in the device not appearing in the domainU guest. For this chapter we will specify ''/dev/xvda2''.
With the above information gathered we will attach the device. Since we are attaching a DVD drive we will specify read-only mode:
</pre>
The device is now attached the domaiNU domainU system with an ID of 3 and should be accessible from within that guest environment as ''/dev/xvda2''.
== Mounting the Device in the domainU Guest ==
xm block-detach 3 /dev/xvda2
</pre>
 
 
<htmlet>xen</htmlet>
 
 
<hr>
<table border="0" cellspacing="0" width="100%">
<tr>
<td width="20%">[[Running and Connecting to VNC Servers on a Xen Guest (domainU) System|Previous]]<td align="center">[[Xen Virtualization Essentials|Table of Contents]]<td width="20%" align="right">[[Xen Monitoring Tools and Techniques|Next]]</td>
<tr>
<td width="20%">Running and Connecting to VNC Servers on a Xen Guest (domainU) System<td align="center"><td width="20%" align="right">Xen Monitoring Tools and Techniques</td>
</table>

Navigation menu