[Fedora-xen] Where's my VM gone?

Evan Lavelle sa212+fcxen at cyconix.com
Sat Dec 29 16:11:13 UTC 2007


Evan Lavelle wrote:

> How do I get my VM back? Is there some way to get the XML config back? 
> If not, is my only option to manually make an /etc/xen config file? 

There don't seem to be any surprises in the VM, and a trivial config 
file boots it. For anyone else who comes this way, and doesn't know how 
to do this, the config file is:

# -*- mode: python; -*-
name       = "fc8-64-001"
memory     = 1024
vcpus      = 1
vif        = [ 'mac=00:0f:b5:ae:4f:2b, bridge=xenbr0' ]
disk       = [ 'phy:/dev/VG_Guests/FC8-64-001,hda,w'  ];
bootloader ="/usr/bin/pygrub"
boot       = "cd"
sdl        = 1
vnc        = 0

1 - name this file (for example) fc8-64.pv (the name doesn't matter)

2 - put it in /etc/xen

3 - change the VM name ("fc8-64-001") to whatever you want, as long as 
all your VM names are unique

4 - the memory line is the maximum to allocate to this VM, in MB (this 
config is for 1GB. 512MB is common, but don't make it less than about 256MB)

5 - 'vcpus' is the number of CPUs to allocate to this VM; it defaults to 
1 anyway. I'm running on dual-core, so I allocate one to the current 
DomU, and one to Dom0

6 - the MAC address is optional; you'll get a random one if you delete 
everything before 'bridge'

7 - substitute '/dev/VG_Guests/FC8-64-001' for whatever the path to your 
device or image file is (for example, /var/lib/xen/images/myimage)

8 - start your VM with
# /usr/sbin/xm create -c fc8-64.pv

9 - xm searches for 'fc8-64.pv' in /etc/xen (or you can put it somewhere 
else and supply a full path). the '-c' turns your shell into the DomU 
console. you'll see the DomU grub loader screen. You need to select the 
Xen kernel; not the stock kernel. This will be selected by default 
anyway, if you leave it long enough.

10 - the boot messages appear on the console; you'll get a window on the 
Dom0 when booting completes.

Evan




More information about the Fedora-xen mailing list