Disk passthru to windows problems

totalimpact

Renowned Member
Dec 12, 2010
133
19
83
I am passing a 4TB USB drive to a Windows 2008 VM:
Code:
virtio2: /dev/sdc,media=disk,cache=writeback,snapshot=off,backup=no,size=4000G

This disk was preformatted NTFS on a windows workstation, but when I connect it to the VM, it sees it as an un-initialized disk, and asks if I want to use a GPT or MBR partition table. I can initialize it in the VM, and use it completely, but connecting the disk to real hardware shows a corrupt partition table.

Any ideas?

pve-manager: 3.0-23 (pve-manager/3.0/957f0862)
running kernel: 2.6.32-20-pve
 
Hi
Some places I would start to look:
- are you sure the disk is not mounted on the host when passing it to the guest ?
- what is actually the output of

Code:
parted print /dev/sdc as seen on the host 

parted print /dev/name_of_device as seen from the guest
 
I have done this many times, and usually I dont need to move the disk to another machine, so it just works, but in this case, I cannot go back and forth from physical to vm with my USB drive, I wonder if it is a problem with GPT.... although I can initialize it as GPT in the guest and start using it just fine.

The drive is definitely only being used by the guest, no other mounts, the guest is Windows, so I cant really show you parted output, unless you need me to boot it from a live cd.

Code:
parted /dev/sdc print
Model: Seagate Backup+ Desk (scsi)
Disk /dev/sdc: 4001GB
Sector size (logical/physical): 4096B/4096B
Partition Table: gpt


Number  Start   End     Size    File system  Name                          Flags
 1      24.6kB  134MB   134MB                Microsoft reserved partition  msftres
 2      135MB   4001GB  4001GB               Basic data partition

In windows it looks like this:
Code:
DISKPART> detail disk


Red Hat VirtIO SCSI Disk Device
Disk ID: 00000000
Type   : SCSI
Status : Online
Path   : 0
Target : 0
LUN ID : 0
Location Path : PCIROOT(0)#PCI(0B00)#SCSI(P00T00L00)
Current Read-only State : No
Read-only  : No
Boot Disk  : No
Pagefile Disk  : No
Hibernation File Disk  : No
Crashdump Disk  : No
Clustered Disk  : No


There are no volumes.
 
Last edited:
Two things I would maybe look like:
- why the parameter 4000GB, shouldn't PVE figure this automatically out ?
I see a disk model of

Model: Seagate Backup+ Desk (scsi)


- Did you do the partioning and foramtting using standard windows tools. I had some bad experiences using Seagates Backup Software drives who were bypassing the Standard windows tools to initialize the disk, so thaht might be a problem.

You can also try from the host the command:

file -s /dev/sdc2

it will print you which filesystem has been found in the partition
 
I removed the size parameter, same behavior.
initialize.png

file -s shows NTFS, it was formatted from a windows 7 workstation.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!