WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] No swap on domU

I don't think you can mount a swapfile as a physical disk like that.  You'll need to create a partition structure in the file, and set the partition as swap.

From Dom0:

# losetup -f /dev/xen00/debian5-swap
# fdisk /dev/loop0 (or whatever loop device it creates; check with losetup -a)
(create your swap partition)
# kpartx -av /dev/loop0
# mkswap /dev/mapper/loop0p1
# kpartx -d /dev/loop0
# losetup -d /dev/loop0

Or you can do a lot of this work natively from the DomU OS.

Cheers,
-Dustin


On Thu, Aug 20, 2009 at 5:00 AM, Fajar A. Nugraha <fajar@xxxxxxxxx> wrote:
On Thu, Aug 20, 2009 at 3:17 PM, Andrey Varsavsky<alex.faq8@xxxxxxxxx> wrote:
> Hi guys.
> DomU config
>
> disk        = [
>                  'phy:/dev/xen00/debian5-base,sda1,w',
>                  'phy:/dev/xen00/debian5-swap,sda2,w',
>              ]
> -----------------------
> mkswap /dev/xen00/debian5-swap
>
> But in domU in booting:
> Activating swap...failed.

What is your domU fstab like? does it say swap on sda2?
Or perhaps you use newer kernels, which silently convert the disk to xvda2?

--
Fajar

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>