Problems when I try to connect an phisical Hard Disk to a VM

nick

Renowned Member
Mar 28, 2007
364
1
83
Hi All,

Ai try to create a VM with access to a real Hard Disk. So, I create the VM and after that I change the configuration after I add:

qm set 107 --ide0 /dev/sda1

sda1 - is the new empty hard disk

I boot from a Windows7 iso, but the system don't see my disk. What I need to do?
 
Hi All,

Ai try to create a VM with access to a real Hard Disk. So, I create the VM and after that I change the configuration after I add:

qm set 107 --ide0 /dev/sda1

sda1 - is the new empty hard disk

I boot from a Windows7 iso, but the system don't see my disk. What I need to do?
Hi,
you tunnel a partition to a VM - so you don't get on the vm-side a disk with mbr and partitiontable.
If you use linux in the vm you can mount the partition with mount "/dev/sdb /mnt", but i'm no windows-expert (luck).
Perhaps you tunnel the whole disk?

Udo
 
post the VM config file:

Code:
cat /etc/qemu-server/VMID.conf

do you poweroff and power on?
 
Yes...I intend to give access to all disk...including MBR (if is possible)
 
yes. twice. I reboot also the PVE server...


The config is:

name: WEB-SERVER
ide2: local:iso/Windows7Professional.iso,media=cdrom
vlan0: e1000=86:FB:1E:7C:7E:E8
bootdisk: ide0
ostype: w2k8
ide0: /dev/sda1
memory: 2048
sockets: 1
onboot: 0
cores: 1
boot: dc
freeze: 0
cpuunits: 1000
acpi: 1
kvm: 1

In attachment you can see how she look the machine. The disk it's an IDE Device, 1 partition formated in NTFS file system.
 

Attachments

  • 107.png
    107.png
    1.8 KB · Views: 7
Last edited:
how did you create the partition sda1?

if you attach a new hd, you need to partition with fdisk:
Code:
fdisk /dev/sda

create a new partition and save, now you have sda1 and you can attach it to the VM, like you did. no idea why your windows does not see it.
 
A NTFS partition was already created (as /dev/sda1); now I delete her and recreate a blank partition. But still not see the disk. I try with Windows 2003...
 
Hi,
try to boot a linux-live-cd (like grml) and look for the disk with "fdisk -l".
And if no other processes need a partition of the disk, map the whole disk:
Code:
ide0: /dev/sda
But i'm wondered about sda - is this not your system-disk?

Udo
 
no...it's not the system disk! I just recreate the partition ;)

I still investigate!
 
HI All,

I discover what was the error. The cofiguration need to be set to give access to the entire device...not to a partition. So the config need to be set:

IDE0: /dev/sda

After this change I was capable to see the drive and to partition direct from Windows setup menu.

Thank you for support!