Linux – What are XSAVE and /dev/xvda1

linuxxen

So I logged into a new Amazon EC2 instance created with one of their new "standard" AMI's. Instead of seeing /dev/sda1 I see /dev/xvda1 . This relates to Xen somehow.

Here's what I can find that mentions this:

http://www.ioncannon.net/system-administration/1290/how-to-build-compile-a-custom-linux-kernel-for-ec2/

It says: "Apply the following patch to disable XSAVE". (someone must have done that before building the standard AMI)

Then it says: "Note that the root device here is /dev/xvda1 instead of /dev/sda1. This is caused by the XSAVE patch."

And finally it says: "Note that the devices here are /dev/sda1 and not /dev/xvda1. That is a little confusing but the AWS system doesn't see the devices in the same way your AMI will once it is booted."

Yes, it is kind of confusing and I would like to understand it.

Googling XSAVE and XVDA1 are not helpful at all.

Best Answer

XSAVE and /dev/xvda1 have nothing to do with each other. That link is incorrect.

XSAVE is a CPU feature that Xen should not present to a kernel running in a VM. See https://partner-bugzilla.redhat.com/show_bug.cgi?id=524719

When configuring Xen you present a block device to the guest VM (domU, "AMI"). By convention (was a requirement in the past) they are prefixed with "xvd" (Xen virtual disk). In the host OS (dom0, "AWS system") this block device will be called something different. In the EC2 case it is a SCSI-like disc hence the "sd" prefix.