LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 07-13-2020, 04:56 PM   #1
marietto2008
LQ Newbie
 
Registered: May 2020
Posts: 23

Rep: Reputation: Disabled
Windows 10 installed on /dev/sdb can't boot with OVFM and the Xen-hypervisor 4.14 unstable.


Hello to everyone.


I would like to boot Windows 10 x64 bit that is installed on /dev/sdb with the xen-hypervisor 4.14 unstable that I have installed on Ubuntu 20.04. This is the partition scheme of the disk :


Code:
root@ziomario-I9:/etc/xen# fdisk /dev/sdb -l

Disk /dev/sdb: 465,78 GiB, 500107862016 bytes, 976773168 sectors

Disk model: Samsung SSD 860

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: gpt

Disk identifier: 98970711-6557-43CB-86D8-14B5F013ECFD


Dispositivo Start Fine Settori Size Tipo

/dev/sdb1 34 262177 262144 128M Microsoft reserved

/dev/sdb2 264192 1286143 1021952 499M Windows recovery environment

/dev/sdb3 1286144 1488895 202752 99M EFI System

/dev/sdb4 1488896 975591423 974102528 464,5G Microsoft basic data

/dev/sdb5 975591424 976773119 1181696 577M Windows recovery environment
This is what xl info says :


Code:
root@ziomario-I9:/etc/xen# xl info

host : ziomario-I9

release : 5.4.0-42-generic

version : #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020

machine : x86_64

nr_cpus : 16

max_cpu_id : 15

nr_nodes : 1

cores_per_socket : 8

threads_per_core : 2

cpu_mhz : 3600.525

hw_caps : bfebfbff:77faf3ff:2c100800:00000121:0000000f:009c6fbf:00000000:00000100

virt_caps : pv hvm hvm_directio pv_directio hap shadow iommu_hap_pt_share

total_memory : 32627

free_memory : 16527

sharing_freed_memory : 0

sharing_used_memory : 0

outstanding_claims : 0

free_cpus : 0

xen_major : 4

xen_minor : 14

xen_extra : -unstable

xen_version : 4.14-unstable

xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64

xen_scheduler : credit2

xen_pagesize : 4096

platform_params : virt_start=0xffff800000000000

xen_changeset : Sun May 24 15:01:02 2020 +0100 hg:5eadf9363c25-dirty

xen_commandline : placeholder

cc_compiler : gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0

cc_compile_by : ziomario

cc_compile_domain :

cc_compile_date : Mon Jul 13 18:27:01 CEST 2020

build_id : 255611be2bbd2a63ef149b4d6c13f8a35bafc61f

xend_config_format : 4

Ths is the config file that I'm using :


Code:
builder = 'hvm'
bios='ovmf'
#bios_override = '/usr/share/OVMF/OVMF_CODE.fd'
vif = [ 'type=ioemu, bridge=xenbr0' ]
memory = 8192
name = "windows-10" # domain prefix name
disk = ['/dev/sdb,raw,sda,rw']
boot = "c"
sdl=1
vcpus = 6 # number of cpu's to assign
stdvga = 0
serial = 'pty'
usbdevice = 'tablet' # Required for USB mouse
on_poweroff = 'destroy'
on_reboot   = 'destroy'
on_crash    = 'preserve'
device_model_args_hvm = [
  # Debug OVMF
  '-chardev', 'file,id=debugcon,path=/etc/xen/ovmf.log,',
  '-device', 'isa-debugcon,iobase=0x402,chardev=debugcon',
]
what's the problem ? that I'm not able to boot Windows 10 on the disk /dev/sdb. I mean,ovmf works,but it is not able to detect the disk where is installed Windows 10,like you can see below :

https://ibb.co/q5Q33gh

I tried a lot of combinations,but none worked. do you know what could be ? thanks.

Last edited by marietto2008; 07-13-2020 at 04:59 PM.
 
Old 07-14-2020, 03:06 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,974

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
Is this Windows 10 some OEM install that works on it's own when booted to the physical machine?
 
Old 07-15-2020, 11:05 AM   #3
marietto2008
LQ Newbie
 
Registered: May 2020
Posts: 23

Original Poster
Rep: Reputation: Disabled
yes,it boots properly in physical mode. Today I tried to convert the EFI disk in a MBR disk and I tried to boot it. Also didn't work...


have converted an EFI disk to MBR and I have these partitions :

root@ziomario-I9:/etc/xen# fdisk /dev/sda -l
Disk /dev/sda: 465,78 GiB, 500107862016 bytes, 976773168 sectors
Disk model: CT500MX500SSD4
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x95ca113b

