Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to get my Ubuntu server (running as a guest in KVM) to use one of the hosts SATA disks? I Want it to have exclusive access and I believe there should be a "native" way. I have googled this for some time but found nothing.

Sorry if there are spelling errors, not my native tongue.

share|improve this question
up vote 2 down vote accepted

If you are using virt-manager to mange your KVM instances, you can just open it, click on your instance, go to View → Details. There is a button "Add Hardware" were you can add Storage, which may also be a whole hard disk drive. Use 'VirtIO' as a means to access the hard drive - this works well with recent linux kernels, if your guest operating system is linux.

Beware that you do not use the hard disk on the hypervisor as long as the instance is running. E.g. if you mount a filesystem on the hypervisor that resides on the disk and is mounted from within the virtual machine, you are probably going to destroy the filesystem. So, a little extra caution pays well ;-)

share|improve this answer

The best way to do this in virt-manager, is to add the disk as a storage pool. To do that, rightclick the localhost(QEMU) connection, select "details", "storage" tab, click the "plus" button and follow the wizard to add a new storage pool based on the physical disk (you get a choice there, can actually break the disk into parts with LVM) Then create a volume on that disk, and when you create a VM, attach the pre-created volume

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.