Re: [qubes-users] How to export (H)VMs from Qubes/Xen to VMware vSphere

2017-10-14 Thread Unman
On Sat, Oct 14, 2017 at 11:28:31PM +0100, Unman wrote:
> On Sat, Oct 14, 2017 at 03:22:36PM -0400, '[799]' via qubes-users wrote:
> > Hello,
> > 
> > as mentioned in the other thread, I was able to successfully create a cent 
> > os minimal HVM.
> > There are still same smaller problems, as for example the time from grub 
> > selection menue to the login prompt is ~10min, but at least I get a login 
> > prompt and can login.
> > 
> > *** Converting QEmu/Qubes disk to a VMware .vmdk image ***
> > >> Me: How can I get a (H)VM out of Qubes into a VMware VM.
> > > I assume you use Qubes 3.2. You can get VM"s disk image from
> > > /var/lib/qubes/appvms//root.img. This is raw disk image in
> > > sparse file. You can convert it to vmdk using qemu-img tool, like this:
> > > qemu-img convert -f raw -O vmdk /path/to/root.img /path/to/root.vmdk
> > 
> > [USER@dom0 ~]$ ls -lah /var/lib/qubes/appvms/my-test/ | grep .img
> > -rw-rw-r-- 1 USER qubes 2.0G Oct 14 16:07 private.img
> > -rw-rw-r-- 1 USER qubes  20G Oct 14 17:26 root.img
> > -rw-rw-r-- 1 USER qubes  22G Oct 14 16:07 volatile.img
> > 
> > During the installation of Cent OS, I choosed to only use the 20GB root 
> > image, not the private 2GB image, as such I didn't understand the size ls 
> > is reporting.
> > 
> > [USER@dom0 home]$ du -sh /var/lib/qubes/appvms/my-test/* | grep .img
> > 0 /var/lib/qubes/appvms/my-test/private.img
> > 1.3G /var/lib/qubes/appvms/my-test/root.img
> > 0 /var/lib/qubes/appvms/my-test/volatile.img
> > 
> > this filesizes make more sense to me.
> > As Marek suggested I tried to convert the image using qemu-img, but as this 
> > is not available in dom0 I used qemu-img-xen:
> > (my-test is my newly created Cent OS HVM, created from a CentOS minimal ISO)
> > 
> > cd /var/lib/qubes/appvms/my-test
> > qemu-img convert -f raw -O vmdk root.img root.vmdk
> > 
> > this throws an error direct after starting:
> > qemu-img: error while writing
> > 
> > I have also looked at
> > https://www.howtoforge.com/how-to-convert-a-xen-virtual-machine-to-vmware
> > but this uses another syntax (which I also tried but didn't work).
> > 
> > Strangely trying to get informatiom from my root.img via...
> > qemu-img-xen info root.img
> > .. results in an error:
> > qemu-img: Could not open 'root.img'
> > While I am in the folder and I can see the file with ls.
> > 
> > Any idea where to go from here?
> > Can someone try to run qemu-img-xen on their system to see if they can get 
> > any information out of their image files?
> > 
> > [799]
> 
> For info to work specify '-f raw'
> 
> I've never got qemu-img-xen in dom0 to work properly for conversion.
> A reasonable workaround is to install qemu-img in a qube, and then
> attach the root.img using qvm-block -A .
> 
> Then you can run qemu-img convert in the qube, and export it from there
> as you wish. Works reasonably well.
> 
> unman

Also, for completeness I should say that while nested virtualisation
is not supported, it IS possible.
I've run both virtualbox and vmware from within qubes in the past - the
performance isn't great and the security considerations might put you
off, but it is possible.
You will have to do some hacking about to get the kernel modules
working, and I wouldn't generally recommend it. Vmware I couldn't get
working on Debian at all.

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20171014235950.5tgn5nhnt6cfhuyn%40thirdeyesecurity.org.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] How to export (H)VMs from Qubes/Xen to VMware vSphere

2017-10-14 Thread Unman
On Sat, Oct 14, 2017 at 03:22:36PM -0400, '[799]' via qubes-users wrote:
> Hello,
> 
> as mentioned in the other thread, I was able to successfully create a cent os 
> minimal HVM.
> There are still same smaller problems, as for example the time from grub 
> selection menue to the login prompt is ~10min, but at least I get a login 
> prompt and can login.
> 
> *** Converting QEmu/Qubes disk to a VMware .vmdk image ***
> >> Me: How can I get a (H)VM out of Qubes into a VMware VM.
> > I assume you use Qubes 3.2. You can get VM"s disk image from
> > /var/lib/qubes/appvms//root.img. This is raw disk image in
> > sparse file. You can convert it to vmdk using qemu-img tool, like this:
> > qemu-img convert -f raw -O vmdk /path/to/root.img /path/to/root.vmdk
> 
> [USER@dom0 ~]$ ls -lah /var/lib/qubes/appvms/my-test/ | grep .img
> -rw-rw-r-- 1 USER qubes 2.0G Oct 14 16:07 private.img
> -rw-rw-r-- 1 USER qubes  20G Oct 14 17:26 root.img
> -rw-rw-r-- 1 USER qubes  22G Oct 14 16:07 volatile.img
> 
> During the installation of Cent OS, I choosed to only use the 20GB root 
> image, not the private 2GB image, as such I didn't understand the size ls is 
> reporting.
> 
> [USER@dom0 home]$ du -sh /var/lib/qubes/appvms/my-test/* | grep .img
> 0 /var/lib/qubes/appvms/my-test/private.img
> 1.3G /var/lib/qubes/appvms/my-test/root.img
> 0 /var/lib/qubes/appvms/my-test/volatile.img
> 
> this filesizes make more sense to me.
> As Marek suggested I tried to convert the image using qemu-img, but as this 
> is not available in dom0 I used qemu-img-xen:
> (my-test is my newly created Cent OS HVM, created from a CentOS minimal ISO)
> 
> cd /var/lib/qubes/appvms/my-test
> qemu-img convert -f raw -O vmdk root.img root.vmdk
> 
> this throws an error direct after starting:
> qemu-img: error while writing
> 
> I have also looked at
> https://www.howtoforge.com/how-to-convert-a-xen-virtual-machine-to-vmware
> but this uses another syntax (which I also tried but didn't work).
> 
> Strangely trying to get informatiom from my root.img via...
> qemu-img-xen info root.img
> .. results in an error:
> qemu-img: Could not open 'root.img'
> While I am in the folder and I can see the file with ls.
> 
> Any idea where to go from here?
> Can someone try to run qemu-img-xen on their system to see if they can get 
> any information out of their image files?
> 
> [799]

For info to work specify '-f raw'

I've never got qemu-img-xen in dom0 to work properly for conversion.
A reasonable workaround is to install qemu-img in a qube, and then
attach the root.img using qvm-block -A .

Then you can run qemu-img convert in the qube, and export it from there
as you wish. Works reasonably well.

unman

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20171014222831.apu5fd4776w3p3xv%40thirdeyesecurity.org.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] How to export (H)VMs from Qubes/Xen to VMware vSphere

2017-10-14 Thread '[799]' via qubes-users
Hello,

as mentioned in the other thread, I was able to successfully create a cent os 
minimal HVM.
There are still same smaller problems, as for example the time from grub 
selection menue to the login prompt is ~10min, but at least I get a login 
prompt and can login.

*** Converting QEmu/Qubes disk to a VMware .vmdk image ***
>> Me: How can I get a (H)VM out of Qubes into a VMware VM.
> I assume you use Qubes 3.2. You can get VM"s disk image from
> /var/lib/qubes/appvms//root.img. This is raw disk image in
> sparse file. You can convert it to vmdk using qemu-img tool, like this:
> qemu-img convert -f raw -O vmdk /path/to/root.img /path/to/root.vmdk

[USER@dom0 ~]$ ls -lah /var/lib/qubes/appvms/my-test/ | grep .img
-rw-rw-r-- 1 USER qubes 2.0G Oct 14 16:07 private.img
-rw-rw-r-- 1 USER qubes  20G Oct 14 17:26 root.img
-rw-rw-r-- 1 USER qubes  22G Oct 14 16:07 volatile.img

During the installation of Cent OS, I choosed to only use the 20GB root image, 
not the private 2GB image, as such I didn't understand the size ls is reporting.

[USER@dom0 home]$ du -sh /var/lib/qubes/appvms/my-test/* | grep .img
0 /var/lib/qubes/appvms/my-test/private.img
1.3G /var/lib/qubes/appvms/my-test/root.img
0 /var/lib/qubes/appvms/my-test/volatile.img

this filesizes make more sense to me.
As Marek suggested I tried to convert the image using qemu-img, but as this is 
not available in dom0 I used qemu-img-xen:
(my-test is my newly created Cent OS HVM, created from a CentOS minimal ISO)

cd /var/lib/qubes/appvms/my-test
qemu-img convert -f raw -O vmdk root.img root.vmdk

this throws an error direct after starting:
qemu-img: error while writing

I have also looked at
https://www.howtoforge.com/how-to-convert-a-xen-virtual-machine-to-vmware
but this uses another syntax (which I also tried but didn't work).

Strangely trying to get informatiom from my root.img via...
qemu-img-xen info root.img
.. results in an error:
qemu-img: Could not open 'root.img'
While I am in the folder and I can see the file with ls.

Any idea where to go from here?
Can someone try to run qemu-img-xen on their system to see if they can get any 
information out of their image files?

[799]

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/rNSGEa5I1T-hmCvGdH681dALa6ddM89Bx41o-WF_Q_mbLtytQ9d7KB5f1tYFKqZ3PJTkdGhsdyFDT8cQQjBpMIktF3LLHLmyeObr0w5x0SU%3D%40protonmail.com.
For more options, visit https://groups.google.com/d/optout.


[qubes-users] How to export (H)VMs from Qubes/Xen to VMware vSphere

2017-10-12 Thread '[799]' via qubes-users
Hello,

Currently I still need to run a 2nd OS to use VMware Workstation to 
prepare/test VMs/Setup for customers.

I'd like to prepare VMs in Qubes and then migrate/export them to the customers 
environment which are mostly based on VMware vSphere/ESXi.

Questions:

a) How can I get a (H)VM out of Qubes into a VMware VM. If I know what to do, I 
can script this to get a good workflow.
Worst Case Szenario would be to backup the VM, then manually create a new VM in 
vSphere, boot with a live Linux and recover the VM - so mainly migrating the 
harddrive from Qubes/Xen to a VMware .vmdk/virtual harddrive

Other possible approach:

b) Is it possible to do "nested virtualization" and create something like a 
'monster-VM" in Qubes in which I install VMware Workstation or ESXi to 
prepare/test VMs and then export them from there?

c) Do you have any other idea how to use Qubes as primary OS to provision VMs 
locally and migrate them to vSphere/ESXi at the end of the workflow?
Or is this task not solveable in a good way with Qubes?

Working with Qubes at the customer location would greatly improve security for 
both sides as I can use separate VMs for each customer or work with disposable 
VMs when connecting to the network.p

Kind regards

[799]

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/P_biCS1Ene0bEltrviezlrT-b4crULnwAB-RglLyZjZygOs6RMfcMJxHxBX4wbYGDnpv35-ZdbKXWy_ND8Eiw2PJkw9RJHtoOHZ4Ew-tRxo%3D%40protonmail.com.
For more options, visit https://groups.google.com/d/optout.