Dispositivo Avvio Start Fine Settori Size Id Tipo
/dev/sda1 34 262177 262144 128M c W95 FAT32 (LBA)
/dev/sda2 264191 1286143 1021953 499M f W95 Esteso (LBA)
/dev/sda3 1286144 1488895 202752 99M ef EFI (FAT-12/16/32)
/dev/sda4 1488896 975591423 974102528 464,5G 7 HPFS/NTFS/exFAT
/dev/sda5 264192 1286143 1021952 499M 27 Hidden NTFS WinRE

let's say that i want to boot windows 10,how could be the disk parameters format ? I did something like this :

disk = ['/dev/sda,raw,hda,rw']

this is the full cfg file :

builder = 'hvm'
#bios='ovmf'
#bios_override = '/usr/share/OVMF/OVMF_CODE.fd'
vif = [ 'type=ioemu, bridge=xenbr0' ]
memory = 8192
# shadow_memory = 64
name = "windows-10" # domain prefix name
disk = ['/dev/sda,raw,hda,rw']
boot = "c"
sdl=1
vcpus = 6 # number of cpu's to assign
stdvga = 0
serial = 'pty'
usbdevice = 'tablet' # Required for USB mouse
on_poweroff = 'destroy'
on_reboot = 'destroy'
on_crash = 'destroy'

device_model_args_hvm = [
# Debug OVMF
'-chardev', 'file,id=debugcon,path=/etc/xen/ovmf2.log,',
'-device', 'isa-debugcon,iobase=0x402,chardev=debugcon',
]

but it won't boot. it hangs on the beginning :

https://ibb.co/zX5KLt9
 
Old 07-15-2020, 02:34 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,974

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
The hal has changed. If you want to run Windows 10 in a VM you need to get a new iso or fix the hal each time. If you do fix the hal issue then you have to get past authentication. Easier to get an iso from MS to run in a vm.
 
Old 07-16-2020, 06:57 PM   #5
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,442
Blog Entries: 7

Rep: Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551
You can't simply boot a physical installation as a VM. It doesn't work that way. You need to convert it to a VM first. I've used the free conversion tool from vmware to do this a few times with good success.

Quite often though, it works out better if you do a fresh installation using a new iso from Microsoft as mentioned by jefro above. Among other things, a P2V conversion will come with a pile of redundant drivers.

Re: Licensing: Microsoft will allow you to convert a physical OEM installation to a virtual machine if you link it with a Microsoft account. Beware that it will deactivate your physical installation, so this is a one-way move. The same licence can only be used on one machine, be it physical or virtual. Alternatively, you can buy a licence for a VM once it is installed and running, but they will charge you full retail price because a VM doesn't count as an OEM install.
 
Old 07-16-2020, 08:34 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,974

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
Ok, per rkelsen's idea.

https://answers.microsoft.com/en-us/...6-1e63d50a4212
 
Old 07-16-2020, 10:11 PM   #7
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,442
Blog Entries: 7

Rep: Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551
This works for a p2v conversion:

https://support.microsoft.com/en-au/...ardware-change
Quote:
To use the Activation troubleshooter:
1. Sign in as an administrator. For more info, see Create a local user or administrator account in Windows 10.
2. Select the Start button, then select Settings > Update & Security > Activation > Troubleshoot . The troubleshooter will show Windows can’t be activated on your device.
3. Open Activation settings
4. Select I changed hardware on this device recently, then select Next.
5. Enter your connected Microsoft account and password, then select Sign in. The troubleshooter will only work with the connected Microsoft account.
6. From the list of devices that are linked to your Microsoft account, select the check box next to This is the device I’m using right now.
7. Select Activate.
Bear in mind that you've got to link the physical machine to your Microsoft account first. And you can check to see that it appears under 'devices' first. If it's there, then the above steps will work to re-assign the licence to a VM. Be sure to turn the physical machine off at this point.

Once the VM is activated, you can delete the virtual hard disk, make a new one and run a clean install and it will remain activated. If you turn on the physical machine again, it will become deactivated as soon as it pings the activation servers.
 
  


Reply

Tags
ubuntu 20.04, xenvirtualization



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Xen Project Hypervisor: Virtualization and Power Management are Coalescing into an Energy-Aware Hypervisor LXer Syndicated Linux News 0 07-11-2018 06:59 PM
LXer: Learning Xen: Converting Existing Non-Xen Hypervisor Images for Use in Xen LXer Syndicated Linux News 0 08-24-2013 10:00 AM
Can i dd if=/dev/sdb of=/dev/sdc if hdsize(sdb)>hdsize(sdc) & size(sdb)<hdsize(sdc) ? ununun Linux - Software 6 06-28-2011 11:48 AM
[SOLVED] Grub: If exists sdb, then boot sdb, else sda defaultyeti Linux - Desktop 6 06-28-2011 02:38 AM
is ubuntu unstable less unstable than debian unstable? lefty.crupps Ubuntu 9 10-14-2005 01:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 07:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration