Cant create Windows App VM based on a template

357 views
Skip to first unread message

gal...@gmail.com

unread,
Apr 20, 2018, 1:32:47 PM4/20/18
to qubes-users
I'm using Qubes 4 and have created a Windows template VM with windows 7. I've installed all the updates and Qubes windows tools which has made a separate private 'disk' for the user settings/files. This all works fine.

I now want to make an AppVM based on my template. When I do this, the AppVM does not have a private disk so does not have the user profile/desktop, etc.

I dont know what has gone wrong. I'd appreciate any help.

gal...@gmail.com

unread,
Apr 23, 2018, 4:15:19 AM4/23/18
to qubes-users
Anyone?

Ivan Mitev

unread,
Apr 23, 2018, 6:25:52 AM4/23/18
to qubes...@googlegroups.com


On 04/23/2018 11:15 AM, gal...@gmail.com wrote:
> Anyone?

That's not something I tested when writing the windows VM doc, it looks
like another issue with QWT under 4.0.

I just tried to create a win AppVM based on a template (if anyone else
wants to try, see steps below) and indeed, the private disk is not
configured; it's not missing though - you can format it and attach it to
d: in windows' disk manager. Obviously the user profile folders will be
missing ; one workaround is to recreate them (didn't test it) or to copy
the templateVM's private disk, like so:

sudo dd conv=sparse if=/dev/mapper/qubes_dom0-vm--test2--private
of=/dev/mapper/qubes_dom0-vm--my--new--qube--private

("test2" is the windows TemplateVM, "my-new-qube" is an AppVM based on
the "test2" TemplateVM ; I don't know if conv=sparse helps).

That's really "low-level" and error-prone so be extra careful with dd;
maybe there are higher level qubes* (or LVM) tools that can perform
that, I didn't have time to check

Once the private disk is copied everything seems to work ; I only get a
popup for xen stuff asking me to restart the VM but simply clicking "no"
is enough.


steps:
- clone a working windows install into a TemplateVM (qvm-clone --class)
- create an AppVM based on this TemplateVM (had to fix the following
prefs because they weren't set properly: kernel, maxmem, memory, virt_mode
- replicate the private disk with `dd`
- start the new AppVM

gal...@gmail.com

unread,
Apr 23, 2018, 6:46:07 AM4/23/18
to qubes-users
Thank you very much, that had worked.

Ivan Mitev

unread,
Apr 23, 2018, 7:13:43 AM4/23/18
to qubes...@googlegroups.com


On 04/23/2018 01:46 PM, gal...@gmail.com wrote:
> Thank you very much, that had worked.

great !

if you have other issues (and/or find workarounds) please post them to
this thread, or in:

https://github.com/QubesOS/qubes-issues/issues/3585

Daniil .Travnikov

unread,
Aug 5, 2018, 6:04:02 AM8/5/18
to qubes-users
понедельник, 23 апреля 2018 г., 6:25:52 UTC-4 пользователь Ivan Mitev написал:
How did you create TemplateVM? Or you create StandaloneVM at first with HVM virt_mode and then cloned somehow?

I am asking because when I am creating StandaloneVM all is right and working correctly.

But when I am trying to create Windows7 TemapletVM I got error: "Start failed: internal error: libxenlight failed to create new domain 'win7'" (this error existing when I am choosing PVH mode).

Also I don't know which virt_mode I must choose when I am trying to create win7 TemplateVM and which actions will be corret.

Unman

unread,
Aug 5, 2018, 6:22:28 AM8/5/18
to Daniil .Travnikov, qubes-users
I've just replied in the other thread.
Use HVM and set kernel to none

Daniil .Travnikov

unread,
Aug 5, 2018, 6:46:41 AM8/5/18
to qubes-users
воскресенье, 5 августа 2018 г., 6:22:28 UTC-4 пользователь Unman написал:
> On Sun, Aug 05, 2018 at 03:04:02AM -0700, Daniil .Travnikov wrote:
> > понедельник, 23 апреля 2018 г., 6:25:52 UTC-4 пользователь Ivan Mitev написал:
> > How did you create TemplateVM? Or you create StandaloneVM at first with HVM virt_mode and then cloned somehow?
> >
> > I am asking because when I am creating StandaloneVM all is right and working correctly.
> >
> > But when I am trying to create Windows7 TemapletVM I got error: "Start failed: internal error: libxenlight failed to create new domain 'win7'" (this error existing when I am choosing PVH mode).
> >
> > Also I don't know which virt_mode I must choose when I am trying to create win7 TemplateVM and which actions will be corret.
> >
> I've just replied in the other thread.
> Use HVM and set kernel to none


Actually I am doing this:

qvm-create win7 --class TemplateVM --property virt_mode=hvm --label=green
qvm-prefs win7 memory 4096
qvm-prefs win7 maxmem 4096
qvm-prefs win7 debug true
qvm-prefs win7 kernel ''
qvm-volume extend win7:root 42g
qvm-start win7 --cdrom=dom0:/home/user/Downloads/Win7.iso

And VM starting normally and going to install, but when he is hoing to reboot, the yellow circle do not off and VM is working but without VM window.


If first command I am doing with '--class StandaloneVM' all is ok, but when I am choose '--class TemplateVM' then I got this problem.


Maybe existing another way to create TemapleVM for Windows 7 OS? I mean I am need in creating independent VM's where the main template will be the Winows 7.

Daniil .Travnikov

unread,
Aug 5, 2018, 7:25:50 AM8/5/18
to qubes-users
Also I tried this command now:

qvm-prefs win7 qrexec_timeout 300


And VM successfully turned off. But when I started for continue installation - the same situation like before this command.

VM just with yellow circle and without any window.

Unman

unread,
Aug 5, 2018, 7:39:31 AM8/5/18
to Daniil .Travnikov, qubes-users
Try setting qvm-features win7 video-model cirrus

Then once installed reset to get full resolutions.

Daniil .Travnikov

unread,
Aug 5, 2018, 10:06:19 AM8/5/18
to qubes-users
воскресенье, 5 августа 2018 г., 7:39:31 UTC-4 пользователь Unman написал:
Thank you very much it works for me!

kamil....@gmail.com

unread,
Jan 24, 2020, 12:18:57 PM1/24/20
to qubes-users
In my case, I have a problem with this "dd workaround".
Env:
- QubesOS 4.0.3 and latest QWT 4.0.1-3
When:
1) create Windows 7 x64 pro HVM template (private 2GB)
2) install QWT this on 4.0 qube
3) clone StandaloneVM from prepared template (same parameters, private 2GB)
4) a) Windows on StandaloneVM crash because User Login service could not find profiles.
    b) recreate StandaloneVM, try to dd -> ERROR
Ad. ERROR
After 2GB of copy "No space on device left" what is wrong information.
After remove CONV flag, the same.
After add to cmd line "bs=1M count=2048", Copy pass, but still result from 4a).

Do You have any ideas?
Reply all
Reply to author
Forward
0 new messages