Main Menu

friends

Banner

Latest articles

FLOSS weekly
30/09/2009 | mad mad mod

FLOSS weekly FLOSS is an acronym for free/libre/open source software. Floss weekly is a podcast from the TWiT Network. The show contains interviews with prominent developers from the open so [ ... ]


setting up a very simple samba server on Linux (Fedora)
24/07/2009 | mad mad mod

This article describes how to set up a very simple Windows share on Linux (Fedora). 1. Install samba (you have to run this commands with root privileges)  [root@blackmod ~]# yum install sam [ ... ]


Other Articles

Designed by:
SiteGround web hosting Joomla Templates
How to boot into rescue mode on a paravirtualized XEN guest E-mail
User Rating: / 0
PoorBest 
XEN

How to boot into rescue mode on a paravirtualized XEN guest


- or -


How to access a virtual machines filesystems from Domain-0



Sometimes you have to access the filesystems of a virtual machine without booting the guest. Usualy this is because you are unable

to get Red Hat Linux running completely enough to access files on your system's hard drive (e.g. /boot filesystem is broken or MBR

overwritten).

On a standard (non-virtualized) installation you would boot from CD/DVD and type "linux rescue" at the installation boot prompt.

After you have answered a few simple questions, you will be able to access all filesystems on your harddrives.

Unfortunately this is not possible on a paravirtualized XEN guest! However, there are 2 options to access the filesystems of a

paravirtualized XEN guest from Domain-0:



boot from a (minimal) paralell system


This is imho the best solution. You can install a very small Linux in one single file and then add this disk as boot-device to the

configuration file of the virtual machine you want to access.

see here how you can install a paravirtualized XEN guest --> link. Be carefull: You should give the rescue image a different name

for the root volume group (e.g. rescuevg) just to make sure you dont mix up filesystems from the rescue image with the ones from

the broken image.

Lets assume that our minimal image file is "rescue.img". All you have to do now is add this image as primary disk to your DomU configuration.

legacy configuration file in /etc/xen/


before:

 


(...)

disk = [ "tap:aio:/xen/mybrokenimage.img,xvda,w"]

(...)


after:


(...)

disk = ["tap:aio:/xen/rescue.img,xvda,w", "tap:aio:/xen/mybrokenimage.img,xvdb,w"]

(...)

new configuration file (xml)

virsh dumpxml DOMAINNAME > guest.xml
vi guest.xml

before:


(...)

<disk type='file' device='disk'>
<driver name='file'/>
<source file='/xen/mybrokenimage.img'/>
<target dev='xvda'/>
</disk>

(...)


after:


(...)

<disk type='file' device='disk'>
<driver name='file'/>
<source file='/xen/rescue.img'/>
<target dev='xvda'/>
</disk>

<disk type='file' device='disk'>
<driver name='file'/>
<source file='/xen/mybrokenimage.img'/>
<target dev='xvdb/>
</disk>

(...)


virsh undefine DOMAINNAME
virsh define guest.xml



Now you can start your virtual machine and try to fix your broken image.

 

 

Mount guest filesystems from Domain-0



http://fedoraproject.org/wiki/Docs/Fedora8VirtQuickStart#Accessing_data_on_a_guest_disk_image

 

Comments (0)
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:D:angry::angry-red::evil::idea::love::x:no-comments::ooo::pirate::?::(
:sleep::););)):0
Security
Please input the anti-spam code that you can read in the image.

!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved."

 
mad mad mod, Powered by Joomla! and designed by SiteGround web hosting