1

I use windows server 2008r2 with role Hyper-V. The guest system is Ubuntu 12.04 LTC. It is situated on the dynamic virtual hard disk VHD1.

I add another VHD2 disk as SCSI. Now I want to mount this disk to Ubuntu. How can I do this?

I'm novice. My problem is that I do not know where new VHD situated. I add this VHD2 disk in hyper-v manager, but I cannot find it in Ubuntu

I can not find this VHD2 in media

Image1

Image 2

Is /dev/sdb my VHD2?

  • The same way you would mount any other drive in Ubuntu, virtual or not. What happened when you tried? – Ƭᴇcʜιᴇ007 Nov 20 '13 at 15:24
0

At first you tell Hyper-V to use the VHD as a Harddrive for the Ububtu.

Second you thell ubuntu to mount the disk to a directory. (in general this is done by ubuntu at boot time via automount more about this by googling fstab or automount).

If it is not done automatically you could mount it yourself with:

mkdir -p /mnt/<diskname>
chmod 755 /mnt/<diskname>

mount /dev/sdX /mnt/<diskname>

X is the corresponding letter a,b,c,d... for the disk you will mount a is the first/system disk so if you have no sticks etc. mounted, b is what you need).

  • eh..., I do this: 1) sudo fdisk -l (i find /dev/sdb) 2) sudo mount /dev/sdb /mnt/database (here i have error about file system) 3) sudo mkfs -t ext4 /dev/sdb (I have warning: /dev/sdb is entire device, not just one partition! Proceed anyway? (y,n) - My problem is that I do not know that /dev/sdb is my VHD2) – AmShegar Nov 21 '13 at 6:34
  • if you do mkfs you will override what is on your disk. is this second vhd a new created one or is this a image with data on it? if there is data ther will also be a partition table so maybe mount /dev/sdb1/mnt/database will work. – konqui Nov 21 '13 at 7:00
  • In hyper-v manager I add only one disk. This disk is empty and do not have the file system. The result of sudo fdisk -l you can see on the picture. Is /dev/sdb my VHD disk? – AmShegar Nov 21 '13 at 7:03
  • i would try this: 1. shutdown, 2. in hyper-v unconnect the image, 3. start linux and look what is there sda etc. 4. shutdown again 5. readd image in hyper-v 6. lokk again the new sdX entry is your disk. – konqui Nov 21 '13 at 7:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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