Re: bhyve with Linux guest, how to safely handle updates?

2016-01-28 Thread Neel Natu
Hi Julian,

On Thu, Jan 28, 2016 at 9:22 PM, Julian Elischer  wrote:
> On 29/01/2016 3:13 AM, Neel Natu wrote:
>>
>> Hi Dean,
>>
>> On Thu, Jan 28, 2016 at 10:55 AM, dweimer  wrote:
>>>
>>> On 2016-01-26 8:13 pm, Sergey Manucharian wrote:

 Excerpts from dweimer's message from Tue 26-Jan-16 19:07:
>
>
> Is there anything that normally needs to be done after a Linux kernel
> update to refresh the grub2-bhyve setup?


 The kernel update should not have any effect since grub-bhyve uses the
 virtual disk mapping file, which should point to your linux drive.

 I'm using the following command:

 $ sudo grub-bhyve -m /path/to/device.map -r hd0,msdos1 -M 1024M debian

 where "device.map" contains the following:

 (hd0) /dev/zvol/zroot/linuxdisk1
 (cd0) /stuff/vm/bhyve/debian/debian-testing-amd64-2015-11-30.iso

 "hd0" can be a real disk device, e.g. /dev/sda, or an image file (in
 my case it's a ZFS volume).

 How do you use that VM in VBox? If it's a .vdi file, bhyve will not be
 able to recognize it. You should use a raw HDD image file. To make it
 compatible with VBox you can create a .vmdk file pointing to that raw
 image.

 --
 Sergey
>>>
>>>
>>> I am back to testing again, copied my ZFS Boot Environment over to a
>>> VMware
>>> virtual machine, renamed it and changed IPs, removed the virtual box
>>> stuff,
>>> and enabled bhyve.
>>>
>>> I did some searching and found out that I was using
>>> https://github.com/churchers/vm-bhyve to manage the bhyve virtual
>>> machines
>>> starting and stopping. Sticking with zvol for disk backing, I know its
>>> less
>>> portable.
>>>
>>> I have been able to install a couple of debian virtual machines and play
>>> around with them. So far I have been unable to duplicate the issue I had
>>> before. My current issue which maybe related to running inside a VMware
>>> virtual machine. Is the Linux hwclock and system clock sync issues. If I
>>> power off the vm and reboot it it believes that the disk was modified in
>>> the
>>> future and appears to hang. Its actually doing a fsck I just don't see
>>> status if you wait long enough it finally does come up.
>>>
>>> Has anyone else ran into this issue? I have actually ran the hwclock
>>> -systohc --utc prior to powering down and still had the issue. Tried
>>> changing the hwclock to system time by excluding the --utc from the
>>> command
>>> no change. Incidentally whether I use the --utc or not the hwclock --show
>>> always displays the local time. I couldn't seem to find any documentation
>>> on
>>> bhyve whether or not I should tell the guests that the hwclock is in utc
>>> or
>>> local time.
>>>
>> The "-u" option of bhyve(8) will configure the RTC to present UTC time
>> to the guest (default is localtime).
>
> wouldn't it be best if the -u option had an argument to give the offsett?
> I had this problem with two windows hosts that were supposed to be in
> different timezones.
> I worked around it but...
>

Yes, it would be more flexible.

FWIW the underlying vmmapi call and the ioctl don't need to change
(i.e. the changes would be limited to bhyve(9)).

best
Neel

>
>>
>> best
>> Neel
>>
>>> --
>>> Thanks,
>>> Dean E. Weimer
>>> http://www.dweimer.net/
>>> ___
>>> freebsd-virtualization@freebsd.org mailing list
>>> https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
>>> To unsubscribe, send any mail to
>>> "freebsd-virtualization-unsubscr...@freebsd.org"
>>
>> ___
>> freebsd-virtualization@freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
>> To unsubscribe, send any mail to
>> "freebsd-virtualization-unsubscr...@freebsd.org"
>>
>
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: bhyve with Linux guest, how to safely handle updates?

2016-01-28 Thread Julian Elischer

On 29/01/2016 3:13 AM, Neel Natu wrote:

Hi Dean,

On Thu, Jan 28, 2016 at 10:55 AM, dweimer  wrote:

On 2016-01-26 8:13 pm, Sergey Manucharian wrote:

Excerpts from dweimer's message from Tue 26-Jan-16 19:07:


Is there anything that normally needs to be done after a Linux kernel
update to refresh the grub2-bhyve setup?


The kernel update should not have any effect since grub-bhyve uses the
virtual disk mapping file, which should point to your linux drive.

I'm using the following command:

$ sudo grub-bhyve -m /path/to/device.map -r hd0,msdos1 -M 1024M debian

where "device.map" contains the following:

(hd0) /dev/zvol/zroot/linuxdisk1
(cd0) /stuff/vm/bhyve/debian/debian-testing-amd64-2015-11-30.iso

"hd0" can be a real disk device, e.g. /dev/sda, or an image file (in
my case it's a ZFS volume).

How do you use that VM in VBox? If it's a .vdi file, bhyve will not be
able to recognize it. You should use a raw HDD image file. To make it
compatible with VBox you can create a .vmdk file pointing to that raw
image.

--
Sergey


I am back to testing again, copied my ZFS Boot Environment over to a VMware
virtual machine, renamed it and changed IPs, removed the virtual box stuff,
and enabled bhyve.

I did some searching and found out that I was using
https://github.com/churchers/vm-bhyve to manage the bhyve virtual machines
starting and stopping. Sticking with zvol for disk backing, I know its less
portable.

I have been able to install a couple of debian virtual machines and play
around with them. So far I have been unable to duplicate the issue I had
before. My current issue which maybe related to running inside a VMware
virtual machine. Is the Linux hwclock and system clock sync issues. If I
power off the vm and reboot it it believes that the disk was modified in the
future and appears to hang. Its actually doing a fsck I just don't see
status if you wait long enough it finally does come up.

Has anyone else ran into this issue? I have actually ran the hwclock
-systohc --utc prior to powering down and still had the issue. Tried
changing the hwclock to system time by excluding the --utc from the command
no change. Incidentally whether I use the --utc or not the hwclock --show
always displays the local time. I couldn't seem to find any documentation on
bhyve whether or not I should tell the guests that the hwclock is in utc or
local time.


The "-u" option of bhyve(8) will configure the RTC to present UTC time
to the guest (default is localtime).

wouldn't it be best if the -u option had an argument to give the offsett?
I had this problem with two windows hosts that were supposed to be in 
different timezones.

I worked around it but...



best
Neel


--
Thanks,
Dean E. Weimer
http://www.dweimer.net/
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to
"freebsd-virtualization-unsubscr...@freebsd.org"

___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"



___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: bhyve with Linux guest, how to safely handle updates?

2016-01-28 Thread Neel Natu
Hi Dean,

On Thu, Jan 28, 2016 at 10:55 AM, dweimer  wrote:
> On 2016-01-26 8:13 pm, Sergey Manucharian wrote:
>>
>> Excerpts from dweimer's message from Tue 26-Jan-16 19:07:
>>>
>>>
>>> Is there anything that normally needs to be done after a Linux kernel
>>> update to refresh the grub2-bhyve setup?
>>
>>
>> The kernel update should not have any effect since grub-bhyve uses the
>> virtual disk mapping file, which should point to your linux drive.
>>
>> I'm using the following command:
>>
>> $ sudo grub-bhyve -m /path/to/device.map -r hd0,msdos1 -M 1024M debian
>>
>> where "device.map" contains the following:
>>
>> (hd0) /dev/zvol/zroot/linuxdisk1
>> (cd0) /stuff/vm/bhyve/debian/debian-testing-amd64-2015-11-30.iso
>>
>> "hd0" can be a real disk device, e.g. /dev/sda, or an image file (in
>> my case it's a ZFS volume).
>>
>> How do you use that VM in VBox? If it's a .vdi file, bhyve will not be
>> able to recognize it. You should use a raw HDD image file. To make it
>> compatible with VBox you can create a .vmdk file pointing to that raw
>> image.
>>
>> --
>> Sergey
>
>
> I am back to testing again, copied my ZFS Boot Environment over to a VMware
> virtual machine, renamed it and changed IPs, removed the virtual box stuff,
> and enabled bhyve.
>
> I did some searching and found out that I was using
> https://github.com/churchers/vm-bhyve to manage the bhyve virtual machines
> starting and stopping. Sticking with zvol for disk backing, I know its less
> portable.
>
> I have been able to install a couple of debian virtual machines and play
> around with them. So far I have been unable to duplicate the issue I had
> before. My current issue which maybe related to running inside a VMware
> virtual machine. Is the Linux hwclock and system clock sync issues. If I
> power off the vm and reboot it it believes that the disk was modified in the
> future and appears to hang. Its actually doing a fsck I just don't see
> status if you wait long enough it finally does come up.
>
> Has anyone else ran into this issue? I have actually ran the hwclock
> -systohc --utc prior to powering down and still had the issue. Tried
> changing the hwclock to system time by excluding the --utc from the command
> no change. Incidentally whether I use the --utc or not the hwclock --show
> always displays the local time. I couldn't seem to find any documentation on
> bhyve whether or not I should tell the guests that the hwclock is in utc or
> local time.
>

The "-u" option of bhyve(8) will configure the RTC to present UTC time
to the guest (default is localtime).

best
Neel

> --
> Thanks,
>Dean E. Weimer
>http://www.dweimer.net/
> ___
> freebsd-virtualization@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> To unsubscribe, send any mail to
> "freebsd-virtualization-unsubscr...@freebsd.org"
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: bhyve with Linux guest, how to safely handle updates?

2016-01-28 Thread dweimer

On 2016-01-26 8:13 pm, Sergey Manucharian wrote:

Excerpts from dweimer's message from Tue 26-Jan-16 19:07:


Is there anything that normally needs to be done after a Linux kernel
update to refresh the grub2-bhyve setup?


The kernel update should not have any effect since grub-bhyve uses the
virtual disk mapping file, which should point to your linux drive.

I'm using the following command:

$ sudo grub-bhyve -m /path/to/device.map -r hd0,msdos1 -M 1024M debian

where "device.map" contains the following:

(hd0) /dev/zvol/zroot/linuxdisk1
(cd0) /stuff/vm/bhyve/debian/debian-testing-amd64-2015-11-30.iso

"hd0" can be a real disk device, e.g. /dev/sda, or an image file (in
my case it's a ZFS volume).

How do you use that VM in VBox? If it's a .vdi file, bhyve will not be
able to recognize it. You should use a raw HDD image file. To make it
compatible with VBox you can create a .vmdk file pointing to that raw
image.

--
Sergey


I am back to testing again, copied my ZFS Boot Environment over to a 
VMware virtual machine, renamed it and changed IPs, removed the virtual 
box stuff, and enabled bhyve.


I did some searching and found out that I was using 
https://github.com/churchers/vm-bhyve to manage the bhyve virtual 
machines starting and stopping. Sticking with zvol for disk backing, I 
know its less portable.


I have been able to install a couple of debian virtual machines and play 
around with them. So far I have been unable to duplicate the issue I had 
before. My current issue which maybe related to running inside a VMware 
virtual machine. Is the Linux hwclock and system clock sync issues. If I 
power off the vm and reboot it it believes that the disk was modified in 
the future and appears to hang. Its actually doing a fsck I just don't 
see status if you wait long enough it finally does come up.


Has anyone else ran into this issue? I have actually ran the hwclock 
-systohc --utc prior to powering down and still had the issue. Tried 
changing the hwclock to system time by excluding the --utc from the 
command no change. Incidentally whether I use the --utc or not the 
hwclock --show always displays the local time. I couldn't seem to find 
any documentation on bhyve whether or not I should tell the guests that 
the hwclock is in utc or local time.


--
Thanks,
   Dean E. Weimer
   http://www.dweimer.net/
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: bhyve with Linux guest, how to safely handle updates?

2016-01-26 Thread Sergey Manucharian
Excerpts from dweimer's message from Tue 26-Jan-16 19:07:
> 
> Is there anything that normally needs to be done after a Linux kernel 
> update to refresh the grub2-bhyve setup?

The kernel update should not have any effect since grub-bhyve uses the
virtual disk mapping file, which should point to your linux drive.

I'm using the following command:

$ sudo grub-bhyve -m /path/to/device.map -r hd0,msdos1 -M 1024M debian

where "device.map" contains the following:

(hd0) /dev/zvol/zroot/linuxdisk1
(cd0) /stuff/vm/bhyve/debian/debian-testing-amd64-2015-11-30.iso

"hd0" can be a real disk device, e.g. /dev/sda, or an image file (in
my case it's a ZFS volume).

How do you use that VM in VBox? If it's a .vdi file, bhyve will not be
able to recognize it. You should use a raw HDD image file. To make it
compatible with VBox you can create a .vmdk file pointing to that raw
image.

--
Sergey

___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: bhyve with Linux guest, how to safely handle updates?

2016-01-26 Thread dweimer

On 2016-01-26 5:03 pm, Sergey Manucharian wrote:

Hi Dean,

Excerpts from dweimer's message from Tue 26-Jan-16 08:26:

I installed some updates using Aptitude within the
Debian guest which promptly broke the VM.


Additional info is needed to help:
- bhyve command line you use to start the VM
- what error messages do you see stating that it's broken?

Sergey


It was a while back I was running it, so I am not quite sure which 
method I had finally stuck with I worked through multiple different 
management scripts at the time before settling on the one I liked best. 
I tried at the time to manually run the VM without using the management 
script to no avail. It would start with no bhyve error on FreeBSD side, 
but when connecting to the console the grub boot loader couldn't find 
the kernel. It appeared to be a disconnect between the kernel upgrade 
within Linux updating grub configuration and the grub2-bhyve setup. 
Maybe it was just a one off issue and something went wrong during the 
Linux update and nothing to do with byhve. However at the time, I didn't 
have time to play with it and new I could get it working with 
VirtualBox.


Is there anything that normally needs to be done after a Linux kernel 
update to refresh the grub2-bhyve setup?

Its winter now, so I have some time to play with it again.
Unfortunately the old external hard drive I wrote a backup of the data 
to save until I had time to work on it again was too old, and doesn't 
want to spin up now, or I could provide the exact error information.


--
Thanks,
   Dean E. Weimer
   http://www.dweimer.net/
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: bhyve with Linux guest, how to safely handle updates?

2016-01-26 Thread Sergey Manucharian
Hi Dean,

Excerpts from dweimer's message from Tue 26-Jan-16 08:26:
> I installed some updates using Aptitude within the
> Debian guest which promptly broke the VM.

Additional info is needed to help:
- bhyve command line you use to start the VM
- what error messages do you see stating that it's broken?

Sergey

___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


bhyve with Linux guest, how to safely handle updates?

2016-01-26 Thread dweimer
I am currently running VirtualBox with a Debian Linux guest to run 
Ubiquiti Unifi-Video server. I had it briefly running on a byhve VM, but 
after about 10 days of running fine. I installed some updates using 
Aptitude within the Debian guest which promptly broke the VM.
I am currently running a beta version of the UniFi-Video server 
software, and as such planning to do a fresh install when the release 
comes out of Beta. I would like to go back to a byhve VM, instead of 
VirtualBox. But before I can make the switch I need to find a safe way 
to install updates.
I believe that the issue was one of the updates updated the kernel, 
which broke the byhve to grub boot loader setup. What is the proper 
method of handling this so that the byhve to grub setup gets updated? 
Does this issue go away on the current build with UEFI setup that's in 
development? Perhaps its best for me to wait until then?


--
Thanks,
   Dean E. Weimer
   http://www.dweimer.net/
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"